fork download
  1. %{
  2. #include<stdio.h>
  3. int v=0;
  4. int c=0;
  5.  
  6. %}
  7. %%
  8. [\n\t]+;
  9. {AEIOUaeiou] {v++};
  10. [A-Za-z] {c++};
  11. %%
  12. int main()
  13. {
  14. printf("enter the input string of vowels and consonants:\n");
  15. yylex();
  16. printf("no. of vowels=%d\n",v,c);
  17. }
  18. int yywrap();
  19. {
  20. return 1;
  21. }
  22. }
Success #stdin #stdout #stderr 0.02s 6812KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/t12351/prog:22:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit