%{ #include "dice.tab.h" extern int yylval; %} %% [ \t] /*consume*/; \n return tNew; \+ return tPlus; \- return tMinus; \* return tMult; \\ return tDiv; \( return tLParen; \) return tRParen; [dD] return tD; [kK] return tK; [1-9][0-9]* yylval=atoi(yytext); return tNUM; . yylval=(int)yytext; return tErr;