Mercurial > hg > Applications > Grep
diff regexParser/cerium/ppe/Exec.cc @ 302:27414e6fb33c
retrying blocked search
fix for CbC support
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Feb 2016 08:59:38 +0900 |
parents | 63213964502a |
children | cc770cd8d000 |
line wrap: on
line diff
--- a/regexParser/cerium/ppe/Exec.cc Thu Feb 04 03:26:18 2016 +0900 +++ b/regexParser/cerium/ppe/Exec.cc Mon Feb 08 08:59:38 2016 +0900 @@ -14,31 +14,19 @@ TSValue tsv = createTSValue(tg,buff); BlockOutput blk; tsv.blk = &blk; - if (task_spawned == 0) { - tsv.current = tg->stateStart->tState; - } else { - tsv.current = tg->anyState->tState; - } + tsv.current = tg->stateStart->tState; tsv.blk->result = NULL; ResultPtr result = NULL; tsv.blk->resultEnd = &result; unsigned char *end = tsv.buff.buffend; - tsv.buff.buffend = tsv.buff.buff+1; - tsv = tSearch(tsv); - tsv.blk->blockBegin = tsv.current; tsv.buff.buffend = end; tsv = tSearch(tsv); tsv.blk->blockEnd = tsv.current; + addResult(tsv,true,buff.buff,buff.buffend); // entire buffer if (tsv.blk->blockEnd->state->bitState.bitContainer != 1) { if (tsv.matchBegin != tsv.buff.buffptr) { // partial match case at block end. - ResultPtr r = NEW(Result); - r->continued = true; - r->begin = tsv.matchBegin; - r->end = tsv.matchEnd; - *tsv.blk->resultEnd = r; - r->next = NULL; - tsv.blk->resultEnd = &r->next; + addResult(tsv,true,tsv.matchBegin,tsv.matchEnd); // printf("Exec %lx r->begin : %p r->end : %p\n",tsv.blockEnd->state->bitState.bitContainer, r->begin,r->end); } }