Mercurial > hg > Members > masakoha > testcode
diff 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 (2015-11-24) |
parents | ec485345daf9 |
children | 166136236891 |
line wrap: on
line diff
--- a/c/regexParser/node.cc Tue Nov 24 14:38:26 2015 +0900 +++ b/c/regexParser/node.cc Tue Nov 24 17:07:08 2015 +0900 @@ -6,17 +6,19 @@ static void descendTree(NodePtr n, int d) { if (n->right != NULL) { - descendTree(n->right, d+1); + d++; + descendTree(n->right, d); d--; } if (n->tokenType == 'a') { - printf("%*c%c(%d)\n",d*4, ' ',n->Value.character,n->nodeNumber); + printf("%*c%c(%lu)\n",d*4, ' ',n->cc->cond->character,n->nodeNumber); } else { - printf("%*c%c\n",d*4, ' ',n->Value.character); + printf("%*c%c\n",d*4, ' ',n->cc->cond->character); } if (n->left != NULL) { - descendTree(n->left, d+1); + d++; + descendTree(n->left, d); d--; } }