Mercurial > hg > Members > masakoha > testcode
annotate regexParser/determinize.cc @ 176:c092dd0e1ae0 pairPro
implement appendState() and serchState()
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 23 Dec 2015 15:41:27 +0900 |
parents | 3bf2c6d6d53e |
children |
rev | line source |
---|---|
117
166136236891
add header files
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
116
diff
changeset
|
1 #include "determinize.h" |
111 | 2 |
3 TransitionPtr determinize(TransitionPtr cond, TransitionPtr list) { | |
4 TransitionPtr x0 = createTransition(x->condition, x->nextState); | |
5 TransitionPtr x1 = x0; | |
6 for(;;) { | |
7 if (x->next == NULL) { | |
8 x1->next = y; | |
9 return x0; | |
10 } | |
11 x = x->next; | |
12 x1->next = createTransition(x->condition, x->nextState); | |
13 x1 = x1->next; | |
14 } | |
116
66c633575b53
remove error and warning
Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
parents:
111
diff
changeset
|
15 return x0; |
111 | 16 } |