]> Savannah Git Hosting - gnulib.git/commit
dfa: epsilon-closure tweaks (Bug#40634)
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Sep 2020 01:51:55 +0000 (18:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 13 Sep 2020 01:53:36 +0000 (18:53 -0700)
commit4e14bef83b3c8096efebe343069baf13277337bc
tree400885d8650c4155ba2347b60cf19125cf3e7f60
parentda0e8454a8e68035ef4b87dbb9097f85df6ece27
dfa: epsilon-closure tweaks (Bug#40634)

Rename BACKWORD to BACKWARD consistently.
* lib/dfa.c (struct dfa): Reorder members to reduce fragmentation.
(addtok_mb): Redo slightly to make it act more like a state machine.
Check depth only when it increases.
(epsclosure): Let the switch test the tokens.
(dfaanalyze): Cache tindex.  Simplify position loops.
Prefer xcalloc to xnmalloc + explicit zeroing.  Free BACKWARD
only if it is not null, since we're testing that anyway.
(dfaanalyze, build_state): Use merge2 instead of doing it by hand.
ChangeLog
lib/dfa.c