fork download
  1. %{
  2. %}
  3. %s A B C D E
  4. %%
  5. <A> [0-9] BEGIN B;
  6. <A> [^0-9|^\n] {BEGIN D;printf("REJ");}
  7.  
  8. <B> [0-9] {BEGIN B; printf("INT");}
  9. <B> \. BEGIN C;
  10. <B> \n BEGIN A;
  11. <B> [^0-9|^\n] {BEGIN D;printf("REJ");}
  12.  
  13. <C> [0-9] BEGIN E;
  14. <C> \n BEGIN A;
  15. <C> [^0-9|^\n] {BEGIN D;printf("REJ");}
  16.  
  17. <E> [0-9] {BEGIN E; printf("FLOAT");}
  18. <E> \n BEGIN A;
  19. <E> [^0-9|^\n] {BEGIN D;printf("REJ");}
  20.  
  21. <D> \n BEGIN A;
  22. <D> [^0-9|^\n] BEGIN D;
  23. %%
  24.  
  25. int main()
  26. {
  27. yywrap();
  28. return 0;
  29. }
  30.  
  31. int yywrap()
  32. {
  33. return 1;
  34. }
Success #stdin #stdout #stderr 0.02s 6844KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/ulakZA/prog:34:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit