diff c/regexParser/createRegexParser.cc @ 97:0b6940588e88 impl-bitvector

add node->parent
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Tue, 10 Nov 2015 16:18:06 +0900
parents 1cdad0468484
children 1e5b56e8263b
line wrap: on
line diff
--- a/c/regexParser/createRegexParser.cc	Tue Nov 10 15:36:33 2015 +0900
+++ b/c/regexParser/createRegexParser.cc	Tue Nov 10 16:18:06 2015 +0900
@@ -23,6 +23,11 @@
     n->left = left;
     n->right = right;
 
+    if (ri->tokenType != 'a') {
+        n->right = right;
+        n->left->parent = n->right->parent = n->self;
+    }
+
     if (ri->tokenType == 'a') {
         n->nodeNumber = ri->nodeNumber;
         ri->nodeNumber++;