%{ #include "test.tab.h" #include #include int yylineno; %} %% "{" { return LBRACE; } "}" { return RBRACE; } \n { yylineno++; } [^{}]+ { yylval.str = strdup(yytext); return TEXT; } %% int yywrap() { return 1; }