/* Scanner for "C" assignment statements... sort of. */
/* Compile: reflex --bison-cc --bison-locations --header-file reflexexample9.lxx */
/* Compile: bison -d flexexample9.yxx */

%top{
#include "flexexample9.tab.hxx"  /* Generated by bison. */
#include "location.hh"           /* Generated by bison. */
}

%option bison-cc bison-locations noyywrap
%option namespace=yy lexer=Lexer lex=yylex

%option header-file

%%

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

%%
