changeset 131:a436526756b9 pairPro

fix printTree
author masa
date Wed, 02 Dec 2015 18:01:32 +0900
parents 7925e9abb078
children fb4c8adf3a80
files c/regexParser/node.cc
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/c/regexParser/node.cc	Wed Dec 02 17:51:02 2015 +0900
+++ b/c/regexParser/node.cc	Wed Dec 02 18:01:32 2015 +0900
@@ -10,7 +10,11 @@
     if (n->tokenType != 'a') {
         printf("%*c%c(%lu)\n",d*4, ' ',n->tokenType,n->nodeNumber);
     } else {
-        printf("%*c%s(%lu)\n",d*4, ' ',n->cc->cond->w->word,n->nodeNumber);
+        printf("%*c",d*4, ' ');
+        for (int i = 0; i < n->cc->cond->w->length; i++) {
+            putchar(n->cc->cond->w->word[i]);
+        }
+        printf("(%lu)\n",n->nodeNumber);
     }
 
     if (n->left != NULL) {