]> git.saurik.com Git - bison.git/commit - tests/actions.at
Support %destructor and merge error locations in lalr1.cc.
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 9 Feb 2004 21:31:42 +0000 (21:31 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 9 Feb 2004 21:31:42 +0000 (21:31 +0000)
commitc2729758f299eced966df137913fa5cab195ad47
tree9050a982da9f15f2b92640517151c23e0b92b945
parent0b31edd3e1891de53226dffb24da20d080fd4cc7
Support %destructor and merge error locations in lalr1.cc.

* data/lalr1.cc (b4_cxx_destruct_def): New macro.
(Parser::stos_): Define unconditionally.
(Parser::destruct_): New method.  Generate its body with
b4_yydestruct_generate.
(Parser::error_start_): New attribute.
(Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
token which are discarded.
(Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
error_start_ when erroneous token are discarded.
(Parser::parse) <yyerrlab1>: Compute the location of the error
token so that it covers all the discarded tokens.
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
it can be called with `%skeleton "lalr1.cc"', and do that.
ChangeLog
data/lalr1.cc
tests/actions.at