fork download
  1. %{
  2. #include<stdio.h>
  3. int words=0;
  4. %}
  5.  
  6. %%
  7. [^\s] yytext[0]=={words++};
  8. [.\n]{}
  9. %%
  10.  
  11. int main()
  12. {
  13. yylex()
  14. printf("the number of prouctions %d",words)
  15. return 0;
  16. }
  17. yywrap()
  18. {
  19. return 1;
  20. }
  21. }
Success #stdin #stdout #stderr 0.02s 6948KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/ZR50p3/prog:21:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit