%top { #include #include "grammar.h" } %option noyywrap %option nounput %option noinput %option yylineno %option noyy_top_state %% " " { } [0-9_]* { yylvalp->value = strtoul(yytext, NULL, 10); return VALUE; } . { char *msg; asprintf(&msg, "Unhandled token in d2c id block: '%s'", yytext); YY_FATAL_ERROR(msg); free(msg); } %%