fork download
  1. %{
  2. #include "y.tab.h"
  3. %}
  4.  
  5. %%
  6. "if" { return IF; }
  7. "else" { return ELSE; }
  8. "(" { return '('; }
  9. ")" { return ')'; }
  10. "{" { return '{'; }
  11. "}" { return '}'; }
  12. ";" { return ';'; }
  13. [a-zA-Z_][a-zA-Z0-9_]* { return ID; }
  14. [ \t\n]+ ; // ignore spaces
  15. . ; // ignore others
  16. %%
  17.  
  18. int yywrap() { return 1; }
  19.  
Success #stdin #stdout #stderr 0.03s 6944KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/up2Fv8/prog:2:1: Syntax error: Operator expected
ERROR: /home/up2Fv8/prog:18:26: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit