%{ #include #include #include "scan.h" %} %option 8bit %option never-interactive %option nounput %option noyywrap %% \.[0-9]+ { yylval.str=strdup(yytext+1); return VERSION_MINOR; } [0-9]+ { yylval.str=strdup(yytext); return INTEGER; } \. { yylval.opr=(u_int32_t)*yytext; return DOT; } . { yylval.opr=(u_int32_t)*yytext; return CHAR; } <> { return ENDOF; } %%