%{ #include <stdio.h> int i=0,t=0; %} %% [0-9]+ {i++;} [0-9]+(,[0-9]+)* {t++;} %% int yywrap(){ return 1; } int main(){ printf("le nombre d'entier est : %d",i); printf("le nombre d'reel est : %d",t); yylex(); }
Standard input is empty
Standard output is empty
ERROR: /home/t39Kjt/prog:19:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit