Mercurial > hg > Applications > Grep
comparison 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 |
comparison
equal
deleted
inserted
replaced
173:cca8bb5aeded | 174:b9e913030a47 |
---|---|
32 putchar(n->cc->cond.w.word[i]); | 32 putchar(n->cc->cond.w.word[i]); |
33 } | 33 } |
34 printf("(%lu)\n",n->nodeNumber); | 34 printf("(%lu)\n",n->nodeNumber); |
35 } else if (n->tokenType == 'c') { | 35 } else if (n->tokenType == 'c') { |
36 printCharacterClass(n->cc,n->nodeNumber,d); | 36 printCharacterClass(n->cc,n->nodeNumber,d); |
37 } else if (n->tokenType == 'a') { | |
38 printf("%*c%c(%lu)\n",d*4, ' ',n->tokenType,n->nodeNumber); | |
37 } else { | 39 } else { |
38 printf("%*c%c(%lu)\n",d*4, ' ',n->tokenType,n->nodeNumber); | 40 printf("%*c%c\n",d*4, ' ',n->tokenType); |
39 } | 41 } |
40 | 42 |
41 if (n->right != NULL) { | 43 if (n->right != NULL) { |
42 descendTree(n->right, d+1); | 44 descendTree(n->right, d+1); |
43 } | 45 } |