]> git.saurik.com Git - bison.git/commit
During deterministic GLR operation, user actions should be able to
authorJoel E. Denny <jdenny@ces.clemson.edu>
Mon, 30 Jan 2006 11:15:15 +0000 (11:15 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Mon, 30 Jan 2006 11:15:15 +0000 (11:15 +0000)
commit3f0014152bbfe76bb374ef03dbf4700bb1dd2796
tree4426fab988c35e374530cbc9ecc999fe42cafe58
parente2a8c0f591c1f8ca0909faee23914f62bacb866c
During deterministic GLR operation, user actions should be able to
influence the parse by changing yychar.  To make this easier to fix and
to make glr.c easier to evolve in general, don't maintain yytoken in
parallel with yychar; just compute yytoken when needed.
* tests/glr-regression.at (Incorrect lookahead during deterministic
GLR): Check that setting yychar in a user action has the intended
effect.
* data/glr.c (yyGLRStack): Remove yytokenp member.
(yyclearin): Don't set *yytokenp.
(yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
yychar rather than *yytokenp to determine the current lookahead.
Compute yytoken locally when needed.
(yyparse): Likewise.  Remove the local yytoken that yytokenp used to
point to.

* doc/bison.texinfo (Bison Options): Remove stray sentence fragment
after `--report' documentation.
ChangeLog
data/glr.c
doc/bison.texinfo
src/parse-gram.c
src/parse-gram.h
tests/glr-regression.at