15 variable curstate fsm->cs;
17 action a_or_b { printf("a or b\n"); }
20 ( 'a' . [ab]* @a_or_b ) |
21 ( 'b' . [ab]* @a_or_b )
27 void min_init( struct min *fsm )
32 void min_execute( struct min *fsm, const char *_data, int _len )
34 const char *p = _data;
35 const char *pe = _data+_len;
40 int min_finish( struct min *fsm )
44 if ( fsm->cs == min_error )
46 if ( fsm->cs >= min_first_final )
53 void test( char *buf )
55 int len = strlen( buf );
57 min_execute( &fsm, buf, len );
58 if ( min_finish( &fsm ) > 0 )
73 #ifdef _____OUTPUT_____