fork download
  1. %{
  2. #include<stdio.h>
  3. int vowels=0;
  4. int cons=0;
  5. %}
  6. %%
  7. [aeiouAEIOU] {vowels++;}
  8. [a-zA-Z] {cons++;}
  9. %%
  10. int yywrap()
  11. {
  12. return 1;
  13. }
  14. main()
  15. {
  16. printf(“Enter the string.. at end press ^d\n”);
  17. yylex();
  18. }
Success #stdin #stdout #stderr 0.02s 6996KB
stdin
vidyasree
stdout
Standard output is empty
stderr
ERROR: /home/Fiahpd/prog:18:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit