Folx,<br><br>Say I have a machine defined with a number of states in it:<br><br>S1 (<br><br>Event1 -> S2 ),<br><br>S2 (<br><br>Event2 -> S3), <br><br>..... and so on .<br><br>I access cs as  blah->cs .<br><br><br>
If I want to figure out and/or modify , outside of FMS action{} code blocks, if the current state is S2 or S3, <br>how do I find out what S2 and S3 translate to, in terms of context->cs value ? <br><br>Outside of exporting FSM as an XML and then going over it, is there a way to ask Ragel to "export" the state<br>
mappings ? Similar to the  way one can import event definitions like so:<br><br>#define Event1 'a'<br>#define Event2 'b' <br><br>can Ragel export state cs values like so:<br><br>#define S1 1<br>#define S2 2 <br>
<br>Again, one could use Ragel's dot or XML output to figure out what different states translate to in terms of cs values<br>and then map them manually, but I was hoping there's a different, more automated way to go about it. <br>
<br>When/if the FSM definition is modified - new states included, existing states deleted,  etc, such manual definitions<br>would clearly get out of sync  and this is what I am trying to avoid.<br><br><br>TY<br>Rashid<br>
<br><br><br><br><br>