Mercurial > hg > Applications > Grep
changeset 256:72f3673dd7a5
remove tg->stateTop
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 Jan 2016 18:28:57 +0900 |
parents | 61d4d466e64c |
children | ebb429c2b6a7 |
files | regexParser/regexParser.h regexParser/subsetConstruction.cc |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/regexParser/regexParser.h Mon Jan 25 18:20:37 2016 +0900 +++ b/regexParser/regexParser.h Mon Jan 25 18:28:57 2016 +0900 @@ -90,7 +90,6 @@ typedef struct transitionGenerator { long totalStateCount; StateStackPtr stack; - StatePtr stateTop; StatePtr stateEnd; StatePtr *stateArray; StatePtr stateList;
--- a/regexParser/subsetConstruction.cc Mon Jan 25 18:20:37 2016 +0900 +++ b/regexParser/subsetConstruction.cc Mon Jan 25 18:28:57 2016 +0900 @@ -380,13 +380,13 @@ } void subsetConstruction(TransitionGeneratorPtr tg) { - for (;tg->stateTop;tg->stateTop = tg->stateTop->next) { - CharClassWalkerPtr cw = createCharClassWalker(tg->stateTop->cc); + for (StatePtr st = tg->stateList;st;st = st->next) { + CharClassWalkerPtr cw = createCharClassWalker(st->cc); while (hasNext(cw)) { CharClassPtr cc = getNext(cw); BitVector bi = cc->nextState; if (tg->stateArray[bi.bitContainer]) continue; // already done - StatePtr s = createState(tg,bi); + StatePtr s = createState(tg,bi); // s is added at the end of stateList. tg->stateArray[bi.bitContainer] = s; determinize(s,tg); }