%{ extern int yylval; %} %% a return A; b return B; . return yytext[0]; \n return 0; %% int yywrap() { return 1; }