Mercurial > hg > Members > masakoha > testcode
diff regexParser/subsetConstraction.cc @ 181:3c4db09b8581 pairPro
change return value findLeftMost()
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 24 Dec 2015 18:00:55 +0900 |
parents | d97bcab546e8 |
children | dbe004d03ef0 |
line wrap: on
line diff
--- a/regexParser/subsetConstraction.cc Thu Dec 24 17:56:28 2015 +0900 +++ b/regexParser/subsetConstraction.cc Thu Dec 24 18:00:55 2015 +0900 @@ -112,7 +112,7 @@ return cc; } -CharClassWalkerPtr findLeftMost(CharClassPtr next,CharClassWalkerPtr walk) { +void findLeftMost(CharClassPtr next,CharClassWalkerPtr walk) { while (next->left) { CharClassStackPtr ccs = NEW(CharClassStack); ccs->next = walk->stack; @@ -122,7 +122,6 @@ next = next->left; } walk->next = next; - return walk; } CharClassWalkerPtr createCharClassWalker (CharClassPtr next) { @@ -134,7 +133,7 @@ walk->next = next; return walk; } - walk = findLeftMost(next,walk); + findLeftMost(next,walk); return walk; } @@ -163,12 +162,12 @@ } if (walk->stack->turn == LEFT) { walk->next = walk->stack->cc; - walk->stack->tuen == SELF; + walk->stack->turn = SELF; return current; } if (current->right) { walk->stack->turn = RIGHT; - walk->next = findLeftMost(current->right,walk); + findLeftMost(current->right,walk); return current; } charClassStackPop(walk);