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