fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4.  
  5. /*letter [a-z]*/
  6.  
  7. %%
  8. [A-Z]+ { printf("%s\t%d\n", yytext, yyleng); }
  9. \n { printf("New line character\n"); }
  10. . ;
  11.  
  12. %%
  13. int yywrap() { return 1; }
  14. int main() { yylex(); return 0; }
  15.  
Success #stdin #stdout #stderr 0.03s 6964KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/pqgech/prog:2:1: Syntax error: Operator expected
ERROR: /home/pqgech/prog:14:33: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit