]> git.saurik.com Git - bison.git/commit
Because useless nonterminals are now kept alive (instead of being
authorAkim Demaille <akim@epita.fr>
Wed, 5 Dec 2001 09:27:23 +0000 (09:27 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 5 Dec 2001 09:27:23 +0000 (09:27 +0000)
commit630e182b7ba2257805c49424c96b9dc03a113668
tree12af0efbad404713d7ca1a6a63f4e208bfc88b48
parent81b51460c9ebe2d145e3bc39145621107d23ff35
Because useless nonterminals are now kept alive (instead of being
`destroyed'), we now sometimes examine them, and store information
related to them.  Hence we need to know their number, and adjust
memory allocations.
* src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
static.
* src/LR0.c (allocate_itemsets): The memory allocated to
`symbol_count' was used for two different purpose: once to count
the number of occurrences of each symbol, and later reassigned to
`shift_symbol', containing the symbol that can be shifted from a
given state.
Deobfuscate, i.e., allocate, use and free `symbol_count' here
only, and...
(new_itemsets): Allocate `shift_symbol' here.
(allocate_itemsets): symbol_count includes useless nonterminals.
Make room for them.
(free_storage): Use `free', not `XFREE', for pointers that cannot
be null.
ChangeLog
src/LR0.c
src/nullable.c
src/reduce.c
src/reduce.h