mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Fix bug such that the first pushed token's value and location are
sometimes overwritten (sometimes by %initial-action) before being used. * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity. For the first yypush_parse invocation, initialize yychar to YYEMPTY to more closely mimic the pull parser logic. Don't copy the pushed token to yychar, yylval, and yylloc until it's time to read a token, which is after any initialization of yylval and yylloc. (gottoken): Rename label to... (yyread_pushed_token): ... for clarity and to avoid infringing on the user namespace.
This commit is contained in:
15
ChangeLog
15
ChangeLog
@@ -1,3 +1,18 @@
|
||||
2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||
|
||||
Fix bug such that the first pushed token's value and location are
|
||||
sometimes overwritten (sometimes by %initial-action) before being used.
|
||||
* data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
|
||||
yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
|
||||
For the first yypush_parse invocation, initialize yychar to YYEMPTY to
|
||||
more closely mimic the pull parser logic.
|
||||
Don't copy the pushed token to yychar, yylval, and yylloc until it's
|
||||
time to read a token, which is after any initialization of yylval and
|
||||
yylloc.
|
||||
(gottoken): Rename label to...
|
||||
(yyread_pushed_token): ... for clarity and to avoid infringing on the
|
||||
user namespace.
|
||||
|
||||
2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||
|
||||
Rearrange initialization of the parser state variables so that the
|
||||
|
||||
Reference in New Issue
Block a user