%{ #include "y.tab.h" extern int yylval; int error_code; %} %% [0-9]+ { yylval = atoi(yytext); return NUMBER; } [a-zA-Z]+ { return NAME; } [ \t] ; /* ignore white space */ \n { return 0; } /* logical EOF */ . { return yytext[0]; } %%