Mercurial > hg > Applications > Grep
comparison c/regexParser/node.cc @ 120:5d29b6a1b50f testcode
include Word in Node
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 Nov 2015 20:40:30 +0900 |
parents | 31b0ba0050fa |
children | 7925e9abb078 |
comparison
equal
deleted
inserted
replaced
118:31b0ba0050fa | 120:5d29b6a1b50f |
---|---|
5 if (n->right != NULL) { | 5 if (n->right != NULL) { |
6 d++; | 6 d++; |
7 descendTree(n->right, d); | 7 descendTree(n->right, d); |
8 d--; | 8 d--; |
9 } | 9 } |
10 if (n->tokenType == 'a') { | 10 |
11 printf("%*c%s(%lu)\n",d*4, ' ',n->cc->cond->w->word,n->nodeNumber); | 11 printf("%*c%s(%lu)\n",d*4, ' ',n->cc->cond->w->word,n->nodeNumber); |
12 } else { | |
13 printf("%*c%s\n",d*4, ' ',n->cc->cond->w->word); | |
14 } | |
15 | 12 |
16 if (n->left != NULL) { | 13 if (n->left != NULL) { |
17 d++; | 14 d++; |
18 descendTree(n->left, d); | 15 descendTree(n->left, d); |
19 d--; | 16 d--; |