fork download
  1. %{
  2. #include <stdio.h>
  3. int vowels = 0;
  4. %}
  5.  
  6. %%
  7. [AEIOUaeiou] { vowels++; }
  8. .|\n { }
  9. %%
  10.  
  11. int yywrap()
  12. {
  13. return 1;
  14. }
  15.  
  16. int main()
  17. {
  18. printf("Enter a text:\n");
  19. fflush(stdout);
  20.  
  21. yylex();
  22.  
  23. printf("\nNumber of vowels = %d\n", vowels);
  24. return 0;
  25. }
  26.  
Success #stdin #stdout #stderr 0.02s 6868KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/iSXSdI/prog:25:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit