comparison regexParser/regexParser.h @ 184:1da1b2eacb84 pairPro

gather struct
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Thu, 24 Dec 2015 20:09:21 +0900
parents 7ae0a3070647
children 3e8aae8beba9
comparison
equal deleted inserted replaced
183:7ae0a3070647 184:1da1b2eacb84
4 #define SYNTAX_NODENUMBER 100 4 #define SYNTAX_NODENUMBER 100
5 5
6 typedef struct bitVector { 6 typedef struct bitVector {
7 unsigned long bitContainer; 7 unsigned long bitContainer;
8 }BitVector,*BitVectorPtr; 8 }BitVector,*BitVectorPtr;
9
10 typedef struct stateStack {
11 BitVector state;
12 struct stateStack *next;
13 } StateStack, *StateStackPtr;
14
15 typedef struct transitionGenerator {
16 long stateMax;
17 StateStack stack;
18 StatePtr state;
19 StatePtr stateArray;
20 StatePtr stateArrayLast;
21 StatePtr currentState;
22 StatePtr nextState;
23 } TransitionGenerator, *TransitionGeneratorPtr;
24
25 typedef struct tgValue {
26 bool asterisk;
27 int stateBegin;
28 int stateEnd;
29 TransitionGeneratorPtr tg;
30 } TGValue, *TGValuePtr;
31
32 enum charClassStackState {
33 LEFT,
34 SELF,
35 RIGHT
36 };
37
38 typedef struct charClassStack {
39 charClassStackState turn;
40 CharClassPtr cc;
41 struct charClassStack *next;
42 } CharClassStack, *CharClassStackPtr;
43
44 typedef struct charClassWalker {
45 CharClassStackPtr stack;
46 CharClassPtr next;
47 } CharClassWalker, *CharClassWalkerPtr;
9 48
10 typedef struct word { 49 typedef struct word {
11 unsigned char *word; 50 unsigned char *word;
12 int length; 51 int length;
13 } Word, *WordPtr; 52 } Word, *WordPtr;
40 StatePtr state; 79 StatePtr state;
41 struct node *left; 80 struct node *left;
42 struct node *right; 81 struct node *right;
43 } Node, *NodePtr; 82 } Node, *NodePtr;
44 83
84 typedef struct state {
85 BitVector bitState;
86 CharClassPtr cc;
87 NodePtr node;
88 struct state *next;
89 } State, *StatePtr;
90
45 typedef struct regexInfo { 91 typedef struct regexInfo {
46 unsigned char *ptr; 92 unsigned char *ptr;
47 unsigned char tokenType; 93 unsigned char tokenType;
48 unsigned char *tokenValue; 94 unsigned char *tokenValue;
49 int stateNumber; 95 int stateNumber;