%option noyywrap %{ /* * * * * * * * * * * * * * * DEFINITIONS * * * * * * * * * * * * * * */ #include #include "y.tab.h" extern int line_num; %} %x error %x label %% %{ /* * * * * * * * * * * * RULES * * * * * * * * * * * */ %} [ \t\f\r] // ignore white space \n { line_num++; } "," { return COMMA; } ";" { return SEMI; } "->" { return ARROW; } \" { BEGIN(label); }