15 variable curstate fsm->cs;
18 >{printf("enter b1\n");}
19 >{printf("enter b2\n");}
23 %{printf("leave a\n");}
24 @{printf("finish a\n");}
27 main := first . second . '\n';
32 void forder_init( struct forder *fsm )
37 void forder_execute( struct forder *fsm, const char *_data, int _len )
39 const char *p = _data;
40 const char *pe = _data+_len;
45 int forder_finish( struct forder *fsm )
49 if ( fsm->cs == forder_error )
51 if ( fsm->cs >= forder_first_final )
58 void test( char *buf )
60 int len = strlen(buf);
62 forder_execute( &fsm, buf, len );
63 if ( forder_finish( &fsm ) > 0 )
77 "fail after newline\n"
83 #ifdef _____OUTPUT_____