%{ #include "stdlib.h" #include "calc.tab.h" %} %% ([0-9]+|([0-9]*\.[0-9]+))([eE][-+]?[0-9]+)? { yylval.dval = atof(yytext); return NUMBER; } [ \t] ; /* ignore white space */ \n | . return yytext[0]; %% int yywrap(void) { return 1; }