Mercurial > hg > Applications > Grep
diff regexParser/subsetConstruction.cc @ 241:87ad91af8a15
turn initialization in charclasswalk
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Jan 2016 20:28:40 +0900 |
parents | f5931151d70c |
children | 7189d24dd45e |
line wrap: on
line diff
--- a/regexParser/subsetConstruction.cc Wed Jan 20 18:20:48 2016 +0900 +++ b/regexParser/subsetConstruction.cc Wed Jan 20 20:28:40 2016 +0900 @@ -124,6 +124,7 @@ CharClassWalkerPtr walk = NEW(CharClassWalker); walk->next = NULL; walk->stack = NULL; + walk->turn = LEFT; if (!next) return walk; findLeftMost(next,walk); return walk; @@ -225,6 +226,7 @@ if (n->tokenType == '+') { TGValue tgvLeft = tgv; tgvLeft.endState = n->right->state; + if (pass==2) n->right->state->accept = tgv.endState->accept; tgvLeft.asterisk = NULL; tgvLeft = generateTransition(n->left,tgvLeft,pass); TGValue tgvRight = tgv; @@ -393,6 +395,7 @@ s->cc = merge; } } + free(cw); } return scv; }