fork(1) download
  1. %{
  2. #include <stdio.h>
  3. int vowels = 0;
  4. int consonents = 0;
  5. %}
  6. %%
  7. [aeiouAEIOU] vowels++;
  8. [a-zA-Z] consonents++;
  9. . ;
  10. %%
  11. void main(){
  12. yyin = fopen("input.txt","r");
  13. yylex();
  14. printf("This file contains \n%d vowels, \n%d consonents",vowels,consonents);
  15. }
  16. int yywrap(){return(1);}
Success #stdin #stdout #stderr 0.03s 6924KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/Ajxem6/prog:2:3: Syntax error: Operator expected
ERROR: /home/Ajxem6/prog:16:23: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit