fork download
  1. %{
  2. int ch=0, wr=0;
  3. %}
  4.  
  5. %%
  6. [^\t\n ]+ {wr++;ch+=yyleng;}
  7. [^\n\t] {ch++;}
  8. %%
  9.  
  10. int main()
  11. {
  12. yylex();
  13. printf("Character=%d\nWords=%d\n", ch, wr);
  14. return 0;
  15. }
  16. int yywrap(){
  17. return 1;
  18. }
  19.  
  20.  
Success #stdin #stdout #stderr 0.02s 6972KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/A0gIN3/prog:19:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit