fork download
  1. %{
  2. int vow_count=0;
  3. int const_count=0;
  4. %}
  5.  
  6. %%
  7. [aeiouAEIOU]{vow_count++;}
  8. [a-zA-Z]{const_count++;}
  9. %%
  10.  
  11. main(){
  12. printf("enter the string");
  13. yylex();
  14. printf("vowel is: %d/n",vow_count);
  15. printf("const is: %d/n",const_count);
  16. return 0;
  17.  
  18. }
Success #stdin #stdout #stderr 0.02s 6968KB
stdin
aevir
stdout
Standard output is empty
stderr
ERROR: /home/zA7Xg6/prog:18:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit