]> git.saurik.com Git - bison.git/commit
Don't apply the default %destructor/%printer to an unreferenced midrule
authorJoel E. Denny <jdenny@ces.clemson.edu>
Sat, 21 Oct 2006 04:52:43 +0000 (04:52 +0000)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Sat, 21 Oct 2006 04:52:43 +0000 (04:52 +0000)
commitf91b1629440cb52b851004570b7f280e79167383
treee4e1e8c9d4e17ae6d9a75ca81906c34eeca1d580
parent519d000408fc583144fb9c7a18d3718cefaf0de7
Don't apply the default %destructor/%printer to an unreferenced midrule
value.  Mentioned at
<http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
* src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
like $@n instead of just @n so that the default %destructor/%printer
logic doesn't see them as user-defined symbols.
(symbol_is_dummy): Check for both forms of the name.
* src/reader.c (packgram): Remove the `$' from each midrule symbol
name for which the midrule value is referenced in any action.
* tests/actions.at (Default %printer and %destructor for mid-rule
values): New test.
* tests/regression.at (Rule Line Numbers, Web2c Report): Update output
for change to dummy symbol names.
ChangeLog
src/reader.c
src/symtab.c
tests/actions.at
tests/regression.at