This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Regenerated mktables.lst per Yves Orton's suggestion.
[perl5.git] / regnodes.h
CommitLineData
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
22c35a8c 7#define END 0 /* 0 End of program. */
d09b2d29
IZ
8#define SUCCEED 1 /* 0x1 Return from a subroutine, basically. */
9#define BOL 2 /* 0x2 Match "" at beginning of line. */
10#define MBOL 3 /* 0x3 Same, assuming multiline. */
11#define SBOL 4 /* 0x4 Same, assuming singleline. */
b85d18e9
IZ
12#define EOS 5 /* 0x5 Match "" at end of string. */
13#define EOL 6 /* 0x6 Match "" at end of line. */
14#define MEOL 7 /* 0x7 Same, assuming multiline. */
15#define SEOL 8 /* 0x8 Same, assuming singleline. */
16#define BOUND 9 /* 0x9 Match "" at any word boundary */
ffc61ed2
JH
17#define BOUNDL 10 /* 0xa Match "" at any word boundary */
18#define NBOUND 11 /* 0xb Match "" at any word non-boundary */
19#define NBOUNDL 12 /* 0xc Match "" at any word non-boundary */
20#define GPOS 13 /* 0xd Matches where last m//g left off. */
21#define REG_ANY 14 /* 0xe Match any one character (except newline). */
22#define SANY 15 /* 0xf Match any one character. */
f33976b4
DB
23#define CANY 16 /* 0x10 Match any one byte. */
24#define ANYOF 17 /* 0x11 Match character in (or not in) this class. */
25#define ALNUM 18 /* 0x12 Match any alphanumeric character */
26#define ALNUML 19 /* 0x13 Match any alphanumeric char in locale */
27#define NALNUM 20 /* 0x14 Match any non-alphanumeric character */
28#define NALNUML 21 /* 0x15 Match any non-alphanumeric char in locale */
29#define SPACE 22 /* 0x16 Match any whitespace character */
30#define SPACEL 23 /* 0x17 Match any whitespace char in locale */
31#define NSPACE 24 /* 0x18 Match any non-whitespace character */
32#define NSPACEL 25 /* 0x19 Match any non-whitespace char in locale */
33#define DIGIT 26 /* 0x1a Match any numeric character */
34#define DIGITL 27 /* 0x1b Match any numeric character in locale */
35#define NDIGIT 28 /* 0x1c Match any non-numeric character */
36#define NDIGITL 29 /* 0x1d Match any non-numeric character in locale */
37#define CLUMP 30 /* 0x1e Match any combining character sequence */
38#define BRANCH 31 /* 0x1f Match this alternative, or the next... */
39#define BACK 32 /* 0x20 Match "", "next" ptr points backward. */
40#define EXACT 33 /* 0x21 Match this string (preceded by length). */
41#define EXACTF 34 /* 0x22 Match this string, folded (prec. by length). */
42#define EXACTFL 35 /* 0x23 Match this string, folded in locale (w/len). */
ce5e9471
YO
43#define NOTHING 36 /* 0x24 Match empty string. */
44#define TAIL 37 /* 0x25 Match empty string. Can jump here from outside. */
45#define STAR 38 /* 0x26 Match this (simple) thing 0 or more times. */
46#define PLUS 39 /* 0x27 Match this (simple) thing 1 or more times. */
47#define CURLY 40 /* 0x28 Match this simple thing {n,m} times. */
48#define CURLYN 41 /* 0x29 Match next-after-this simple thing */
49#define CURLYM 42 /* 0x2a Match this medium-complex thing {n,m} times. */
50#define CURLYX 43 /* 0x2b Match this complex thing {n,m} times. */
51#define WHILEM 44 /* 0x2c Do curly processing and see if rest matches. */
52#define OPEN 45 /* 0x2d Mark this point in input as start of #n. */
53#define CLOSE 46 /* 0x2e Analogous to OPEN. */
54#define REF 47 /* 0x2f Match some already matched string */
55#define REFF 48 /* 0x30 Match already matched string, folded */
56#define REFFL 49 /* 0x31 Match already matched string, folded in loc. */
57#define IFMATCH 50 /* 0x32 Succeeds if the following matches. */
58#define UNLESSM 51 /* 0x33 Fails if the following matches. */
59#define SUSPEND 52 /* 0x34 "Independent" sub-RE. */
60#define IFTHEN 53 /* 0x35 Switch, should be preceeded by switcher . */
61#define GROUPP 54 /* 0x36 Whether the group matched. */
62#define LONGJMP 55 /* 0x37 Jump far away. */
63#define BRANCHJ 56 /* 0x38 BRANCH with long offset. */
64#define EVAL 57 /* 0x39 Execute some Perl code. */
65#define MINMOD 58 /* 0x3a Next operator is not greedy. */
66#define LOGICAL 59 /* 0x3b Next opcode should set the flag only. */
67#define RENUM 60 /* 0x3c Group with independently numbered parens. */
1de06328
YO
68#define TRIE 61 /* 0x3d Match many EXACT(FL?)? at once. flags==type */
69#define TRIEC 62 /* 0x3e Same as TRIE, but with embedded charclass data */
70#define AHOCORASICK 63 /* 0x3f Aho Corasick stclass. flags==type */
71#define AHOCORASICKC 64 /* 0x40 Same as AHOCORASICK, but with embedded charclass data */
72#define OPTIMIZED 65 /* 0x41 Placeholder for dump. */
73#define PSEUDO 66 /* 0x42 Pseudo opcode for internal use. */
74#define REGNODE_MAX 66
d09b2d29
IZ
75
76#ifndef DOINIT
22c35a8c 77EXTCONST U8 PL_regkind[];
d09b2d29 78#else
22c35a8c 79EXTCONST U8 PL_regkind[] = {
d09b2d29
IZ
80 END, /* END */
81 END, /* SUCCEED */
82 BOL, /* BOL */
83 BOL, /* MBOL */
84 BOL, /* SBOL */
b85d18e9 85 EOL, /* EOS */
d09b2d29
IZ
86 EOL, /* EOL */
87 EOL, /* MEOL */
88 EOL, /* SEOL */
89 BOUND, /* BOUND */
90 BOUND, /* BOUNDL */
91 NBOUND, /* NBOUND */
92 NBOUND, /* NBOUNDL */
93 GPOS, /* GPOS */
22c35a8c 94 REG_ANY, /* REG_ANY */
22c35a8c 95 REG_ANY, /* SANY */
f33976b4 96 REG_ANY, /* CANY */
d09b2d29
IZ
97 ANYOF, /* ANYOF */
98 ALNUM, /* ALNUM */
99 ALNUM, /* ALNUML */
100 NALNUM, /* NALNUM */
101 NALNUM, /* NALNUML */
102 SPACE, /* SPACE */
103 SPACE, /* SPACEL */
104 NSPACE, /* NSPACE */
105 NSPACE, /* NSPACEL */
106 DIGIT, /* DIGIT */
b8c5462f 107 DIGIT, /* DIGITL */
d09b2d29 108 NDIGIT, /* NDIGIT */
b8c5462f 109 NDIGIT, /* NDIGITL */
a0ed51b3 110 CLUMP, /* CLUMP */
d09b2d29
IZ
111 BRANCH, /* BRANCH */
112 BACK, /* BACK */
113 EXACT, /* EXACT */
114 EXACT, /* EXACTF */
115 EXACT, /* EXACTFL */
116 NOTHING, /* NOTHING */
117 NOTHING, /* TAIL */
118 STAR, /* STAR */
119 PLUS, /* PLUS */
120 CURLY, /* CURLY */
121 CURLY, /* CURLYN */
122 CURLY, /* CURLYM */
123 CURLY, /* CURLYX */
124 WHILEM, /* WHILEM */
125 OPEN, /* OPEN */
126 CLOSE, /* CLOSE */
127 REF, /* REF */
128 REF, /* REFF */
129 REF, /* REFFL */
130 BRANCHJ, /* IFMATCH */
131 BRANCHJ, /* UNLESSM */
132 BRANCHJ, /* SUSPEND */
133 BRANCHJ, /* IFTHEN */
134 GROUPP, /* GROUPP */
135 LONGJMP, /* LONGJMP */
136 BRANCHJ, /* BRANCHJ */
137 EVAL, /* EVAL */
138 MINMOD, /* MINMOD */
139 LOGICAL, /* LOGICAL */
140 BRANCHJ, /* RENUM */
ce5e9471 141 TRIE, /* TRIE */
8e11feef 142 TRIE, /* TRIEC */
1de06328
YO
143 TRIE, /* AHOCORASICK */
144 TRIE, /* AHOCORASICKC */
145 NOTHING, /* OPTIMIZED */
8e11feef 146 PSEUDO, /* PSEUDO */
d09b2d29
IZ
147};
148#endif
149
150
151#ifdef REG_COMP_C
29de9391 152static const U8 regarglen[] = {
d09b2d29
IZ
153 0, /* END */
154 0, /* SUCCEED */
155 0, /* BOL */
156 0, /* MBOL */
157 0, /* SBOL */
b85d18e9 158 0, /* EOS */
d09b2d29
IZ
159 0, /* EOL */
160 0, /* MEOL */
161 0, /* SEOL */
162 0, /* BOUND */
163 0, /* BOUNDL */
164 0, /* NBOUND */
165 0, /* NBOUNDL */
166 0, /* GPOS */
22c35a8c 167 0, /* REG_ANY */
d09b2d29 168 0, /* SANY */
f33976b4 169 0, /* CANY */
d09b2d29
IZ
170 0, /* ANYOF */
171 0, /* ALNUM */
172 0, /* ALNUML */
173 0, /* NALNUM */
174 0, /* NALNUML */
175 0, /* SPACE */
176 0, /* SPACEL */
177 0, /* NSPACE */
178 0, /* NSPACEL */
179 0, /* DIGIT */
b8c5462f 180 0, /* DIGITL */
d09b2d29 181 0, /* NDIGIT */
b8c5462f 182 0, /* NDIGITL */
a0ed51b3 183 0, /* CLUMP */
d09b2d29
IZ
184 0, /* BRANCH */
185 0, /* BACK */
186 0, /* EXACT */
187 0, /* EXACTF */
188 0, /* EXACTFL */
189 0, /* NOTHING */
190 0, /* TAIL */
191 0, /* STAR */
192 0, /* PLUS */
193 EXTRA_SIZE(struct regnode_2), /* CURLY */
194 EXTRA_SIZE(struct regnode_2), /* CURLYN */
195 EXTRA_SIZE(struct regnode_2), /* CURLYM */
196 EXTRA_SIZE(struct regnode_2), /* CURLYX */
197 0, /* WHILEM */
198 EXTRA_SIZE(struct regnode_1), /* OPEN */
199 EXTRA_SIZE(struct regnode_1), /* CLOSE */
200 EXTRA_SIZE(struct regnode_1), /* REF */
201 EXTRA_SIZE(struct regnode_1), /* REFF */
202 EXTRA_SIZE(struct regnode_1), /* REFFL */
203 EXTRA_SIZE(struct regnode_1), /* IFMATCH */
204 EXTRA_SIZE(struct regnode_1), /* UNLESSM */
205 EXTRA_SIZE(struct regnode_1), /* SUSPEND */
206 EXTRA_SIZE(struct regnode_1), /* IFTHEN */
207 EXTRA_SIZE(struct regnode_1), /* GROUPP */
208 EXTRA_SIZE(struct regnode_1), /* LONGJMP */
209 EXTRA_SIZE(struct regnode_1), /* BRANCHJ */
210 EXTRA_SIZE(struct regnode_1), /* EVAL */
211 0, /* MINMOD */
212 0, /* LOGICAL */
213 EXTRA_SIZE(struct regnode_1), /* RENUM */
ce5e9471 214 EXTRA_SIZE(struct regnode_1), /* TRIE */
786e8c11 215 EXTRA_SIZE(struct regnode_charclass), /* TRIEC */
1de06328
YO
216 EXTRA_SIZE(struct regnode_1), /* AHOCORASICK */
217 EXTRA_SIZE(struct regnode_charclass), /* AHOCORASICKC */
218 0, /* OPTIMIZED */
8e11feef 219 0, /* PSEUDO */
d09b2d29
IZ
220};
221
29de9391 222static const char reg_off_by_arg[] = {
d09b2d29
IZ
223 0, /* END */
224 0, /* SUCCEED */
225 0, /* BOL */
226 0, /* MBOL */
227 0, /* SBOL */
b85d18e9 228 0, /* EOS */
d09b2d29
IZ
229 0, /* EOL */
230 0, /* MEOL */
231 0, /* SEOL */
232 0, /* BOUND */
233 0, /* BOUNDL */
234 0, /* NBOUND */
235 0, /* NBOUNDL */
236 0, /* GPOS */
22c35a8c 237 0, /* REG_ANY */
d09b2d29 238 0, /* SANY */
f33976b4 239 0, /* CANY */
d09b2d29
IZ
240 0, /* ANYOF */
241 0, /* ALNUM */
242 0, /* ALNUML */
243 0, /* NALNUM */
244 0, /* NALNUML */
245 0, /* SPACE */
246 0, /* SPACEL */
247 0, /* NSPACE */
248 0, /* NSPACEL */
249 0, /* DIGIT */
b8c5462f 250 0, /* DIGITL */
d09b2d29 251 0, /* NDIGIT */
b8c5462f 252 0, /* NDIGITL */
a0ed51b3 253 0, /* CLUMP */
d09b2d29
IZ
254 0, /* BRANCH */
255 0, /* BACK */
256 0, /* EXACT */
257 0, /* EXACTF */
258 0, /* EXACTFL */
259 0, /* NOTHING */
260 0, /* TAIL */
261 0, /* STAR */
262 0, /* PLUS */
263 0, /* CURLY */
264 0, /* CURLYN */
265 0, /* CURLYM */
266 0, /* CURLYX */
267 0, /* WHILEM */
268 0, /* OPEN */
269 0, /* CLOSE */
270 0, /* REF */
271 0, /* REFF */
272 0, /* REFFL */
273 2, /* IFMATCH */
274 2, /* UNLESSM */
275 1, /* SUSPEND */
276 1, /* IFTHEN */
277 0, /* GROUPP */
278 1, /* LONGJMP */
279 1, /* BRANCHJ */
280 0, /* EVAL */
281 0, /* MINMOD */
282 0, /* LOGICAL */
283 1, /* RENUM */
ce5e9471 284 0, /* TRIE */
8e11feef 285 0, /* TRIEC */
1de06328
YO
286 0, /* AHOCORASICK */
287 0, /* AHOCORASICKC */
288 0, /* OPTIMIZED */
8e11feef 289 0, /* PSEUDO */
d09b2d29 290};
885f9e59
GS
291
292#ifdef DEBUGGING
29de9391 293static const char * const reg_name[] = {
885f9e59
GS
294 "END", /* 0 */
295 "SUCCEED", /* 0x1 */
296 "BOL", /* 0x2 */
297 "MBOL", /* 0x3 */
298 "SBOL", /* 0x4 */
299 "EOS", /* 0x5 */
300 "EOL", /* 0x6 */
301 "MEOL", /* 0x7 */
302 "SEOL", /* 0x8 */
303 "BOUND", /* 0x9 */
ffc61ed2
JH
304 "BOUNDL", /* 0xa */
305 "NBOUND", /* 0xb */
306 "NBOUNDL", /* 0xc */
307 "GPOS", /* 0xd */
308 "REG_ANY", /* 0xe */
309 "SANY", /* 0xf */
f33976b4
DB
310 "CANY", /* 0x10 */
311 "ANYOF", /* 0x11 */
312 "ALNUM", /* 0x12 */
313 "ALNUML", /* 0x13 */
314 "NALNUM", /* 0x14 */
315 "NALNUML", /* 0x15 */
316 "SPACE", /* 0x16 */
317 "SPACEL", /* 0x17 */
318 "NSPACE", /* 0x18 */
319 "NSPACEL", /* 0x19 */
320 "DIGIT", /* 0x1a */
321 "DIGITL", /* 0x1b */
322 "NDIGIT", /* 0x1c */
323 "NDIGITL", /* 0x1d */
324 "CLUMP", /* 0x1e */
325 "BRANCH", /* 0x1f */
326 "BACK", /* 0x20 */
327 "EXACT", /* 0x21 */
328 "EXACTF", /* 0x22 */
329 "EXACTFL", /* 0x23 */
ce5e9471
YO
330 "NOTHING", /* 0x24 */
331 "TAIL", /* 0x25 */
332 "STAR", /* 0x26 */
333 "PLUS", /* 0x27 */
334 "CURLY", /* 0x28 */
335 "CURLYN", /* 0x29 */
336 "CURLYM", /* 0x2a */
337 "CURLYX", /* 0x2b */
338 "WHILEM", /* 0x2c */
339 "OPEN", /* 0x2d */
340 "CLOSE", /* 0x2e */
341 "REF", /* 0x2f */
342 "REFF", /* 0x30 */
343 "REFFL", /* 0x31 */
344 "IFMATCH", /* 0x32 */
345 "UNLESSM", /* 0x33 */
346 "SUSPEND", /* 0x34 */
347 "IFTHEN", /* 0x35 */
348 "GROUPP", /* 0x36 */
349 "LONGJMP", /* 0x37 */
350 "BRANCHJ", /* 0x38 */
351 "EVAL", /* 0x39 */
352 "MINMOD", /* 0x3a */
353 "LOGICAL", /* 0x3b */
354 "RENUM", /* 0x3c */
1de06328
YO
355 "TRIE", /* 0x3d */
356 "TRIEC", /* 0x3e */
357 "AHOCORASICK", /* 0x3f */
358 "AHOCORASICKC", /* 0x40 */
359 "OPTIMIZED", /* 0x41 */
360 "PSEUDO", /* 0x42 */
885f9e59
GS
361};
362
1de06328 363static const int reg_num = 67;
885f9e59
GS
364
365#endif /* DEBUGGING */
d09b2d29
IZ
366#endif /* REG_COMP_C */
367
37442d52 368/* ex: set ro: */