Mercurial > hg > Applications > Grep
diff regexParser/transition.cc @ 190:3e8e5780ad4a pairPro
change node::State to State
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 25 Dec 2015 15:30:52 +0900 |
parents | ef798db705e9 |
children |
line wrap: on
line diff
--- a/regexParser/transition.cc Fri Dec 25 14:42:31 2015 +0900 +++ b/regexParser/transition.cc Fri Dec 25 15:30:52 2015 +0900 @@ -1,13 +1,13 @@ #include <stdlib.h> #include "transition.h" -node::StatePtr searchState(node::StatePtr stateArray, node::StatePtr state) { +StatePtr searchState(StatePtr stateArray, StatePtr state) { while(stateArray) { if (stateArray->bitState.bitContainer == state->bitState.bitContainer) { return stateArray; } if (stateArray->next == NULL) { - node::StatePtr s = createState(state->bitState); + StatePtr s = createState(state->bitState); stateArray = appendState(stateArray,s); return stateArray; } @@ -16,16 +16,16 @@ return stateArray; } -node::StatePtr createState(BitVector bi) { - node::StatePtr state = NEW(node::State); +StatePtr createState(BitVector bi) { + StatePtr state = NEW(State); state->bitState = bi; state->node = NEW(Node); return state; } -node::StatePtr appendState(node::StatePtr x,node::StatePtr y) { - node::StatePtr x0 = createState(x->bitState); - node::StatePtr x1 = x0; +StatePtr appendState(StatePtr x,StatePtr y) { + StatePtr x0 = createState(x->bitState); + StatePtr x1 = x0; for(;;) { if (x->next == NULL) { x1->next = y;