Mercurial > hg > Members > masakoha > testcode
view c/regexParser/determinize.cc @ 111:1d30f70702df pairPro
add determinize.cc and transition.cc
author | masa |
---|---|
date | Sat, 21 Nov 2015 18:04:25 +0900 (2015-11-21) |
parents | |
children | 66c633575b53 |
line wrap: on
line source
#include "transition.h" TransitionPtr determinize(TransitionPtr cond, TransitionPtr list) { TransitionPtr x0 = createTransition(x->condition, x->nextState); TransitionPtr x1 = x0; for(;;) { if (x->next == NULL) { x1->next = y; return x0; } x = x->next; x1->next = createTransition(x->condition, x->nextState); x1 = x1->next; } return x0; }