/* Scanner for "C" assignment statements... sort of. */
/* Compile: reflex --flex --bison --header-file flexexample3.l */
/* Compile: bison -d -y flexexample3.y */

%top{
#include "y.tab.h"  /* Generated by bison. */
#define YY_EXTERN_C extern "C" /* this is needed for yylex C linkage when compiling y.tab.c in C */
}

%option bison noyywrap header-file

%%

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

%%
