Mercurial > hg > Applications > Grep
changeset 268:0e423d9f9647
remove error (remain 1 warning(no use variable))
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 29 Jan 2016 16:06:11 +0900 |
parents | 5d4afe6f6d00 |
children | 3a95be4a5bb0 |
files | regexParser/CeriumGrep.cc regexParser/cerium/CeriumMain.cc regexParser/regexParser.h regexParser/subsetConstruction.cc regexParser/threadedSearch.cc |
diffstat | 5 files changed, 8 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/regexParser/CeriumGrep.cc Fri Jan 29 13:31:01 2016 +0900 +++ b/regexParser/CeriumGrep.cc Fri Jan 29 16:06:11 2016 +0900 @@ -9,10 +9,6 @@ #include "fileread.h" #include "threadedSearch.h" -void createAllPossibleState(TransitionGeneratorPtr tg) { - return; -} - Search grep(int argc,char **argv,bool parallel) { bool generate = true; @@ -73,10 +69,6 @@ close(fd); } - if (parallel) { - createAllPossibleState(tgv.tg); - } - s.tg = tgv.tg; return s; }
--- a/regexParser/cerium/CeriumMain.cc Fri Jan 29 13:31:01 2016 +0900 +++ b/regexParser/cerium/CeriumMain.cc Fri Jan 29 16:06:11 2016 +0900 @@ -24,7 +24,7 @@ { char *filename = 0; Search s = grep(argc,argv,true); - + FileMapReduce *fmp = new FileMapReduce(manager,TASK_EXEC,TASK_EXEC_DATA_PARALLEL,TASK_PRINT); filename = fmp->init(argc, argv); fmp->w->global = (void*)s.tg;
--- a/regexParser/regexParser.h Fri Jan 29 13:31:01 2016 +0900 +++ b/regexParser/regexParser.h Fri Jan 29 16:06:11 2016 +0900 @@ -95,9 +95,9 @@ StatePtr *stateArray; StatePtr stateList; StatePtr anyState; - tsValue stateSkip(tsValue tsv); - tsValue stateMatch(tsValue tsv); - tsValue stateNothing(tsValue tsv); + tsValue (*stateSkip)(tsValue tsv); + tsValue (*stateMatch)(tsValue tsv); + tsValue (*stateNothing)(tsValue tsv); } TransitionGenerator, *TransitionGeneratorPtr; typedef struct buffer {
--- a/regexParser/subsetConstruction.cc Fri Jan 29 13:31:01 2016 +0900 +++ b/regexParser/subsetConstruction.cc Fri Jan 29 16:06:11 2016 +0900 @@ -198,7 +198,6 @@ if (cc->left) { setState(cc->left,bi); } - cc->nextState = bi; if (cc->right) { setState(cc->right,bi); } @@ -422,8 +421,8 @@ BitVector bi = cc->nextState; if (tg->stateArray[bi.bitContainer]) continue; // already done StatePtr s = createState(tg,bi); // s is added at the end of stateList. + determinize(s,tg); tg->stateArray[bi.bitContainer] = s; - determinize(s,tg); } free(cw); }
--- a/regexParser/threadedSearch.cc Fri Jan 29 13:31:01 2016 +0900 +++ b/regexParser/threadedSearch.cc Fri Jan 29 16:06:11 2016 +0900 @@ -83,11 +83,11 @@ if (state == NULL) { // on the fly subset construction. state = createState(tsv.tg,state->bitState); + determinize(state,tsv.tg); tsv.tg->stateArray[state->bitState.bitContainer] = state; - determinize(state,tsv.tg); } if (state->tState == NULL) { - current = generateTState(state); + current = generateTState(state,tsv.tg); ccv->tState = current; } else { ccv->tState = state->tState; @@ -107,7 +107,7 @@ tsv.buff = buff; tsv.tg = tg; tsv.result = NULL; - tsv.current = generateTState(tg->stateList); + tsv.current = generateTState(tg->stateList,tg); tsv.tg->stateSkip = stateSkip; tsv.tg->stateMatch = stateMatch; tsv.tg->stateNothing = stateNothing;