%{ #include #include #include "types.h" #include "y.tab.h" %} %% -?[0-9]+ { yylval.intlit = strdup(yytext); return INTLIT; } [A-z][A-z0-9]+|[+-/*%] { yylval.name = strdup(yytext); return NAME; } [(] { return yytext[0]; } [)] { return yytext[0]; } .|\n {;} %% int yywrap(){ return 1; }