Mercurial > hg > Applications > Grep
comparison regexParser/cerium/ppe/Exec.cc @ 304:c48a8671ce34
fix parallel search first match
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Feb 2016 12:24:47 +0900 |
parents | cc770cd8d000 |
children |
comparison
equal
deleted
inserted
replaced
303:cc770cd8d000 | 304:c48a8671ce34 |
---|---|
14 tsv.current = tsv.tg->stateStart->tState; | 14 tsv.current = tsv.tg->stateStart->tState; |
15 tsv.blk->result = NULL; | 15 tsv.blk->result = NULL; |
16 ResultPtr result = NULL; | 16 ResultPtr result = NULL; |
17 tsv.blk->resultEnd = &result; | 17 tsv.blk->resultEnd = &result; |
18 tsv.blk->blockBegin = tsv.current; | 18 tsv.blk->blockBegin = tsv.current; |
19 addResult(tsv,true,buff.buff,buff.buffend); // entire buffer | |
19 tsv = tSearch(tsv); | 20 tsv = tSearch(tsv); |
20 tsv.blk->blockEnd = tsv.current; | 21 tsv.blk->blockEnd = tsv.current; |
21 addResult(tsv,true,buff.buff,buff.buffend); // entire buffer | |
22 if (tsv.blk->blockEnd->state->bitState.bitContainer != 1) { | 22 if (tsv.blk->blockEnd->state->bitState.bitContainer != 1) { |
23 if (tsv.matchBegin != tsv.buff.buffptr) { | 23 if (tsv.matchBegin != tsv.buff.buffptr) { |
24 // partial match case at block end. | 24 // partial match case at block end. |
25 addResult(tsv,true,tsv.matchBegin,tsv.matchEnd); | 25 addResult(tsv,true,tsv.matchBegin,tsv.matchEnd); |
26 // printf("Exec %lx r->begin : %p r->end : %p\n",tsv.blockEnd->state->bitState.bitContainer, r->begin,r->end); | 26 // printf("Exec %lx r->begin : %p r->end : %p\n",tsv.blockEnd->state->bitState.bitContainer, r->begin,r->end); |