This issue is about 2 different issues which are causing problems during fold_identical_endings stage:
While looking at the parser generator, I noticed that Action.fold_by_destination can cause issue as backedges are not properly registered in the parse table. Thus this code should be handled in the ParseTable class instead.
Additionally, when rewriting state indexes, the order of those rewrite might as well cause temporary invalid states. One example seen was the fact that the alias states of a FilterStates condition were aliased before the aliasing of the destination states of these edges. Resulting in 2 edges, with the same action, but not the same destination, which causes issues when looking up the matching backedge in assertions.
This issue is about 2 different issues which are causing problems during
fold_identical_endings
stage:While looking at the parser generator, I noticed that
Action.fold_by_destination
can cause issue as backedges are not properly registered in the parse table. Thus this code should be handled in theParseTable
class instead.Additionally, when rewriting state indexes, the order of those rewrite might as well cause temporary invalid states. One example seen was the fact that the alias states of a
FilterStates
condition were aliased before the aliasing of the destination states of these edges. Resulting in 2 edges, with the same action, but not the same destination, which causes issues when looking up the matching backedge in assertions.