Hi
I'm using a C++ bison parser with a C++ flex lexer (thanks to Akim for
showing me that lex-param doesn't work until 2.1!)
In my lexer, I have a single rule that returns character codes:
[-=*/+!<>$~)(\]\[}{`] return yytext[0];
as well as plenty of rules that return tokens defined in the header
generated by the bison grammar (-d option).
The compiled parser runs fine as long as only the #defined tokens are
returned by the lexer; as soon as the lexer produces a single
character via
the above rule, the parser fails with the following message:
1.0: syntax error, unexpected $undefined, expecting {
The "undefined" character in this case was indeed '{', and I've added
debugging output to the lexer to make sure that it really is
producing the
appropriate character code (123 in this case).
Why would the parser be failing to understand the meaning of the
lexer's
return value when it is a character code, but managing fine when it
is a
predefined token?
Thanks for your help!
Hal
--
_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison