diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-19 21:31:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-07-19 21:31:43 -0700 |
commit | f2bd891e24b4d2e6b06837f00c3f74199f2fbf75 (patch) | |
tree | 56d6ed5f63f8e9ab72aa7dcc8aed049cba2d5ccb /match.h | |
parent | 9bc29f44130cdfe750da120048298435cf59d72e (diff) | |
download | txr-f2bd891e24b4d2e6b06837f00c3f74199f2fbf75.tar.gz txr-f2bd891e24b4d2e6b06837f00c3f74199f2fbf75.tar.bz2 txr-f2bd891e24b4d2e6b06837f00c3f74199f2fbf75.zip |
NFA regex optimization: combine move and closure.
* regex.c (struct nfa_machine_t): Remove move and clos
array pointers, replace with flip and flop. Remove
nmove member.
(nfa_move): Static function removed.
(nfa_move_closure): New static function, based on nfa_move and
logic from nfa_closure.
(nfa_run): Use nfa_move_closure and flip between two
arrays.
(regex_machine_reset): Remove reference to nmove member
in nfa_machine_t. Prepare initial closure in flip array.
(regex_machine_init): Allocate flip and flop arrays,
rather than removed move and clos.
(regex_machine_cleanup): Free flip and flop arrays and
zero out the pointers, rather than removed move and clos.
(regex_machine_feed): Replace nfa_move and nfa_closure
with combined nfa_move_closure from flip to flop,
and exchange of flip and flop arrays.
Diffstat (limited to 'match.h')
0 files changed, 0 insertions, 0 deletions