fork download
  1. %{
  2. int a;
  3. %}
  4.  
  5. %%
  6. [a-z|A-Z|_] [a-z | A-Z |0-9|_]^*{a++;}
  7. %%
  8.  
  9. int yywrap(){
  10. return 1;
  11. }
  12.  
  13. int main()
  14. {
  15. yylex();
  16. printf("Total valid identifiers found :%d\n",a);
  17. return 0;
  18. }
  19.  
  20.  
  21.  
Success #stdin #stdout #stderr 0.02s 6900KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/Y6Q40a/prog:20:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit