Mercurial > hg > Applications > Grep
diff regexParser/subsetConstraction.cc @ 198:35608dc85e83
add test
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 26 Dec 2015 17:23:25 +0900 |
parents | 4fefd80c05f2 |
children | b8bc24abaf8a |
line wrap: on
line diff
--- a/regexParser/subsetConstraction.cc Sat Dec 26 13:51:11 2015 +0900 +++ b/regexParser/subsetConstraction.cc Sat Dec 26 17:23:25 2015 +0900 @@ -229,6 +229,7 @@ TGValue stateAllocate(NodePtr n,TGValue tgv) { if (n->tokenType == '+') { TGValue tgvLeft = stateAllocate(n->left,tgv); + n->left->state = createState(tgvLeft,n->left); if (tgvLeft.asterisk) { TGValue tgvRight = tgvLeft; tgvRight.asterisk = false; @@ -339,9 +340,12 @@ printf("state : %lx\n",state->bitState.bitContainer); long nodeNumber = 0; if (state->node) { - printf("node : %c %lx -> %d\n",state->node->tokenType,state->bitState.bitContainer,state->node->nextStateNum); + if (state->node->nextState) { + printf("node : %c %lx -> %lx\n",state->node->tokenType, + state->bitState.bitContainer,state->node->nextState->bitState.bitContainer); if (state->node->state) nodeNumber = state->node->state->bitState.bitContainer; + } } if (state->cc) { printCharacterClass(state->cc,nodeNumber,4);