Mercurial > hg > Applications > Grep
diff regexParser/node.cc @ 174:b9e913030a47 pairPro
allocate nodeNumber to character and cclist (not allocate nodenumber '+' '*' '|')
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Dec 2015 18:48:11 +0900 |
parents | 3bf2c6d6d53e |
children | ef798db705e9 |
line wrap: on
line diff
--- a/regexParser/node.cc Tue Dec 22 18:14:17 2015 +0900 +++ b/regexParser/node.cc Tue Dec 22 18:48:11 2015 +0900 @@ -34,8 +34,10 @@ printf("(%lu)\n",n->nodeNumber); } else if (n->tokenType == 'c') { printCharacterClass(n->cc,n->nodeNumber,d); + } else if (n->tokenType == 'a') { + printf("%*c%c(%lu)\n",d*4, ' ',n->tokenType,n->nodeNumber); } else { - printf("%*c%c(%lu)\n",d*4, ' ',n->tokenType,n->nodeNumber); + printf("%*c%c\n",d*4, ' ',n->tokenType); } if (n->right != NULL) {