fork download
  1. %{
  2. #include <stdio.h>
  3. int i=0,t=0;
  4.  
  5. %}
  6.  
  7. %%
  8. [0-9]+ {i++;}
  9. [0-9]+(,[0-9]+)* {t++;}
  10. %%
  11. int yywrap(){
  12. return 1;
  13. }
  14. int main(){
  15. printf("le nombre d'entier est : %d",i);
  16. printf("le nombre d'reel est : %d",t);
  17. yylex();
  18.  
  19. }
Success #stdin #stdout #stderr 0.02s 7008KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/t39Kjt/prog:19:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit