Commit | Line | Data |
---|---|---|
37442d52 RGS |
1 | /* -*- buffer-read-only: t -*- |
2 | !!!!!!! DO NOT EDIT THIS FILE !!!!!!! | |
885f9e59 | 3 | This file is built by regcomp.pl from regcomp.sym. |
d09b2d29 IZ |
4 | Any changes made here will be lost! |
5 | */ | |
6 | ||
6bda09f9 YO |
7 | /* Regops and State definitions */ |
8 | ||
24b23f37 YO |
9 | #define REGNODE_MAX 78 |
10 | #define REGMATCH_STATE_MAX 110 | |
03363afd | 11 | |
f9f4320a YO |
12 | #define END 0 /* 0000 End of program. */ |
13 | #define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */ | |
14 | #define BOL 2 /* 0x02 Match "" at beginning of line. */ | |
15 | #define MBOL 3 /* 0x03 Same, assuming multiline. */ | |
16 | #define SBOL 4 /* 0x04 Same, assuming singleline. */ | |
17 | #define EOS 5 /* 0x05 Match "" at end of string. */ | |
18 | #define EOL 6 /* 0x06 Match "" at end of line. */ | |
19 | #define MEOL 7 /* 0x07 Same, assuming multiline. */ | |
20 | #define SEOL 8 /* 0x08 Same, assuming singleline. */ | |
21 | #define BOUND 9 /* 0x09 Match "" at any word boundary */ | |
22 | #define BOUNDL 10 /* 0x0a Match "" at any word boundary */ | |
23 | #define NBOUND 11 /* 0x0b Match "" at any word non-boundary */ | |
24 | #define NBOUNDL 12 /* 0x0c Match "" at any word non-boundary */ | |
25 | #define GPOS 13 /* 0x0d Matches where last m//g left off. */ | |
26 | #define REG_ANY 14 /* 0x0e Match any one character (except newline). */ | |
27 | #define SANY 15 /* 0x0f Match any one character. */ | |
28 | #define CANY 16 /* 0x10 Match any one byte. */ | |
29 | #define ANYOF 17 /* 0x11 Match character in (or not in) this class. */ | |
30 | #define ALNUM 18 /* 0x12 Match any alphanumeric character */ | |
31 | #define ALNUML 19 /* 0x13 Match any alphanumeric char in locale */ | |
32 | #define NALNUM 20 /* 0x14 Match any non-alphanumeric character */ | |
33 | #define NALNUML 21 /* 0x15 Match any non-alphanumeric char in locale */ | |
34 | #define SPACE 22 /* 0x16 Match any whitespace character */ | |
35 | #define SPACEL 23 /* 0x17 Match any whitespace char in locale */ | |
36 | #define NSPACE 24 /* 0x18 Match any non-whitespace character */ | |
37 | #define NSPACEL 25 /* 0x19 Match any non-whitespace char in locale */ | |
38 | #define DIGIT 26 /* 0x1a Match any numeric character */ | |
39 | #define DIGITL 27 /* 0x1b Match any numeric character in locale */ | |
40 | #define NDIGIT 28 /* 0x1c Match any non-numeric character */ | |
41 | #define NDIGITL 29 /* 0x1d Match any non-numeric character in locale */ | |
42 | #define CLUMP 30 /* 0x1e Match any combining character sequence */ | |
43 | #define BRANCH 31 /* 0x1f Match this alternative, or the next... */ | |
44 | #define BACK 32 /* 0x20 Match "", "next" ptr points backward. */ | |
45 | #define EXACT 33 /* 0x21 Match this string (preceded by length). */ | |
46 | #define EXACTF 34 /* 0x22 Match this string, folded (prec. by length). */ | |
47 | #define EXACTFL 35 /* 0x23 Match this string, folded in locale (w/len). */ | |
48 | #define NOTHING 36 /* 0x24 Match empty string. */ | |
49 | #define TAIL 37 /* 0x25 Match empty string. Can jump here from outside. */ | |
50 | #define STAR 38 /* 0x26 Match this (simple) thing 0 or more times. */ | |
51 | #define PLUS 39 /* 0x27 Match this (simple) thing 1 or more times. */ | |
52 | #define CURLY 40 /* 0x28 Match this simple thing {n,m} times. */ | |
40d049e4 YO |
53 | #define CURLYN 41 /* 0x29 Capture next-after-this simple thing */ |
54 | #define CURLYM 42 /* 0x2a Capture this medium-complex thing {n,m} times. */ | |
f9f4320a YO |
55 | #define CURLYX 43 /* 0x2b Match this complex thing {n,m} times. */ |
56 | #define WHILEM 44 /* 0x2c Do curly processing and see if rest matches. */ | |
57 | #define OPEN 45 /* 0x2d Mark this point in input as start of */ | |
58 | #define CLOSE 46 /* 0x2e Analogous to OPEN. */ | |
59 | #define REF 47 /* 0x2f Match some already matched string */ | |
60 | #define REFF 48 /* 0x30 Match already matched string, folded */ | |
61 | #define REFFL 49 /* 0x31 Match already matched string, folded in loc. */ | |
62 | #define IFMATCH 50 /* 0x32 Succeeds if the following matches. */ | |
63 | #define UNLESSM 51 /* 0x33 Fails if the following matches. */ | |
64 | #define SUSPEND 52 /* 0x34 "Independent" sub-RE. */ | |
65 | #define IFTHEN 53 /* 0x35 Switch, should be preceeded by switcher . */ | |
66 | #define GROUPP 54 /* 0x36 Whether the group matched. */ | |
67 | #define LONGJMP 55 /* 0x37 Jump far away. */ | |
68 | #define BRANCHJ 56 /* 0x38 BRANCH with long offset. */ | |
69 | #define EVAL 57 /* 0x39 Execute some Perl code. */ | |
70 | #define MINMOD 58 /* 0x3a Next operator is not greedy. */ | |
71 | #define LOGICAL 59 /* 0x3b Next opcode should set the flag only. */ | |
72 | #define RENUM 60 /* 0x3c Group with independently numbered parens. */ | |
73 | #define TRIE 61 /* 0x3d Match many EXACT(FL?)? at once. flags==type */ | |
74 | #define TRIEC 62 /* 0x3e Same as TRIE, but with embedded charclass data */ | |
75 | #define AHOCORASICK 63 /* 0x3f Aho Corasick stclass. flags==type */ | |
76 | #define AHOCORASICKC 64 /* 0x40 Same as AHOCORASICK, but with embedded charclass data */ | |
1a147d38 YO |
77 | #define GOSUB 65 /* 0x41 recurse to paren arg1 at (signed) ofs arg2 */ |
78 | #define GOSTART 66 /* 0x42 recurse to start of pattern */ | |
81714fb9 YO |
79 | #define NREF 67 /* 0x43 Match some already matched string */ |
80 | #define NREFF 68 /* 0x44 Match already matched string, folded */ | |
81 | #define NREFFL 69 /* 0x45 Match already matched string, folded in loc. */ | |
0a4db386 | 82 | #define NGROUPP 70 /* 0x46 Whether the group matched. */ |
1a147d38 | 83 | #define INSUBP 71 /* 0x47 Whether we are in a specific recurse. */ |
0a4db386 | 84 | #define DEFINEP 72 /* 0x48 Never execute directly. */ |
7f69552c | 85 | #define OPFAIL 73 /* 0x49 Same as (?!) */ |
54612592 | 86 | #define COMMIT 74 /* 0x4a Pattern fails if backtracking through this */ |
24b23f37 YO |
87 | #define CUT 75 /* 0x4b ... and restarts at the cursor point */ |
88 | #define OPERROR 76 /* 0x4c Pattern fails outright if backtracking through this */ | |
89 | #define OPTIMIZED 77 /* 0x4d Placeholder for dump. */ | |
90 | #define PSEUDO 78 /* 0x4e Pseudo opcode for internal use. */ | |
03363afd | 91 | /* ------------ States ------------- */ |
24b23f37 YO |
92 | #define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */ |
93 | #define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */ | |
94 | #define EVAL_AB (REGNODE_MAX + 3) /* state for EVAL */ | |
95 | #define EVAL_AB_fail (REGNODE_MAX + 4) /* state for EVAL */ | |
96 | #define CURLYX_end (REGNODE_MAX + 5) /* state for CURLYX */ | |
97 | #define CURLYX_end_fail (REGNODE_MAX + 6) /* state for CURLYX */ | |
98 | #define WHILEM_A_pre (REGNODE_MAX + 7) /* state for WHILEM */ | |
99 | #define WHILEM_A_pre_fail (REGNODE_MAX + 8) /* state for WHILEM */ | |
100 | #define WHILEM_A_min (REGNODE_MAX + 9) /* state for WHILEM */ | |
101 | #define WHILEM_A_min_fail (REGNODE_MAX + 10) /* state for WHILEM */ | |
102 | #define WHILEM_A_max (REGNODE_MAX + 11) /* state for WHILEM */ | |
103 | #define WHILEM_A_max_fail (REGNODE_MAX + 12) /* state for WHILEM */ | |
104 | #define WHILEM_B_min (REGNODE_MAX + 13) /* state for WHILEM */ | |
105 | #define WHILEM_B_min_fail (REGNODE_MAX + 14) /* state for WHILEM */ | |
106 | #define WHILEM_B_max (REGNODE_MAX + 15) /* state for WHILEM */ | |
107 | #define WHILEM_B_max_fail (REGNODE_MAX + 16) /* state for WHILEM */ | |
108 | #define BRANCH_next (REGNODE_MAX + 17) /* state for BRANCH */ | |
109 | #define BRANCH_next_fail (REGNODE_MAX + 18) /* state for BRANCH */ | |
110 | #define CURLYM_A (REGNODE_MAX + 19) /* state for CURLYM */ | |
111 | #define CURLYM_A_fail (REGNODE_MAX + 20) /* state for CURLYM */ | |
112 | #define CURLYM_B (REGNODE_MAX + 21) /* state for CURLYM */ | |
113 | #define CURLYM_B_fail (REGNODE_MAX + 22) /* state for CURLYM */ | |
114 | #define IFMATCH_A (REGNODE_MAX + 23) /* state for IFMATCH */ | |
115 | #define IFMATCH_A_fail (REGNODE_MAX + 24) /* state for IFMATCH */ | |
116 | #define CURLY_B_min_known (REGNODE_MAX + 25) /* state for CURLY */ | |
117 | #define CURLY_B_min_known_fail (REGNODE_MAX + 26) /* state for CURLY */ | |
118 | #define CURLY_B_min (REGNODE_MAX + 27) /* state for CURLY */ | |
119 | #define CURLY_B_min_fail (REGNODE_MAX + 28) /* state for CURLY */ | |
120 | #define CURLY_B_max (REGNODE_MAX + 29) /* state for CURLY */ | |
121 | #define CURLY_B_max_fail (REGNODE_MAX + 30) /* state for CURLY */ | |
122 | #define COMMIT_next (REGNODE_MAX + 31) /* state for COMMIT */ | |
123 | #define COMMIT_next_fail (REGNODE_MAX + 32) /* state for COMMIT */ | |
03363afd | 124 | |
6bda09f9 | 125 | /* PL_regkind[] What type of regop or state is this. */ |
d09b2d29 IZ |
126 | |
127 | #ifndef DOINIT | |
22c35a8c | 128 | EXTCONST U8 PL_regkind[]; |
d09b2d29 | 129 | #else |
22c35a8c | 130 | EXTCONST U8 PL_regkind[] = { |
1a147d38 YO |
131 | END, /* END */ |
132 | END, /* SUCCEED */ | |
133 | BOL, /* BOL */ | |
134 | BOL, /* MBOL */ | |
135 | BOL, /* SBOL */ | |
136 | EOL, /* EOS */ | |
137 | EOL, /* EOL */ | |
138 | EOL, /* MEOL */ | |
139 | EOL, /* SEOL */ | |
140 | BOUND, /* BOUND */ | |
141 | BOUND, /* BOUNDL */ | |
142 | NBOUND, /* NBOUND */ | |
143 | NBOUND, /* NBOUNDL */ | |
144 | GPOS, /* GPOS */ | |
145 | REG_ANY, /* REG_ANY */ | |
146 | REG_ANY, /* SANY */ | |
147 | REG_ANY, /* CANY */ | |
148 | ANYOF, /* ANYOF */ | |
149 | ALNUM, /* ALNUM */ | |
150 | ALNUM, /* ALNUML */ | |
151 | NALNUM, /* NALNUM */ | |
152 | NALNUM, /* NALNUML */ | |
153 | SPACE, /* SPACE */ | |
154 | SPACE, /* SPACEL */ | |
155 | NSPACE, /* NSPACE */ | |
156 | NSPACE, /* NSPACEL */ | |
157 | DIGIT, /* DIGIT */ | |
158 | DIGIT, /* DIGITL */ | |
159 | NDIGIT, /* NDIGIT */ | |
160 | NDIGIT, /* NDIGITL */ | |
161 | CLUMP, /* CLUMP */ | |
162 | BRANCH, /* BRANCH */ | |
163 | BACK, /* BACK */ | |
164 | EXACT, /* EXACT */ | |
165 | EXACT, /* EXACTF */ | |
166 | EXACT, /* EXACTFL */ | |
167 | NOTHING, /* NOTHING */ | |
168 | NOTHING, /* TAIL */ | |
169 | STAR, /* STAR */ | |
170 | PLUS, /* PLUS */ | |
171 | CURLY, /* CURLY */ | |
172 | CURLY, /* CURLYN */ | |
173 | CURLY, /* CURLYM */ | |
174 | CURLY, /* CURLYX */ | |
175 | WHILEM, /* WHILEM */ | |
176 | OPEN, /* OPEN */ | |
177 | CLOSE, /* CLOSE */ | |
178 | REF, /* REF */ | |
179 | REF, /* REFF */ | |
180 | REF, /* REFFL */ | |
181 | BRANCHJ, /* IFMATCH */ | |
182 | BRANCHJ, /* UNLESSM */ | |
183 | BRANCHJ, /* SUSPEND */ | |
184 | BRANCHJ, /* IFTHEN */ | |
185 | GROUPP, /* GROUPP */ | |
186 | LONGJMP, /* LONGJMP */ | |
187 | BRANCHJ, /* BRANCHJ */ | |
188 | EVAL, /* EVAL */ | |
189 | MINMOD, /* MINMOD */ | |
190 | LOGICAL, /* LOGICAL */ | |
191 | BRANCHJ, /* RENUM */ | |
192 | TRIE, /* TRIE */ | |
193 | TRIE, /* TRIEC */ | |
194 | TRIE, /* AHOCORASICK */ | |
195 | TRIE, /* AHOCORASICKC */ | |
196 | GOSUB, /* GOSUB */ | |
197 | GOSTART, /* GOSTART */ | |
198 | NREF, /* NREF */ | |
199 | NREF, /* NREFF */ | |
200 | NREF, /* NREFFL */ | |
201 | NGROUPP, /* NGROUPP */ | |
202 | INSUBP, /* INSUBP */ | |
203 | DEFINEP, /* DEFINEP */ | |
204 | OPFAIL, /* OPFAIL */ | |
54612592 | 205 | COMMIT, /* COMMIT */ |
24b23f37 YO |
206 | COMMIT, /* CUT */ |
207 | OPERROR, /* OPERROR */ | |
1a147d38 YO |
208 | NOTHING, /* OPTIMIZED */ |
209 | PSEUDO, /* PSEUDO */ | |
03363afd | 210 | /* ------------ States ------------- */ |
1a147d38 YO |
211 | TRIE, /* TRIE_next */ |
212 | TRIE, /* TRIE_next_fail */ | |
213 | EVAL, /* EVAL_AB */ | |
214 | EVAL, /* EVAL_AB_fail */ | |
215 | CURLYX, /* CURLYX_end */ | |
216 | CURLYX, /* CURLYX_end_fail */ | |
217 | WHILEM, /* WHILEM_A_pre */ | |
218 | WHILEM, /* WHILEM_A_pre_fail */ | |
219 | WHILEM, /* WHILEM_A_min */ | |
220 | WHILEM, /* WHILEM_A_min_fail */ | |
221 | WHILEM, /* WHILEM_A_max */ | |
222 | WHILEM, /* WHILEM_A_max_fail */ | |
223 | WHILEM, /* WHILEM_B_min */ | |
224 | WHILEM, /* WHILEM_B_min_fail */ | |
225 | WHILEM, /* WHILEM_B_max */ | |
226 | WHILEM, /* WHILEM_B_max_fail */ | |
227 | BRANCH, /* BRANCH_next */ | |
228 | BRANCH, /* BRANCH_next_fail */ | |
229 | CURLYM, /* CURLYM_A */ | |
230 | CURLYM, /* CURLYM_A_fail */ | |
231 | CURLYM, /* CURLYM_B */ | |
232 | CURLYM, /* CURLYM_B_fail */ | |
233 | IFMATCH, /* IFMATCH_A */ | |
234 | IFMATCH, /* IFMATCH_A_fail */ | |
235 | CURLY, /* CURLY_B_min_known */ | |
236 | CURLY, /* CURLY_B_min_known_fail */ | |
237 | CURLY, /* CURLY_B_min */ | |
238 | CURLY, /* CURLY_B_min_fail */ | |
239 | CURLY, /* CURLY_B_max */ | |
240 | CURLY, /* CURLY_B_max_fail */ | |
54612592 YO |
241 | COMMIT, /* COMMIT_next */ |
242 | COMMIT, /* COMMIT_next_fail */ | |
d09b2d29 IZ |
243 | }; |
244 | #endif | |
245 | ||
6bda09f9 | 246 | /* regarglen[] - How large is the argument part of the node (in regnodes) */ |
d09b2d29 IZ |
247 | |
248 | #ifdef REG_COMP_C | |
29de9391 | 249 | static const U8 regarglen[] = { |
03363afd YO |
250 | 0, /* END */ |
251 | 0, /* SUCCEED */ | |
252 | 0, /* BOL */ | |
253 | 0, /* MBOL */ | |
254 | 0, /* SBOL */ | |
255 | 0, /* EOS */ | |
256 | 0, /* EOL */ | |
257 | 0, /* MEOL */ | |
258 | 0, /* SEOL */ | |
259 | 0, /* BOUND */ | |
260 | 0, /* BOUNDL */ | |
261 | 0, /* NBOUND */ | |
262 | 0, /* NBOUNDL */ | |
263 | 0, /* GPOS */ | |
264 | 0, /* REG_ANY */ | |
265 | 0, /* SANY */ | |
266 | 0, /* CANY */ | |
267 | 0, /* ANYOF */ | |
268 | 0, /* ALNUM */ | |
269 | 0, /* ALNUML */ | |
270 | 0, /* NALNUM */ | |
271 | 0, /* NALNUML */ | |
272 | 0, /* SPACE */ | |
273 | 0, /* SPACEL */ | |
274 | 0, /* NSPACE */ | |
275 | 0, /* NSPACEL */ | |
276 | 0, /* DIGIT */ | |
277 | 0, /* DIGITL */ | |
278 | 0, /* NDIGIT */ | |
279 | 0, /* NDIGITL */ | |
280 | 0, /* CLUMP */ | |
281 | 0, /* BRANCH */ | |
282 | 0, /* BACK */ | |
283 | 0, /* EXACT */ | |
284 | 0, /* EXACTF */ | |
285 | 0, /* EXACTFL */ | |
286 | 0, /* NOTHING */ | |
287 | 0, /* TAIL */ | |
288 | 0, /* STAR */ | |
289 | 0, /* PLUS */ | |
290 | EXTRA_SIZE(struct regnode_2), /* CURLY */ | |
291 | EXTRA_SIZE(struct regnode_2), /* CURLYN */ | |
292 | EXTRA_SIZE(struct regnode_2), /* CURLYM */ | |
293 | EXTRA_SIZE(struct regnode_2), /* CURLYX */ | |
294 | 0, /* WHILEM */ | |
295 | EXTRA_SIZE(struct regnode_1), /* OPEN */ | |
296 | EXTRA_SIZE(struct regnode_1), /* CLOSE */ | |
297 | EXTRA_SIZE(struct regnode_1), /* REF */ | |
298 | EXTRA_SIZE(struct regnode_1), /* REFF */ | |
299 | EXTRA_SIZE(struct regnode_1), /* REFFL */ | |
300 | EXTRA_SIZE(struct regnode_1), /* IFMATCH */ | |
301 | EXTRA_SIZE(struct regnode_1), /* UNLESSM */ | |
302 | EXTRA_SIZE(struct regnode_1), /* SUSPEND */ | |
303 | EXTRA_SIZE(struct regnode_1), /* IFTHEN */ | |
304 | EXTRA_SIZE(struct regnode_1), /* GROUPP */ | |
305 | EXTRA_SIZE(struct regnode_1), /* LONGJMP */ | |
306 | EXTRA_SIZE(struct regnode_1), /* BRANCHJ */ | |
307 | EXTRA_SIZE(struct regnode_1), /* EVAL */ | |
308 | 0, /* MINMOD */ | |
309 | 0, /* LOGICAL */ | |
310 | EXTRA_SIZE(struct regnode_1), /* RENUM */ | |
311 | EXTRA_SIZE(struct regnode_1), /* TRIE */ | |
312 | EXTRA_SIZE(struct regnode_charclass), /* TRIEC */ | |
313 | EXTRA_SIZE(struct regnode_1), /* AHOCORASICK */ | |
314 | EXTRA_SIZE(struct regnode_charclass), /* AHOCORASICKC */ | |
1a147d38 YO |
315 | EXTRA_SIZE(struct regnode_2L), /* GOSUB */ |
316 | 0, /* GOSTART */ | |
81714fb9 YO |
317 | EXTRA_SIZE(struct regnode_1), /* NREF */ |
318 | EXTRA_SIZE(struct regnode_1), /* NREFF */ | |
319 | EXTRA_SIZE(struct regnode_1), /* NREFFL */ | |
0a4db386 | 320 | EXTRA_SIZE(struct regnode_1), /* NGROUPP */ |
1a147d38 | 321 | EXTRA_SIZE(struct regnode_1), /* INSUBP */ |
0a4db386 | 322 | EXTRA_SIZE(struct regnode_1), /* DEFINEP */ |
7f69552c | 323 | 0, /* OPFAIL */ |
54612592 | 324 | 0, /* COMMIT */ |
24b23f37 YO |
325 | 0, /* CUT */ |
326 | 0, /* OPERROR */ | |
03363afd YO |
327 | 0, /* OPTIMIZED */ |
328 | 0, /* PSEUDO */ | |
d09b2d29 IZ |
329 | }; |
330 | ||
6bda09f9 YO |
331 | /* reg_off_by_arg[] - Which argument holds the offset to the next node */ |
332 | ||
29de9391 | 333 | static const char reg_off_by_arg[] = { |
03363afd YO |
334 | 0, /* END */ |
335 | 0, /* SUCCEED */ | |
336 | 0, /* BOL */ | |
337 | 0, /* MBOL */ | |
338 | 0, /* SBOL */ | |
339 | 0, /* EOS */ | |
340 | 0, /* EOL */ | |
341 | 0, /* MEOL */ | |
342 | 0, /* SEOL */ | |
343 | 0, /* BOUND */ | |
344 | 0, /* BOUNDL */ | |
345 | 0, /* NBOUND */ | |
346 | 0, /* NBOUNDL */ | |
347 | 0, /* GPOS */ | |
348 | 0, /* REG_ANY */ | |
349 | 0, /* SANY */ | |
350 | 0, /* CANY */ | |
351 | 0, /* ANYOF */ | |
352 | 0, /* ALNUM */ | |
353 | 0, /* ALNUML */ | |
354 | 0, /* NALNUM */ | |
355 | 0, /* NALNUML */ | |
356 | 0, /* SPACE */ | |
357 | 0, /* SPACEL */ | |
358 | 0, /* NSPACE */ | |
359 | 0, /* NSPACEL */ | |
360 | 0, /* DIGIT */ | |
361 | 0, /* DIGITL */ | |
362 | 0, /* NDIGIT */ | |
363 | 0, /* NDIGITL */ | |
364 | 0, /* CLUMP */ | |
365 | 0, /* BRANCH */ | |
366 | 0, /* BACK */ | |
367 | 0, /* EXACT */ | |
368 | 0, /* EXACTF */ | |
369 | 0, /* EXACTFL */ | |
370 | 0, /* NOTHING */ | |
371 | 0, /* TAIL */ | |
372 | 0, /* STAR */ | |
373 | 0, /* PLUS */ | |
374 | 0, /* CURLY */ | |
375 | 0, /* CURLYN */ | |
376 | 0, /* CURLYM */ | |
377 | 0, /* CURLYX */ | |
378 | 0, /* WHILEM */ | |
379 | 0, /* OPEN */ | |
380 | 0, /* CLOSE */ | |
381 | 0, /* REF */ | |
382 | 0, /* REFF */ | |
383 | 0, /* REFFL */ | |
384 | 2, /* IFMATCH */ | |
385 | 2, /* UNLESSM */ | |
386 | 1, /* SUSPEND */ | |
387 | 1, /* IFTHEN */ | |
388 | 0, /* GROUPP */ | |
389 | 1, /* LONGJMP */ | |
390 | 1, /* BRANCHJ */ | |
391 | 0, /* EVAL */ | |
392 | 0, /* MINMOD */ | |
393 | 0, /* LOGICAL */ | |
394 | 1, /* RENUM */ | |
395 | 0, /* TRIE */ | |
396 | 0, /* TRIEC */ | |
397 | 0, /* AHOCORASICK */ | |
398 | 0, /* AHOCORASICKC */ | |
1a147d38 YO |
399 | 0, /* GOSUB */ |
400 | 0, /* GOSTART */ | |
81714fb9 YO |
401 | 0, /* NREF */ |
402 | 0, /* NREFF */ | |
403 | 0, /* NREFFL */ | |
0a4db386 | 404 | 0, /* NGROUPP */ |
1a147d38 | 405 | 0, /* INSUBP */ |
0a4db386 | 406 | 0, /* DEFINEP */ |
7f69552c | 407 | 0, /* OPFAIL */ |
54612592 | 408 | 0, /* COMMIT */ |
24b23f37 YO |
409 | 0, /* CUT */ |
410 | 0, /* OPERROR */ | |
03363afd YO |
411 | 0, /* OPTIMIZED */ |
412 | 0, /* PSEUDO */ | |
d09b2d29 | 413 | }; |
885f9e59 | 414 | |
6bda09f9 YO |
415 | /* reg_name[] - Opcode/state names in string form, for debugging */ |
416 | ||
885f9e59 | 417 | #ifdef DEBUGGING |
6d9c9890 | 418 | const char * reg_name[] = { |
03363afd YO |
419 | "END", /* 0000 */ |
420 | "SUCCEED", /* 0x01 */ | |
421 | "BOL", /* 0x02 */ | |
422 | "MBOL", /* 0x03 */ | |
423 | "SBOL", /* 0x04 */ | |
424 | "EOS", /* 0x05 */ | |
425 | "EOL", /* 0x06 */ | |
426 | "MEOL", /* 0x07 */ | |
427 | "SEOL", /* 0x08 */ | |
428 | "BOUND", /* 0x09 */ | |
429 | "BOUNDL", /* 0x0a */ | |
430 | "NBOUND", /* 0x0b */ | |
431 | "NBOUNDL", /* 0x0c */ | |
432 | "GPOS", /* 0x0d */ | |
433 | "REG_ANY", /* 0x0e */ | |
434 | "SANY", /* 0x0f */ | |
435 | "CANY", /* 0x10 */ | |
436 | "ANYOF", /* 0x11 */ | |
437 | "ALNUM", /* 0x12 */ | |
438 | "ALNUML", /* 0x13 */ | |
439 | "NALNUM", /* 0x14 */ | |
440 | "NALNUML", /* 0x15 */ | |
441 | "SPACE", /* 0x16 */ | |
442 | "SPACEL", /* 0x17 */ | |
443 | "NSPACE", /* 0x18 */ | |
444 | "NSPACEL", /* 0x19 */ | |
445 | "DIGIT", /* 0x1a */ | |
446 | "DIGITL", /* 0x1b */ | |
447 | "NDIGIT", /* 0x1c */ | |
448 | "NDIGITL", /* 0x1d */ | |
449 | "CLUMP", /* 0x1e */ | |
450 | "BRANCH", /* 0x1f */ | |
451 | "BACK", /* 0x20 */ | |
452 | "EXACT", /* 0x21 */ | |
453 | "EXACTF", /* 0x22 */ | |
454 | "EXACTFL", /* 0x23 */ | |
455 | "NOTHING", /* 0x24 */ | |
456 | "TAIL", /* 0x25 */ | |
457 | "STAR", /* 0x26 */ | |
458 | "PLUS", /* 0x27 */ | |
459 | "CURLY", /* 0x28 */ | |
460 | "CURLYN", /* 0x29 */ | |
461 | "CURLYM", /* 0x2a */ | |
462 | "CURLYX", /* 0x2b */ | |
463 | "WHILEM", /* 0x2c */ | |
464 | "OPEN", /* 0x2d */ | |
465 | "CLOSE", /* 0x2e */ | |
466 | "REF", /* 0x2f */ | |
467 | "REFF", /* 0x30 */ | |
468 | "REFFL", /* 0x31 */ | |
469 | "IFMATCH", /* 0x32 */ | |
470 | "UNLESSM", /* 0x33 */ | |
471 | "SUSPEND", /* 0x34 */ | |
472 | "IFTHEN", /* 0x35 */ | |
473 | "GROUPP", /* 0x36 */ | |
474 | "LONGJMP", /* 0x37 */ | |
475 | "BRANCHJ", /* 0x38 */ | |
476 | "EVAL", /* 0x39 */ | |
477 | "MINMOD", /* 0x3a */ | |
478 | "LOGICAL", /* 0x3b */ | |
479 | "RENUM", /* 0x3c */ | |
480 | "TRIE", /* 0x3d */ | |
481 | "TRIEC", /* 0x3e */ | |
482 | "AHOCORASICK", /* 0x3f */ | |
483 | "AHOCORASICKC", /* 0x40 */ | |
1a147d38 YO |
484 | "GOSUB", /* 0x41 */ |
485 | "GOSTART", /* 0x42 */ | |
81714fb9 YO |
486 | "NREF", /* 0x43 */ |
487 | "NREFF", /* 0x44 */ | |
488 | "NREFFL", /* 0x45 */ | |
0a4db386 | 489 | "NGROUPP", /* 0x46 */ |
1a147d38 | 490 | "INSUBP", /* 0x47 */ |
0a4db386 | 491 | "DEFINEP", /* 0x48 */ |
7f69552c | 492 | "OPFAIL", /* 0x49 */ |
54612592 | 493 | "COMMIT", /* 0x4a */ |
24b23f37 YO |
494 | "CUT", /* 0x4b */ |
495 | "OPERROR", /* 0x4c */ | |
496 | "OPTIMIZED", /* 0x4d */ | |
497 | "PSEUDO", /* 0x4e */ | |
03363afd | 498 | /* ------------ States ------------- */ |
24b23f37 YO |
499 | "TRIE_next", /* REGNODE_MAX +0x01 */ |
500 | "TRIE_next_fail", /* REGNODE_MAX +0x02 */ | |
501 | "EVAL_AB", /* REGNODE_MAX +0x03 */ | |
502 | "EVAL_AB_fail", /* REGNODE_MAX +0x04 */ | |
503 | "CURLYX_end", /* REGNODE_MAX +0x05 */ | |
504 | "CURLYX_end_fail", /* REGNODE_MAX +0x06 */ | |
505 | "WHILEM_A_pre", /* REGNODE_MAX +0x07 */ | |
506 | "WHILEM_A_pre_fail", /* REGNODE_MAX +0x08 */ | |
507 | "WHILEM_A_min", /* REGNODE_MAX +0x09 */ | |
508 | "WHILEM_A_min_fail", /* REGNODE_MAX +0x0a */ | |
509 | "WHILEM_A_max", /* REGNODE_MAX +0x0b */ | |
510 | "WHILEM_A_max_fail", /* REGNODE_MAX +0x0c */ | |
511 | "WHILEM_B_min", /* REGNODE_MAX +0x0d */ | |
512 | "WHILEM_B_min_fail", /* REGNODE_MAX +0x0e */ | |
513 | "WHILEM_B_max", /* REGNODE_MAX +0x0f */ | |
514 | "WHILEM_B_max_fail", /* REGNODE_MAX +0x10 */ | |
515 | "BRANCH_next", /* REGNODE_MAX +0x11 */ | |
516 | "BRANCH_next_fail", /* REGNODE_MAX +0x12 */ | |
517 | "CURLYM_A", /* REGNODE_MAX +0x13 */ | |
518 | "CURLYM_A_fail", /* REGNODE_MAX +0x14 */ | |
519 | "CURLYM_B", /* REGNODE_MAX +0x15 */ | |
520 | "CURLYM_B_fail", /* REGNODE_MAX +0x16 */ | |
521 | "IFMATCH_A", /* REGNODE_MAX +0x17 */ | |
522 | "IFMATCH_A_fail", /* REGNODE_MAX +0x18 */ | |
523 | "CURLY_B_min_known", /* REGNODE_MAX +0x19 */ | |
524 | "CURLY_B_min_known_fail", /* REGNODE_MAX +0x1a */ | |
525 | "CURLY_B_min", /* REGNODE_MAX +0x1b */ | |
526 | "CURLY_B_min_fail", /* REGNODE_MAX +0x1c */ | |
527 | "CURLY_B_max", /* REGNODE_MAX +0x1d */ | |
528 | "CURLY_B_max_fail", /* REGNODE_MAX +0x1e */ | |
529 | "COMMIT_next", /* REGNODE_MAX +0x1f */ | |
530 | "COMMIT_next_fail", /* REGNODE_MAX +0x20 */ | |
885f9e59 | 531 | }; |
885f9e59 | 532 | #endif /* DEBUGGING */ |
03363afd YO |
533 | #else |
534 | #ifdef DEBUGGING | |
6d9c9890 | 535 | extern const char * reg_name[]; |
03363afd | 536 | #endif |
d09b2d29 IZ |
537 | #endif /* REG_COMP_C */ |
538 | ||
37442d52 | 539 | /* ex: set ro: */ |