%option noyywrap %{ #include %} %% ([ ]|[ ])*[12346789]|([1-9]+[12346789])([ ]|[ ])* {printf("%s (-)",yytext);} ([ ]|[ ])*[05]|([1-9]+[05])([ ]|[ ])* {printf("%s (+)",yytext);} %% int main() { yylex(); }