]> Savannah Git Hosting - gnulib.git/commit
dfa: a state has a set of current positions.
authorNorihiro Tanaka <noritnk@kcn.ne.jp>
Mon, 22 Oct 2018 14:51:20 +0000 (23:51 +0900)
committerJim Meyering <meyering@fb.com>
Sat, 27 Oct 2018 19:48:47 +0000 (12:48 -0700)
commitfb03ea32b439a1cbec9e66bb4e176d5ce0ef9624
treee20e0559d44687def8d8fa632625db2a6827744a
parenta37603c6762a9d0fe00c6ce1b94b50d335a0ac61
dfa: a state has a set of current positions.

Up to now, a state had a set of follow-on positions.  It is replaced a
set of current positions.  This change will save memory space.

dfa.c (leaf_set): Remove it.
(struct dfa): Add new member constraints and separates.
(append): New function.
(state_index): Bring constraint from pre-calculated.
(state_separate_contexts): Bring separate contexts from pre-calculated.
Change argument, update callers.
(merge_nfa_state): Pre-calculate constraints for END. and remove END.
No longer END is not used after here.
(dfaoptimize): Initialize added member constraints.
(dfaanalyze): Pre-calculate seprate contexts.
(build_state): Change for this update.
(dfassbuild): Initialize new members .
(dfafree): Free memory for new members.
lib/dfa.c