]> git.saurik.com Git - bison.git/commit
Let the initial-action act on the look-ahead, and use it for the
authorAkim Demaille <akim@epita.fr>
Mon, 20 Sep 2004 15:25:25 +0000 (15:25 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 20 Sep 2004 15:25:25 +0000 (15:25 +0000)
commit451364edb17dae7d19301a494f8be7dad67287d2
tree78f3efbaa147087e00ea61b41a979e48c1b6c139
parent18d192f0eae3f0ed313100d825e46bf772b0b643
Let the initial-action act on the look-ahead, and use it for the
"initial push" (corresponding to an hypothetical beginning-of-file).
And let lalr1.cc honor %initial-action.
* doc/bison.texinfo (Initial Action Decl): Clarify, and add an
example.
* data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
(Parser::Parser): Remove the ctor that used to initialize it.
(Parser::parse): Like in the other skeletons, issue the "starting
parse" message before any action.
Honor %initial-action.
Initialize the stacks with the lookahead.
* data/yacc.c: Let $$ and @$ in %initial-action designate the
look-ahead.
Push them in the stacks.
* tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
ChangeLog
data/lalr1.cc
data/yacc.c
doc/bison.texinfo
tests/actions.at
tests/calc.at