14 action done { cout << " done" << endl; }
17 # The any* includes '\n' when hit_5 is true, so use guarded concatenation.
18 main := (any @inc)* :> '\n' when hit_5 @done;
21 %% write data noerror;
23 void test( const char *str )
28 const char *pe = str + strlen( str );
30 cout << "run:" << endl;
32 if ( cs >= foo_first_final )
33 cout << " success" << endl;
35 cout << " failure" << endl;
41 test( "12345\n" ); // success
42 test( "\n2345\n" ); // success, first newline ignored
43 test( "1234\n" ); // failure, didn't get 5 chars before newline.
47 #ifdef _____OUTPUT_____