mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
(yyrecoverSyntaxError): Correct yyerrState logic. Correct comment. Allow states with only a default reduction. Fixes to avoid problem that $-N rules in GLR parsers can cause buffer overruns, corrupting state. * src/output.c (prepare_rules): Output max_left_semantic_context. * src/reader.h (max_left_semantic_context): New * src/scan-gram.l (max_left_semantic_context): Define. (handle_action_dollar): Update max_left_semantic_context. * data/glr.c (YYMAXLEFT): New. (yydoAction): Increase yyrhsVals size. (yyresolveAction): Ditto. Fixes to problems with location handling in GLR parsers reported by Frank Heckenbach (2003/06/05). * data/glr.c (YYLTYPE): Make trivial if locations not used. (YYRHSLOC): Add parentheses, make depend on whether locations used. (YYLLOC_DEFAULT): Ditto. (yyuserAction): Use YYLLOC_DEFAULT. (yydoAction): Remove redundant code. * tests/cxx-type.at: Exercise location information. (yylex): Track locations. (stmtMerge): Return value rather than printing.