|YACC: syntax errors email@example.com (1997-01-16)|
|Re: YACC: syntax errors firstname.lastname@example.org (1997-01-17)|
|Re: YACC: syntax errors email@example.com (Henner Zeller) (1997-01-19)|
|From:||Henner Zeller <firstname.lastname@example.org>|
|Date:||19 Jan 1997 21:50:11 -0500|
On 17 Jan 1997, Scott Nicol wrote:
> >[Not without hacking the generated parser, which many people have done.
> Yes, you can hack the parser to look at the debug information
> (i.e. the stuff generated to y.output) so that it can report what
> tokens would have been acceptable in the current state, but ...
The current bison-1.25 does this. If you #define YYERROR_VERBOSE at
compile-time it will call yyerror() with at message containing the
names of the next acceptable tokens - if there are less than five
> .. that could be a long list and might not be too useful.
Return to the
Search the comp.compilers archives again.