From: Paul Eggert Date: Sun, 13 Oct 2002 08:40:10 +0000 (+0000) Subject: Fix problem reported by Henrik Grubbstroem in X-Git-Tag: BISON-1_75~24 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/bcbad5b9a09c468a6bebbac4382e0a7c6a27250f Fix problem reported by Henrik Grubbstroem in : "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, because the Bison parser reads the second action before reducing the first one. * src/scan-gram.l (rule_length): New static var. Use it to keep track of the rule length in the scanner, since we can't expect the parser to be in lock-step sync with the scanner. (handle_action_dollar, handle_action_at): Use this var. * tests/actions.at (Exotic Dollars): Test for the problem. --- diff --git a/ChangeLog b/ChangeLog index 71574163..cf9d75a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-10-13 Paul Eggert + + Fix problem reported by Henrik Grubbstroem in + : + "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected, + because the Bison parser reads the second action before reducing + the first one. + * src/scan-gram.l (rule_length): New static var. + Use it to keep track of the rule length in the scanner, since + we can't expect the parser to be in lock-step sync with the scanner. + (handle_action_dollar, handle_action_at): Use this var. + * tests/actions.at (Exotic Dollars): Test for the problem. + 2002-10-12 Paul Eggert * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include .