/* Scanner for "C" assignment statements... sort of. */
/* Compile: reflex --bison-locations --bison-bridge --header-file reflexexample8.lxx */
/* Compile: bison -d flexexample8.yxx */
/* Example taken from Flex documentation A.2 */
/* Bison bridge passes yylval to yylex (which limits yylval's scope to the rule actions) */
/* Note: yylval is no longer a pointer with reflex */

%top{
#include "flexexample8.tab.hxx"  /* Generated by bison. */
}

%option bison-locations bison-bridge noyywrap

%%

\d+           { yylval.num = atoi(text());   return NUMBER; }
\w+           { yylval.str = strdup(text()); return STRING; }
"="|";"       { return text()[0]; }
.|\n          {}

%%
