Modifications to fix GLR bug reported by S. Eken.

This commit is contained in:
Paul Hilfinger
2003-01-29 23:39:59 +00:00
parent ede3d3bcbc
commit 6029a57f53

View File

@@ -1,3 +1,36 @@
2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
* tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
of $1.
Changes in response to error report by S. Eken: GLR mode does not
handle negative $ indices or $ indices in embedded rules correctly.
See <http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
* data/glr.c (b4_rhs_value): Change to use YYFILL macro.
(b4_rhs_location): Ditto.
(yyfill): New function to copy from stack tree into array
incrementally.
(yyuserAction): Modify to allow incremental move of semantic values
to rhs array when in GLR mode.
Define YYFILL to use in user-defined actions to fill semantic array
as needed.
Remove dummy use of yystack, as there is now a guaranteed use.
(yydoAction): Modify to allow incremental move of semantic values
to rhs array when in GLR mode.
(yyresolveAction): Ditto.
(yyglrShiftDefer): Update comment.
(yyresolveStates): Use X == NULL for pointers, not !X.
(yyglrReduce): Ditto.
(yydoAction): Ditto
* tests/glr-regr1.at: Rename to ...
* tests/glr-regression.at: Add new regression test for the problems
described above (adapted from S. Eken).
Update copyright notice.
* tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
* tests/Makefile.am: Ditto.
2003-01-28 Paul Eggert <eggert@twinsun.com>
* data/lalr1.cc: Do not use @output_header_name@ unless