fork download
  1. %{
  2. #include<stdio.h>
  3. int i;
  4. %}
  5.  
  6. %%
  7. [0-9]+ {i=atoi(yytext)
  8. if(i%2==0)
  9. printf("Even");
  10. else
  11. printf("Odd");}
  12. %%
  13.  
  14. int yywrap(){}
  15.  
  16. int main()
  17. {
  18. yylex();
  19. return 0;
  20. }
  21.  
  22. }
Success #stdin #stdout #stderr 0.02s 6908KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/y8BQhV/prog:22:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit