6 #define IDENT_BUFLEN 256
17 # The data that is to go into the fsm structure.
18 action hello_fails { printf("hello fails\n");}
20 newline = ( any | '\n' @{printf("newline\n");} )*;
21 hello = 'hello\n'* $lerr hello_fails @eof hello_fails;
22 main := newline | hello;
27 void erract_init( struct erract *fsm )
32 void erract_execute( struct erract *fsm, const char *_data, int _len )
34 const char *p = _data;
35 const char *pe = _data+_len;
40 int erract_finish( struct erract *fsm )
42 if ( fsm->cs == erract_error )
44 else if ( fsm->cs >= erract_first_final )
54 void test( char *buf )
56 int len = strlen(buf);
58 erract_execute( &fsm, buf, len );
59 if ( erract_finish( &fsm ) > 0 )
89 #ifdef _____OUTPUT_____