comparison regexParser/grepWalk.cc @ 319:7b8234c090f7

bmSearch
author mir3636
date Sun, 08 May 2016 22:53:20 +0900
parents fa590a7272ae
children
comparison
equal deleted inserted replaced
318:c9458ffecb87 319:7b8234c090f7
4 4
5 #include "grepWalk.h" 5 #include "grepWalk.h"
6 #include "subsetConstruction.h" 6 #include "subsetConstruction.h"
7 #include "CharClass.h" 7 #include "CharClass.h"
8 #include "threadedSearch.h" 8 #include "threadedSearch.h"
9 #include "bmSearch.h"
9 10
10 StatePtr nextState(BitVector bi,TransitionGeneratorPtr tg) { 11 StatePtr nextState(BitVector bi,TransitionGeneratorPtr tg) {
11 // create tSearch in next state. 12 // create tSearch in next state.
12 StatePtr state = tg->stateArray[bi.bitContainer]; 13 StatePtr state = tg->stateArray[bi.bitContainer];
13 if (state == NULL) { 14 if (state == NULL) {
23 TSValue tsv = createTSValue(tg,buff); 24 TSValue tsv = createTSValue(tg,buff);
24 tg->stateStart = NEW(State); 25 tg->stateStart = NEW(State);
25 *tg->stateStart = *tg->stateList; 26 *tg->stateStart = *tg->stateList;
26 tg->stateStart->accept = false; // Start state never accept 27 tg->stateStart->accept = false; // Start state never accept
27 StatePtr state = tg->stateStart; 28 StatePtr state = tg->stateStart;
29 checkBMSearch(state->cc);
28 30
29 #if DEBUG 31 #if DEBUG
30 TSValuePtr tsvp = &tsv; // make tsv visible in lldb 32 TSValuePtr tsvp = &tsv; // make tsv visible in lldb
31 #endif 33 #endif
32 next: while (tsv.buff.buffptr < tsv.buff.buffend) { 34 next: while (tsv.buff.buffptr < tsv.buff.buffend) {