%{ #include #include "calc-int.tab.h" %} %option noyywrap DIGIT [0-9] %% {DIGIT}+ { yylval = atoi(yytext); return NUMBER; } "=" | "(" | ")" | "+" | "-" | "*" | "/" { return *yytext; } [[:space:]] { /* ignoriere Whitespace */ } . { return ILLEGAL_CHAR; }