ethanpailes/regex

Regex Intersection for Alternation

Closed this issue · 0 comments

This is an optimization that could apply to all regular expressions, not just skip regex. If the branches of an alternation don't intersect, you don't split to them non-deterministicly, but instead just transition to the start of the next branch upon death. (I think this might require either the addition of a push-die and pop-die instruction or the addition of a death_goto field to any test instruction, which may make it not worth it).

Obviously this applies to kleene star as well.