// // @LANG: crack // @GENERATED: true // import crack.io cout; import crack.lang Buffer; int ts; int te; int act; int token; %%{ machine scanner; # Warning: changing the patterns or the input string will affect the # coverage of the scanner action types. main := |* 'a' => {cout.format( "pat1\n" ); }; [ab]+ . 'c' => {cout.format( "pat2\n" ); }; any; *|; }%% %% write data; void m( String s ) { byteptr data = s.buffer; int p = 0; int pe = s.size; int cs; String buffer; int eof = pe; %% write init; %% write exec; if ( cs >= scanner_first_final ) { cout `ACCEPT\n`; } else { cout `FAIL\n`; } } void main() { m( "ba a" ); } main();