mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
cex: fix state-item pruning
There were several bugs in pruning that would leave the state-item graph in an inconsistent state which could cause crashes later on: - Pruning now happens in one pass instead of two. - Disabled state-items no longer prune the state-items they transition to if that state-item has other states that transition to it. - State-items that transition to disabled state-items are always pruned even if they have productions. Reported by Michal Bartkowiak <michal.bartkowiak@nokia.com> https://lists.gnu.org/r/bug-bison/2021-01/msg00000.html and Zartaj Majeed https://github.com/akimd/bison/issues/71 * src/state-item.c (prune_forward, prune_backward): Fuse into... (prune_state_item): this. Adjust callers.
This commit is contained in:
committed by
Akim Demaille
parent
236b85dd28
commit
2c294c1325
Reference in New Issue
Block a user