fork download
  1. %{
  2. #include<stdio.h>
  3. int vowel=0,conso=0;
  4. %}
  5. %%
  6. [aeiouAEIOU] { vowel++;}
  7. [a-zA-Z] {conso++;}
  8. %%
  9. int main(int argc ,char* argv[ ])
  10. {
  11. printf("Enter the input:\n");
  12. yylex();
  13. printf("The number of Vowels=%d\n", vowel);
  14. printf("The number of Consonants=%d\n", conso);
  15. }
  16. int yywrap( )
  17. {
  18. return 1;
  19. }
Success #stdin #stdout #stderr 0.04s 6876KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/vP8j8M/prog:19:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit