Mercurial > hg > Applications > Grep
diff regexParser/cerium/ppe/Exec.cc @ 278:99d635926ef3
ceriumCreateAnyState implemented
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 30 Jan 2016 21:19:05 +0900 |
parents | 8879eb8c64a8 |
children | 6cc1d9779f45 |
line wrap: on
line diff
--- a/regexParser/cerium/ppe/Exec.cc Sat Jan 30 20:44:37 2016 +0900 +++ b/regexParser/cerium/ppe/Exec.cc Sat Jan 30 21:19:05 2016 +0900 @@ -9,43 +9,13 @@ /* これは必須 */ SchedDefineTask1(Exec,blockedGrep); -static -TSValue stateNothing(TSValue tsv) { - return tsv; -} - -static -TSValue stateSkip(TSValue tsv) { - tsv.buff.matchBegin = tsv.buff.buffptr; - return tsv; -} - -static -TSValue stateMatch(TSValue tsv) { - ResultPtr r = NEW(Result); - r->begin = tsv.buff.matchBegin; - r->end = tsv.buff.buffptr; - *tsv.resultEnd = r; - r->next = NULL; - tsv.resultEnd = &r->next; - tsv.current = tsv.tg->stateList->tState; - tsv.buff.buffptr--; - tsv = stateSkip(tsv); - return tsv; -} - TSValue blockSearch(TransitionGeneratorPtr tg,Buffer buff) { TSValue tsv; tsv.buff = buff; tsv.tg = tg; + tsv.current = tg->anyState->tState; tsv.result = NULL; tsv.resultEnd = &tsv.result; - tsv.current = tg->anyState->tState; - tsv.current->stateSkip = stateSkip; - tsv.current->stateContinue = stateNothing; - tsv.tg->stateSkip = stateSkip; - tsv.tg->stateMatch = stateMatch; - tsv.tg->stateNothing = stateNothing; unsigned char *end = buff.buffend; buff.buffend = buff.buff+1; tSearch(tsv);