Mercurial > hg > Applications > Grep
comparison regexParser/transition.h @ 169:313f1c176328 pairPro
implement mergeTransition
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Dec 2015 19:06:35 +0900 |
parents | 3bf2c6d6d53e |
children | 540fc12871d9 |
comparison
equal
deleted
inserted
replaced
168:6b31d6ef9ba4 | 169:313f1c176328 |
---|---|
1 #include "bitVector.h" | 1 #include "bitVector.h" |
2 | 2 |
3 typedef struct transition { | 3 typedef struct transition { |
4 CharClassPtr condition; | 4 CharClassPtr condition; |
5 BitVectorPtr nextState; | |
6 struct transition *next; | 5 struct transition *next; |
7 } Transition, *TransitionPtr; | 6 } Transition, *TransitionPtr; |
8 | 7 |
9 typedef struct state { | 8 typedef struct state { |
10 BitVectorPtr bitState; | |
11 TransitionPtr transition; | 9 TransitionPtr transition; |
12 struct state *next; | 10 struct state *next; |
13 } State, *StatePtr; | 11 } State, *StatePtr; |
14 | 12 |
15 StatePtr createState(BitVectorPtr bi, TransitionPtr ts, StatePtr next); | 13 StatePtr createState(BitVectorPtr bi, TransitionPtr ts, StatePtr next); |
16 StatePtr appendState(StatePtr x, StatePtr y); | 14 StatePtr appendState(StatePtr x, StatePtr y); |
17 TransitionPtr createTransition(CharClassPtr cc ,BitVectorPtr state); | 15 TransitionPtr createTransition(CharClassPtr cc); |
18 TransitionPtr appendTransition0(TransitionPtr curr,TransitionPtr next); | 16 TransitionPtr appendTransition0(TransitionPtr curr,TransitionPtr next); |
19 TransitionPtr appendTransition(TransitionPtr curr,TransitionPtr next); | 17 TransitionPtr appendTransition(TransitionPtr curr,TransitionPtr next); |
20 | 18 |
21 /* | 19 /* |
22 正規表現木を辿って transition のList をつくる | 20 正規表現木を辿って transition のList をつくる |