fork download
  1. %{
  2.  
  3. /* Implementing yymore() */
  4. #undef yywrap
  5. #define yywrap() 1
  6.  
  7. %}
  8.  
  9. %%
  10.  
  11. [a-z]+ {
  12.  
  13. printf("\nLowercase letter = ");
  14. ECHO;
  15. printf("\nStart of 1st yymore\n");
  16. yymore();
  17. printf("\nEnd of 1st yymore\n");
  18. }
  19.  
  20. [A-Z]+ {
  21. printf("\nUppercase letter = ");
  22. ECHO;
  23. printf("\nStart of 2nd yymore\n");
  24. yymore();
  25. printf("\nEnd of 2nd yymore\n");
  26. }
  27.  
  28.  
  29. %%
  30.  
  31.  
  32. main()
  33. {
  34.  
  35. yylex();
  36.  
  37. }
Success #stdin #stdout #stderr 0.02s 6888KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/qP17o8/prog:37:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit