]> git.saurik.com Git - bison.git/commit
lalr1.cc: destroy $$ when YYERROR is called.
authorAkim Demaille <demaille@gostai.com>
Wed, 12 Aug 2009 16:00:40 +0000 (18:00 +0200)
committerAkim Demaille <demaille@gostai.com>
Wed, 19 Aug 2009 08:36:53 +0000 (10:36 +0200)
commitc4dc4c4671556643de16417a12130da93440087f
tree24ab92c1bd8585ba51a55e2694ef3584ec0d71fa
parentc67e466f9d4f63d360d82dc23b9bfffb4d846209
lalr1.cc: destroy $$ when YYERROR is called.

* data/lalr1.cc (yyreduce): Compute the resulting state before
running the user action so that yylhs is a valid symbol.
(yyerrorlab): Since yylhs is complete (it knows its type), we can
simply call yy_destroy_ to destroy $$ on YYERROR invocations.
* tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
ChangeLog
data/lalr1.cc
tests/c++.at