Mercurial > hg > Applications > Grep
diff regexParser/cerium/CeriumMain.cc @ 303:cc770cd8d000
parallel retrying seach worked
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Feb 2016 11:56:13 +0900 |
parents | 27414e6fb33c |
children |
line wrap: on
line diff
--- a/regexParser/cerium/CeriumMain.cc Mon Feb 08 08:59:38 2016 +0900 +++ b/regexParser/cerium/CeriumMain.cc Mon Feb 08 11:56:13 2016 +0900 @@ -26,13 +26,13 @@ } void addResult(TSValue tsv,bool cont, unsigned char *begin, unsigned char *end) { - ResultPtr r = NEW(Result); - r->continued = cont; - r->begin = begin; - r->end = end; - *tsv.blk->resultEnd = r; - r->next = NULL; - tsv.blk->resultEnd = &r->next; + ResultPtr r = NEW(Result); + r->continued = cont; + r->begin = begin; + r->end = end; + *tsv.blk->resultEnd = r; + r->next = NULL; + tsv.blk->resultEnd = &r->next; } @@ -46,6 +46,7 @@ tsv.current = tsv.tg->stateStart->tState; if (tsv.matchEnd) { addResult(tsv,false,tsv.matchBegin,tsv.matchEnd); + tsv.matchEnd = NULL; } tsv.matchBegin = tsv.buff.buffptr; // next char may be matchBegin return tsv;