Mercurial > hg > Applications > Grep
comparison c/regexParser/node.cc @ 116:66c633575b53 pairPro
remove error and warning
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 24 Nov 2015 17:07:08 +0900 |
parents | ec485345daf9 |
children | 166136236891 |
comparison
equal
deleted
inserted
replaced
115:ca30f8334741 | 116:66c633575b53 |
---|---|
4 static void descendTree(NodePtr,int); | 4 static void descendTree(NodePtr,int); |
5 void printTree(NodePtr); | 5 void printTree(NodePtr); |
6 | 6 |
7 static void descendTree(NodePtr n, int d) { | 7 static void descendTree(NodePtr n, int d) { |
8 if (n->right != NULL) { | 8 if (n->right != NULL) { |
9 descendTree(n->right, d+1); | 9 d++; |
10 descendTree(n->right, d); | |
10 d--; | 11 d--; |
11 } | 12 } |
12 if (n->tokenType == 'a') { | 13 if (n->tokenType == 'a') { |
13 printf("%*c%c(%d)\n",d*4, ' ',n->Value.character,n->nodeNumber); | 14 printf("%*c%c(%lu)\n",d*4, ' ',n->cc->cond->character,n->nodeNumber); |
14 } else { | 15 } else { |
15 printf("%*c%c\n",d*4, ' ',n->Value.character); | 16 printf("%*c%c\n",d*4, ' ',n->cc->cond->character); |
16 } | 17 } |
17 | 18 |
18 if (n->left != NULL) { | 19 if (n->left != NULL) { |
19 descendTree(n->left, d+1); | 20 d++; |
21 descendTree(n->left, d); | |
20 d--; | 22 d--; |
21 } | 23 } |
22 } | 24 } |
23 | 25 |
24 void printTree(NodePtr n) { | 26 void printTree(NodePtr n) { |