diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-09-15 13:35:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-09-15 13:35:08 -0700 |
commit | 62cb694d18e211364d664618a705fc6b96a45c51 (patch) | |
tree | 398feb371d46780058fd4c6e8507628e5a03606b /parser.c | |
parent | aba19be251eb1cccbf2d0db1b17aed729c56f6aa (diff) | |
download | txr-62cb694d18e211364d664618a705fc6b96a45c51.tar.gz txr-62cb694d18e211364d664618a705fc6b96a45c51.tar.bz2 txr-62cb694d18e211364d664618a705fc6b96a45c51.zip |
regex: closure operations don't output epsilon states.
* regex.c (nfa_closure, nfa_move_closure): Do not add epsilon
states to the output array. We only need to add them to the
stack for the spanning traversal. Epsilon states are not real
states; they are just a representation of the concept of
transitioning to multiple states at the same time.
When we add them to the output, they just end up being ignored
when nfa_move_closure is called again on that set, since it
only cares about states that have real transitions for a
character.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions