Mercurial > hg > Applications > Grep
diff regexParser/node.cc @ 217:a9e3512120e2
NFA generation end
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 30 Dec 2015 18:37:01 +0900 |
parents | 4852bfa85db4 |
children | 3e78631a6222 |
line wrap: on
line diff
--- a/regexParser/node.cc Wed Dec 30 15:05:06 2015 +0900 +++ b/regexParser/node.cc Wed Dec 30 18:37:01 2015 +0900 @@ -33,8 +33,10 @@ for (int i = 0; i < n->cc->cond.w.length; i++) { putchar(n->cc->cond.w.word[i]); } - if (n->state) { + if (n->state && n->nextState) { printf("(%ld)->(%ld)\n",n->state->bitState.bitContainer,n->nextState->bitState.bitContainer); + } else if (n->state) { + printf("(%ld)\n",n->state->bitState.bitContainer); } else { printf("\n"); }