%{ #include #include "y.tab.h" extern int lineno; %} %option noyywrap %% [ \t] { ; } // skip blanks and tabs [0-9]+\.?|[0-9]*\.[0-9]+ { sscanf(yytext, "%lf", &yylval); return NUMBER; } \n { lineno++; return '\n'; } . { return yytext[0]; } // everything else