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

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

%option bison-cc bison-locations noyywrap header-file
%option namespace=yy lexer=Lexer

%%

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

%%
