A couple of things to watch out for:
[[:alnum:]]+ yylval = yytext; return WORD;
^.*$ yylval = yytext; return STRING;
what are you trying to match here? Is your reasoning that any
alphanumeric will get caught in the 1st rule, and everything else in the
2nd? This won't work - any alphanumeric will actually be caught by the
2nd rule, because of the explicit '$'/NL match. Try to handle your NLs
explicitly, and/or use more explicit/descriptive regexps.
cookie: STRING
|
'%' '{' WORD '}'
You need a catch-all rule to let through %, {, and }, otherwise this
will be matched as a STRING; something like
. return yytext[0];
HTH -
Evan
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison