6 * Test in and out state actions.
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 )
70 if ( fsm->cs == state_chart_error )
72 if ( fsm->cs >= state_chart_first_final )
77 struct state_chart sc;
79 void test( char *buf )
81 int len = strlen( buf );
82 state_chart_init( &sc );
83 state_chart_execute( &sc, buf, len );
84 state_chart_finish( &sc );
92 "bbb0x62b 0x61 0x000062\n"
98 #ifdef _____OUTPUT_____