fork download
  1. %{
  2. #include "y.tab.h"
  3. #include <stdio.h>
  4. %}
  5.  
  6. %%
  7. for return FOR;
  8. while return WHILE;
  9. [a-zA-Z_][a-zA-Z_]* return ID;
  10. [0-9]+ return DIGIT;
  11. "<=" return LE;
  12. ">=" return GE;
  13. "==" return EQ;
  14. [ \t\n] ; // Ignore whitespace
  15. . return yytext[0];
  16. %%
  17.  
Success #stdin #stdout #stderr 0.02s 6928KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/fwWaol/prog:2:1: Syntax error: Operator expected
ERROR: /home/fwWaol/prog:16:2: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit