diff options
Diffstat (limited to 'lptypes.h')
-rw-r--r-- | lptypes.h | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -110,18 +110,6 @@ typedef struct Charset { | |||
110 | #define setchar(cs,b) ((cs)[(b) >> 3] |= (1 << ((b) & 7))) | 110 | #define setchar(cs,b) ((cs)[(b) >> 3] |= (1 << ((b) & 7))) |
111 | 111 | ||
112 | 112 | ||
113 | /* labeled failure begin */ | ||
114 | typedef long long int Labelset; | ||
115 | |||
116 | #define MAXLABELS (sizeof(long long int) * 8) | ||
117 | |||
118 | #define LFAIL 1 | ||
119 | |||
120 | /* set bit 'b' in set 's' */ | ||
121 | #define setlabel(s, b) ((s) |= (1ULL << (b))) | ||
122 | /* labeled failure end */ | ||
123 | |||
124 | |||
125 | /* | 113 | /* |
126 | ** in capture instructions, 'kind' of capture and its offset are | 114 | ** in capture instructions, 'kind' of capture and its offset are |
127 | ** packed in field 'aux', 4 bits for each | 115 | ** packed in field 'aux', 4 bits for each |
@@ -156,6 +144,24 @@ typedef long long int Labelset; | |||
156 | 144 | ||
157 | #define testchar(st,c) (((int)(st)[((c) >> 3)] & (1 << ((c) & 7)))) | 145 | #define testchar(st,c) (((int)(st)[((c) >> 3)] & (1 << ((c) & 7)))) |
158 | 146 | ||
147 | /* labeled failure begin */ | ||
148 | #define MAXLABELS (UCHAR_MAX + 1) | ||
149 | |||
150 | #define LABELSETSIZE CHARSETSIZE | ||
151 | |||
152 | typedef Charset Labelset; | ||
153 | |||
154 | #define setlabel setchar | ||
155 | |||
156 | #define testlabel testchar | ||
157 | |||
158 | /* access to labelset */ | ||
159 | #define treelabelset(t) ((byte *)((t) + (t)->u.s.plab)) | ||
160 | |||
161 | #define IDXLFAIL 0 | ||
162 | |||
163 | #define testlabel testchar | ||
164 | /* labeled failure end */ | ||
159 | 165 | ||
160 | #endif | 166 | #endif |
161 | 167 | ||