6 * Test in and out state actions.
19 variable curstate fsm->cs;
21 action a { printf("a"); }
22 action b { printf("b"); }
23 action hexa { printf("a"); }
24 action hexb { printf("b"); }
26 hex_a = '0x' '0'* '61' @hexa;
27 hex_b = '0x' '0'* '62' @hexb;
50 main := ( mach '\n' )*;
55 void state_chart_init( struct state_chart *fsm )
60 void state_chart_execute( struct state_chart *fsm, const char *_data, int _len )
62 const char *p = _data;
63 const char *pe = _data+_len;
68 int state_chart_finish( struct state_chart *fsm )
72 if ( fsm->cs == state_chart_error )
74 if ( fsm->cs >= state_chart_first_final )
79 struct state_chart sc;
81 void test( char *buf )
83 int len = strlen( buf );
84 state_chart_init( &sc );
85 state_chart_execute( &sc, buf, len );
86 state_chart_finish( &sc );
94 "bbb0x62b 0x61 0x000062\n"
100 #ifdef _____OUTPUT_____