Mercurial > hg > Applications > Grep
view 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 |
line wrap: on
line source
#include <stdio.h> #include "regexParser.h" static void descendTree(NodePtr,int); void printTree(NodePtr); static void descendTree(NodePtr n, int d) { if (n->right != NULL) { d++; descendTree(n->right, d); d--; } if (n->tokenType == 'a') { printf("%*c%c(%lu)\n",d*4, ' ',n->cc->cond->character,n->nodeNumber); } else { printf("%*c%c\n",d*4, ' ',n->cc->cond->character); } if (n->left != NULL) { d++; descendTree(n->left, d); d--; } } void printTree(NodePtr n) { puts("---Print Node----"); int d = 0; descendTree(n,d); puts("-----------------"); }