Mercurial > hg > Applications > Grep
diff c/regexParser/subsetConstraction.cc @ 139:6c258910cacb pairPro
remove some warning and error
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Dec 2015 02:20:13 +0900 |
parents | c292c67b3100 |
children | 71f36a59cf6a |
line wrap: on
line diff
--- a/c/regexParser/subsetConstraction.cc Sun Dec 06 15:54:05 2015 +0900 +++ b/c/regexParser/subsetConstraction.cc Mon Dec 07 02:20:13 2015 +0900 @@ -3,35 +3,21 @@ #include <ctype.h> #include "subsetConstraction.h" -typedef struct transitionGenerator { - TransitionListPtr tl; - StatePtr state; - long stateMax; -} TransitionGenerator, *TransitionGeneratorPtr; - -typedef struct tgValue { - TransitionListPtr tl; - bool asterisk; -} TGValue, *TGValuePtr; - -TGValue generateTransitionList(NodePtr n,TransitionGeneretorPtr tg) { - +TGValuePtr generateTransition(NodePtr n,TransitionGeneratorPtr tg) { + TGValuePtr t = NULL; if (n->left != NULL) { - TGValue tl = generateTransitionList(n->left, tg); + t = generateTransition(n->left, tg); } if (n->tokenType == 'a') { - 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); + } else if (n->tokenType == 'c') { - TGValue tl = generateTransitionList(n->cc,tg); + t = generateTransition(n,tg); } else { - printf("%*c%c(%lu)\n",d*4, ' ',n->tokenType,n->nodeNumber); + } if (n->right != NULL) { - TGValue tl = generateTransitionList(n->right, tg); + t = generateTransition(n->right, tg); } + return t; }