Mercurial > hg > Members > masakoha > testcode
changeset 244:a3cddb32b87f
change condition in generateTransition
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 21 Jan 2016 18:11:59 +0900 |
parents | 7189d24dd45e |
children | d34de5edaa96 |
files | regexParser/sequentialSearch.cc regexParser/subsetConstruction.cc |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/regexParser/sequentialSearch.cc Thu Jan 21 16:22:18 2016 +0900 +++ b/regexParser/sequentialSearch.cc Thu Jan 21 18:11:59 2016 +0900 @@ -16,7 +16,7 @@ void stateMatch(Buffer buff) { fwrite(buff.matchBegin,buff.buffptr-buff.matchBegin,1,stdout); - puts("\n"); + puts(""); stateSkip(buff); }
--- a/regexParser/subsetConstruction.cc Thu Jan 21 16:22:18 2016 +0900 +++ b/regexParser/subsetConstruction.cc Thu Jan 21 18:11:59 2016 +0900 @@ -268,7 +268,7 @@ n->nextStateNum = nextState; n->nextState = tgv.endState; BitVector bi = createBitVector(nextState); - if (n->nextState->accept) bi = bitSet(bi,1); + if (n->nextState->accept && n->nextState->node->tokenType == '*') bi = bitSet(bi,1); setState(n->cc,bi); tgv1.startState->cc = mergeTransition(tgv1.startState,n->cc); }