fork download
  1. %%
  2. ^[ab]*abb$ {printf("valid string : %s\n", yytext);}
  3. . {printf("invalid string: %s\n", yytext);}
  4. %%
  5. int yywrap() { return 1; }
  6. int main(){
  7. yylex();
  8. return 0;
  9. }
  10.  
Success #stdin #stdout #stderr 0.03s 6972KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/5EkxAL/prog:2:1: Syntax error: Operator expected
ERROR: /home/5EkxAL/prog:9:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit