diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-09-12 20:15:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-09-12 20:15:42 -0700 |
commit | a05a064e31cc0da13d8eee2e7705f3ac7d08c46a (patch) | |
tree | 75748fe0248a0bbbdd8b712e93bd3571c1fc999d /txr.h | |
parent | 1d1a1c61329de3fc0400306d13de0377ff5e316c (diff) | |
download | txr-a05a064e31cc0da13d8eee2e7705f3ac7d08c46a.tar.gz txr-a05a064e31cc0da13d8eee2e7705f3ac7d08c46a.tar.bz2 txr-a05a064e31cc0da13d8eee2e7705f3ac7d08c46a.zip |
regex: accept-folding optimization.
In this optimization, we identify places in the NFA graph
where empty states transition to accept states.
We eliminate these transitions and turn the empty states
into accept states. Accept states which thereby become
unreachable from the start state are pruned away.
* regex.c (nfa_fold_accept): New static function.
(nfa_optimize): Add a pass which applies nfa_fold_accept
to all states.
Diffstat (limited to 'txr.h')
0 files changed, 0 insertions, 0 deletions