fork download
  1. %{
  2. int v=0,c=0;
  3. %}
  4. %%
  5. [aeiouAEIOU] v++;
  6. [a-zA-z] c++;
  7. %%
  8. main()
  9. {
  10. printf("enter input:\n");
  11. yylex();
  12. printf("vowels=%d\n consonants=%d\n",v,c);
  13. }
  14. int yywrap()
  15. {
  16. return l;
  17. }
Success #stdin #stdout #stderr 0.03s 6700KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/XYX74Y/prog:17:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit