diff regexParser/subsetConstraction.cc @ 188:109d22faf7b5 pairPro

remove errors and warnings
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Fri, 25 Dec 2015 02:57:21 +0900
parents ef798db705e9
children fccf7941ecc2
line wrap: on
line diff
--- a/regexParser/subsetConstraction.cc	Thu Dec 24 22:38:50 2015 +0900
+++ b/regexParser/subsetConstraction.cc	Fri Dec 25 02:57:21 2015 +0900
@@ -35,7 +35,7 @@
     // 変更があった場合は新しくリストを作って返す
     if (end < cc->cond.range.begin ) { // 1
         if (cc->left) {
-            return createCharClassRange(cc->cond.range.begin,cc->cond.range.end,charClassMerge(cc->left,begin,end,nextState),cc->right);
+            return createCharClassRange(cc->cond.range.begin,cc->cond.range.end,nextState.bitContainer,charClassMerge(cc->left,begin,end,nextState),cc->right);
         } else {
             return createCharClassRange(begin,end,nextState.bitContainer,NULL,cc);
         }
@@ -75,7 +75,7 @@
     }
     if (begin > cc->cond.range.end ) { // 13
         if (cc->right) {
-            return createCharClassRange(cc->cond.range.begin,cc->cond.range.end,cc->left,charClassMerge(cc->right,begin,end,nextState));
+            return createCharClassRange(cc->cond.range.begin,cc->cond.range.end,nextState.bitContainer,cc->left,charClassMerge(cc->right,begin,end,nextState));
         } else {
             return createCharClassRange(begin,end,nextState.bitContainer,cc,NULL);
         }
@@ -237,7 +237,6 @@
         TGValue tgRight = tgLeft;
         tgRight.stateBegin = ++tgRight.stateNum;
         n->right->state = createState(tgRight,n->right);
-        TGValue tgv1 = stateAllocate(n->right,tgLeft);
         return tgLeft;
     } else if (n->tokenType == '|') {
         TGValue tgv  = stateAllocate(n->left,tg);
@@ -316,9 +315,9 @@
     TGValue tgv;
     tgv.asterisk = false;
     tgv.tg = tg;
-    node::StatePtr start = createState(tgv,n);
+    tgv.tg->startState = createState(tgv,n);
     NodePtr eof = createNode(NULL,'e',NULL,NULL,NULL);
-    node::StatePtr end = createState(tgv,eof);
+    tgv.tg->endState = createState(tgv,eof);
     tgv.stateBegin = 0;
     tgv.stateEnd = 1;
     stateAllocate(n,tgv);