comparison regexParser/regexParser.h @ 292:868f01f1ba8e

maximum match
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 01 Feb 2016 21:52:57 +0900
parents f2491681914e
children 3e78631a6222
comparison
equal deleted inserted replaced
291:1b75546ff65f 292:868f01f1ba8e
59 } CCV,*CCVPtr; 59 } CCV,*CCVPtr;
60 60
61 typedef struct tState { 61 typedef struct tState {
62 State *state; 62 State *state;
63 tsValue (*stateSkip)(tsValue); 63 tsValue (*stateSkip)(tsValue);
64 tsValue (*stateContinue)(tsValue); 64 tsValue (*stateMatch)(tsValue);
65 int ccvSize; 65 int ccvSize;
66 CCVPtr ccv; 66 CCVPtr ccv;
67 } TState, *TStatePtr; 67 } TState, *TStatePtr;
68 68
69 typedef struct result { 69 typedef struct result {
105 105
106 typedef struct buffer { 106 typedef struct buffer {
107 unsigned char *buff; 107 unsigned char *buff;
108 unsigned char *buffptr; 108 unsigned char *buffptr;
109 unsigned char *buffend; 109 unsigned char *buffend;
110 unsigned char *matchBegin;
111 } Buffer, *BufferPtr; 110 } Buffer, *BufferPtr;
112 111
113 typedef struct tsValue { 112 typedef struct blockOutput {
114 Buffer buff;
115 ResultPtr result; 113 ResultPtr result;
116 ResultPtr *resultEnd; 114 ResultPtr *resultEnd;
117 TransitionGeneratorPtr tg;
118 TState *current;
119 TState *blockBegin; 115 TState *blockBegin;
120 TState *blockEnd; 116 TState *blockEnd;
117 } BlockOutput, *BlockOutputPtr;
118
119 typedef struct tsValue {
120 TState *current;
121 Buffer buff;
122 unsigned char *matchBegin;
123 unsigned char *matchEnd;
124 BlockOutputPtr blk;
125 TransitionGeneratorPtr tg;
121 } TSValue, *TSValuePtr; 126 } TSValue, *TSValuePtr;
122 127
123 typedef struct tgValue { 128 typedef struct tgValue {
124 StatePtr asterisk; // last * state of the expression 129 StatePtr asterisk; // last * state of the expression
125 StatePtr startState; // startState of the expression 130 StatePtr startState; // startState of the expression