Mercurial > hg > Members > masakoha > testcode
changeset 72:c4b934048e2a
remove printNodeDate
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 27 Aug 2015 15:37:46 +0900 |
parents | 58d2b10988c9 |
children | 0a5dd7486bb2 |
files | c/regexParser/main.cc |
diffstat | 1 files changed, 2 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/c/regexParser/main.cc Tue Aug 25 20:56:26 2015 +0900 +++ b/c/regexParser/main.cc Thu Aug 27 15:37:46 2015 +0900 @@ -55,24 +55,12 @@ return true; } -void printNodeDate(NodePtr n) { - puts("---------------------"); - printf("Self Node char : %c\n", n->Value.character); - printf("Self Node addr : %p\n", n->self); - printf("left Node addr : %p\n", n->left); - printf("right Node addr : %p\n", n->right); - puts("---------------------"); - puts(""); -} - NodePtr createNode(unsigned char character, NodePtr left, NodePtr right) { NodePtr n = (NodePtr)malloc(sizeof(Node)); n->self = n; n->Value.character = character; n->left = left; n->right = right; - - printNodeDate(n); return n; } @@ -187,27 +175,6 @@ } } return n; } -/* - * e.g. - * - * % ./regexParser -regex abc - * c - * + - * b - * + - * a - * - * % ./regexParser -regex (a*|bc)d - * - * d - * + - * c - * + - * b - * | - * * - * a - */ void descendTree(NodePtr n) { static int d = 0; @@ -225,7 +192,9 @@ } void printTree(NodePtr n) { + puts("---Print Node----"); descendTree(n); + puts("-----------------"); }