This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [ID 20001122.006] weird behaviour of $|
[perl5.git] / regnodes.h
CommitLineData
d09b2d29 1/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
885f9e59 2 This file is built by regcomp.pl from regcomp.sym.
d09b2d29
IZ
3 Any changes made here will be lost!
4*/
5
22c35a8c 6#define END 0 /* 0 End of program. */
d09b2d29
IZ
7#define SUCCEED 1 /* 0x1 Return from a subroutine, basically. */
8#define BOL 2 /* 0x2 Match "" at beginning of line. */
9#define MBOL 3 /* 0x3 Same, assuming multiline. */
10#define SBOL 4 /* 0x4 Same, assuming singleline. */
b85d18e9
IZ
11#define EOS 5 /* 0x5 Match "" at end of string. */
12#define EOL 6 /* 0x6 Match "" at end of line. */
13#define MEOL 7 /* 0x7 Same, assuming multiline. */
14#define SEOL 8 /* 0x8 Same, assuming singleline. */
15#define BOUND 9 /* 0x9 Match "" at any word boundary */
a0ed51b3
LW
16#define BOUNDUTF8 10 /* 0xa Match "" at any word boundary */
17#define BOUNDL 11 /* 0xb Match "" at any word boundary */
18#define BOUNDLUTF8 12 /* 0xc Match "" at any word boundary */
19#define NBOUND 13 /* 0xd Match "" at any word non-boundary */
20#define NBOUNDUTF8 14 /* 0xe Match "" at any word non-boundary */
21#define NBOUNDL 15 /* 0xf Match "" at any word non-boundary */
22#define NBOUNDLUTF8 16 /* 0x10 Match "" at any word non-boundary */
23#define GPOS 17 /* 0x11 Matches where last m//g left off. */
22c35a8c 24#define REG_ANY 18 /* 0x12 Match any one character (except newline). */
a0ed51b3
LW
25#define ANYUTF8 19 /* 0x13 Match any one Unicode character (except newline). */
26#define SANY 20 /* 0x14 Match any one character. */
27#define SANYUTF8 21 /* 0x15 Match any one Unicode character. */
28#define ANYOF 22 /* 0x16 Match character in (or not in) this class. */
29#define ANYOFUTF8 23 /* 0x17 Match character in (or not in) this class. */
30#define ALNUM 24 /* 0x18 Match any alphanumeric character */
d6a28714 31#define ALNUMUTF8 25 /* 0x19 Match any alphanumeric character in utf8 */
a0ed51b3 32#define ALNUML 26 /* 0x1a Match any alphanumeric char in locale */
d6a28714 33#define ALNUMLUTF8 27 /* 0x1b Match any alphanumeric char in locale+utf8 */
a0ed51b3 34#define NALNUM 28 /* 0x1c Match any non-alphanumeric character */
d6a28714 35#define NALNUMUTF8 29 /* 0x1d Match any non-alphanumeric character in utf8 */
a0ed51b3 36#define NALNUML 30 /* 0x1e Match any non-alphanumeric char in locale */
d6a28714 37#define NALNUMLUTF8 31 /* 0x1f Match any non-alphanumeric char in locale+utf8 */
a0ed51b3 38#define SPACE 32 /* 0x20 Match any whitespace character */
d6a28714 39#define SPACEUTF8 33 /* 0x21 Match any whitespace character in utf8 */
a0ed51b3 40#define SPACEL 34 /* 0x22 Match any whitespace char in locale */
d6a28714 41#define SPACELUTF8 35 /* 0x23 Match any whitespace char in locale+utf8 */
a0ed51b3 42#define NSPACE 36 /* 0x24 Match any non-whitespace character */
d6a28714 43#define NSPACEUTF8 37 /* 0x25 Match any non-whitespace character in utf8 */
a0ed51b3 44#define NSPACEL 38 /* 0x26 Match any non-whitespace char in locale */
d6a28714 45#define NSPACELUTF8 39 /* 0x27 Match any non-whitespace char in locale+utf8 */
a0ed51b3 46#define DIGIT 40 /* 0x28 Match any numeric character */
d6a28714 47#define DIGITUTF8 41 /* 0x29 Match any numeric character in utf8 */
b8c5462f 48#define DIGITL 42 /* 0x2a Match any numeric character in locale */
d6a28714 49#define DIGITLUTF8 43 /* 0x2b Match any numeric character in locale+utf8 */
b8c5462f 50#define NDIGIT 44 /* 0x2c Match any non-numeric character */
d6a28714 51#define NDIGITUTF8 45 /* 0x2d Match any non-numeric character in utf8 */
b8c5462f 52#define NDIGITL 46 /* 0x2e Match any non-numeric character in locale */
d6a28714
JH
53#define NDIGITLUTF8 47 /* 0x2f Match any non-numeric character in locale+utf8 */
54#define CLUMP 48 /* 0x30 Match any combining character sequence */
55#define BRANCH 49 /* 0x31 Match this alternative, or the next... */
56#define BACK 50 /* 0x32 Match "", "next" ptr points backward. */
57#define EXACT 51 /* 0x33 Match this string (preceded by length). */
58#define EXACTF 52 /* 0x34 Match this string, folded (prec. by length). */
59#define EXACTFL 53 /* 0x35 Match this string, folded in locale (w/len). */
60#define NOTHING 54 /* 0x36 Match empty string. */
61#define TAIL 55 /* 0x37 Match empty string. Can jump here from outside. */
62#define STAR 56 /* 0x38 Match this (simple) thing 0 or more times. */
63#define PLUS 57 /* 0x39 Match this (simple) thing 1 or more times. */
64#define CURLY 58 /* 0x3a Match this simple thing {n,m} times. */
65#define CURLYN 59 /* 0x3b Match next-after-this simple thing */
66#define CURLYM 60 /* 0x3c Match this medium-complex thing {n,m} times. */
67#define CURLYX 61 /* 0x3d Match this complex thing {n,m} times. */
68#define WHILEM 62 /* 0x3e Do curly processing and see if rest matches. */
69#define OPEN 63 /* 0x3f Mark this point in input as start of #n. */
70#define CLOSE 64 /* 0x40 Analogous to OPEN. */
71#define REF 65 /* 0x41 Match some already matched string */
72#define REFF 66 /* 0x42 Match already matched string, folded */
73#define REFFL 67 /* 0x43 Match already matched string, folded in loc. */
74#define IFMATCH 68 /* 0x44 Succeeds if the following matches. */
75#define UNLESSM 69 /* 0x45 Fails if the following matches. */
76#define SUSPEND 70 /* 0x46 "Independent" sub-RE. */
77#define IFTHEN 71 /* 0x47 Switch, should be preceeded by switcher . */
78#define GROUPP 72 /* 0x48 Whether the group matched. */
79#define LONGJMP 73 /* 0x49 Jump far away. */
80#define BRANCHJ 74 /* 0x4a BRANCH with long offset. */
81#define EVAL 75 /* 0x4b Execute some Perl code. */
82#define MINMOD 76 /* 0x4c Next operator is not greedy. */
83#define LOGICAL 77 /* 0x4d Next opcode should set the flag only. */
84#define RENUM 78 /* 0x4e Group with independently numbered parens. */
85#define OPTIMIZED 79 /* 0x4f Placeholder for dump. */
d09b2d29
IZ
86
87#ifndef DOINIT
22c35a8c 88EXTCONST U8 PL_regkind[];
d09b2d29 89#else
22c35a8c 90EXTCONST U8 PL_regkind[] = {
d09b2d29
IZ
91 END, /* END */
92 END, /* SUCCEED */
93 BOL, /* BOL */
94 BOL, /* MBOL */
95 BOL, /* SBOL */
b85d18e9 96 EOL, /* EOS */
d09b2d29
IZ
97 EOL, /* EOL */
98 EOL, /* MEOL */
99 EOL, /* SEOL */
100 BOUND, /* BOUND */
a0ed51b3 101 BOUND, /* BOUNDUTF8 */
d09b2d29 102 BOUND, /* BOUNDL */
a0ed51b3 103 BOUND, /* BOUNDLUTF8 */
d09b2d29 104 NBOUND, /* NBOUND */
a0ed51b3 105 NBOUND, /* NBOUNDUTF8 */
d09b2d29 106 NBOUND, /* NBOUNDL */
a0ed51b3 107 NBOUND, /* NBOUNDLUTF8 */
d09b2d29 108 GPOS, /* GPOS */
22c35a8c
GS
109 REG_ANY, /* REG_ANY */
110 REG_ANY, /* ANYUTF8 */
111 REG_ANY, /* SANY */
112 REG_ANY, /* SANYUTF8 */
d09b2d29 113 ANYOF, /* ANYOF */
a0ed51b3 114 ANYOF, /* ANYOFUTF8 */
d09b2d29 115 ALNUM, /* ALNUM */
a0ed51b3 116 ALNUM, /* ALNUMUTF8 */
d09b2d29 117 ALNUM, /* ALNUML */
a0ed51b3 118 ALNUM, /* ALNUMLUTF8 */
d09b2d29 119 NALNUM, /* NALNUM */
a0ed51b3 120 NALNUM, /* NALNUMUTF8 */
d09b2d29 121 NALNUM, /* NALNUML */
a0ed51b3 122 NALNUM, /* NALNUMLUTF8 */
d09b2d29 123 SPACE, /* SPACE */
a0ed51b3 124 SPACE, /* SPACEUTF8 */
d09b2d29 125 SPACE, /* SPACEL */
a0ed51b3 126 SPACE, /* SPACELUTF8 */
d09b2d29 127 NSPACE, /* NSPACE */
a0ed51b3 128 NSPACE, /* NSPACEUTF8 */
d09b2d29 129 NSPACE, /* NSPACEL */
a0ed51b3 130 NSPACE, /* NSPACELUTF8 */
d09b2d29 131 DIGIT, /* DIGIT */
a0ed51b3 132 DIGIT, /* DIGITUTF8 */
b8c5462f
JH
133 DIGIT, /* DIGITL */
134 DIGIT, /* DIGITLUTF8 */
d09b2d29 135 NDIGIT, /* NDIGIT */
a0ed51b3 136 NDIGIT, /* NDIGITUTF8 */
b8c5462f
JH
137 NDIGIT, /* NDIGITL */
138 NDIGIT, /* NDIGITLUTF8 */
a0ed51b3 139 CLUMP, /* CLUMP */
d09b2d29
IZ
140 BRANCH, /* BRANCH */
141 BACK, /* BACK */
142 EXACT, /* EXACT */
143 EXACT, /* EXACTF */
144 EXACT, /* EXACTFL */
145 NOTHING, /* NOTHING */
146 NOTHING, /* TAIL */
147 STAR, /* STAR */
148 PLUS, /* PLUS */
149 CURLY, /* CURLY */
150 CURLY, /* CURLYN */
151 CURLY, /* CURLYM */
152 CURLY, /* CURLYX */
153 WHILEM, /* WHILEM */
154 OPEN, /* OPEN */
155 CLOSE, /* CLOSE */
156 REF, /* REF */
157 REF, /* REFF */
158 REF, /* REFFL */
159 BRANCHJ, /* IFMATCH */
160 BRANCHJ, /* UNLESSM */
161 BRANCHJ, /* SUSPEND */
162 BRANCHJ, /* IFTHEN */
163 GROUPP, /* GROUPP */
164 LONGJMP, /* LONGJMP */
165 BRANCHJ, /* BRANCHJ */
166 EVAL, /* EVAL */
167 MINMOD, /* MINMOD */
168 LOGICAL, /* LOGICAL */
169 BRANCHJ, /* RENUM */
170 NOTHING, /* OPTIMIZED */
171};
172#endif
173
174
175#ifdef REG_COMP_C
29de9391 176static const U8 regarglen[] = {
d09b2d29
IZ
177 0, /* END */
178 0, /* SUCCEED */
179 0, /* BOL */
180 0, /* MBOL */
181 0, /* SBOL */
b85d18e9 182 0, /* EOS */
d09b2d29
IZ
183 0, /* EOL */
184 0, /* MEOL */
185 0, /* SEOL */
186 0, /* BOUND */
a0ed51b3 187 0, /* BOUNDUTF8 */
d09b2d29 188 0, /* BOUNDL */
a0ed51b3 189 0, /* BOUNDLUTF8 */
d09b2d29 190 0, /* NBOUND */
a0ed51b3 191 0, /* NBOUNDUTF8 */
d09b2d29 192 0, /* NBOUNDL */
a0ed51b3 193 0, /* NBOUNDLUTF8 */
d09b2d29 194 0, /* GPOS */
22c35a8c 195 0, /* REG_ANY */
a0ed51b3 196 0, /* ANYUTF8 */
d09b2d29 197 0, /* SANY */
a0ed51b3 198 0, /* SANYUTF8 */
d09b2d29 199 0, /* ANYOF */
a0ed51b3 200 EXTRA_SIZE(struct regnode_1), /* ANYOFUTF8 */
d09b2d29 201 0, /* ALNUM */
a0ed51b3 202 0, /* ALNUMUTF8 */
d09b2d29 203 0, /* ALNUML */
a0ed51b3 204 0, /* ALNUMLUTF8 */
d09b2d29 205 0, /* NALNUM */
a0ed51b3 206 0, /* NALNUMUTF8 */
d09b2d29 207 0, /* NALNUML */
a0ed51b3 208 0, /* NALNUMLUTF8 */
d09b2d29 209 0, /* SPACE */
a0ed51b3 210 0, /* SPACEUTF8 */
d09b2d29 211 0, /* SPACEL */
a0ed51b3 212 0, /* SPACELUTF8 */
d09b2d29 213 0, /* NSPACE */
a0ed51b3 214 0, /* NSPACEUTF8 */
d09b2d29 215 0, /* NSPACEL */
a0ed51b3 216 0, /* NSPACELUTF8 */
d09b2d29 217 0, /* DIGIT */
a0ed51b3 218 0, /* DIGITUTF8 */
b8c5462f
JH
219 0, /* DIGITL */
220 0, /* DIGITLUTF8 */
d09b2d29 221 0, /* NDIGIT */
a0ed51b3 222 0, /* NDIGITUTF8 */
b8c5462f
JH
223 0, /* NDIGITL */
224 0, /* NDIGITLUTF8 */
a0ed51b3 225 0, /* CLUMP */
d09b2d29
IZ
226 0, /* BRANCH */
227 0, /* BACK */
228 0, /* EXACT */
229 0, /* EXACTF */
230 0, /* EXACTFL */
231 0, /* NOTHING */
232 0, /* TAIL */
233 0, /* STAR */
234 0, /* PLUS */
235 EXTRA_SIZE(struct regnode_2), /* CURLY */
236 EXTRA_SIZE(struct regnode_2), /* CURLYN */
237 EXTRA_SIZE(struct regnode_2), /* CURLYM */
238 EXTRA_SIZE(struct regnode_2), /* CURLYX */
239 0, /* WHILEM */
240 EXTRA_SIZE(struct regnode_1), /* OPEN */
241 EXTRA_SIZE(struct regnode_1), /* CLOSE */
242 EXTRA_SIZE(struct regnode_1), /* REF */
243 EXTRA_SIZE(struct regnode_1), /* REFF */
244 EXTRA_SIZE(struct regnode_1), /* REFFL */
245 EXTRA_SIZE(struct regnode_1), /* IFMATCH */
246 EXTRA_SIZE(struct regnode_1), /* UNLESSM */
247 EXTRA_SIZE(struct regnode_1), /* SUSPEND */
248 EXTRA_SIZE(struct regnode_1), /* IFTHEN */
249 EXTRA_SIZE(struct regnode_1), /* GROUPP */
250 EXTRA_SIZE(struct regnode_1), /* LONGJMP */
251 EXTRA_SIZE(struct regnode_1), /* BRANCHJ */
252 EXTRA_SIZE(struct regnode_1), /* EVAL */
253 0, /* MINMOD */
254 0, /* LOGICAL */
255 EXTRA_SIZE(struct regnode_1), /* RENUM */
256 0, /* OPTIMIZED */
257};
258
29de9391 259static const char reg_off_by_arg[] = {
d09b2d29
IZ
260 0, /* END */
261 0, /* SUCCEED */
262 0, /* BOL */
263 0, /* MBOL */
264 0, /* SBOL */
b85d18e9 265 0, /* EOS */
d09b2d29
IZ
266 0, /* EOL */
267 0, /* MEOL */
268 0, /* SEOL */
269 0, /* BOUND */
a0ed51b3 270 0, /* BOUNDUTF8 */
d09b2d29 271 0, /* BOUNDL */
a0ed51b3 272 0, /* BOUNDLUTF8 */
d09b2d29 273 0, /* NBOUND */
a0ed51b3 274 0, /* NBOUNDUTF8 */
d09b2d29 275 0, /* NBOUNDL */
a0ed51b3 276 0, /* NBOUNDLUTF8 */
d09b2d29 277 0, /* GPOS */
22c35a8c 278 0, /* REG_ANY */
a0ed51b3 279 0, /* ANYUTF8 */
d09b2d29 280 0, /* SANY */
a0ed51b3 281 0, /* SANYUTF8 */
d09b2d29 282 0, /* ANYOF */
a0ed51b3 283 0, /* ANYOFUTF8 */
d09b2d29 284 0, /* ALNUM */
a0ed51b3 285 0, /* ALNUMUTF8 */
d09b2d29 286 0, /* ALNUML */
a0ed51b3 287 0, /* ALNUMLUTF8 */
d09b2d29 288 0, /* NALNUM */
a0ed51b3 289 0, /* NALNUMUTF8 */
d09b2d29 290 0, /* NALNUML */
a0ed51b3 291 0, /* NALNUMLUTF8 */
d09b2d29 292 0, /* SPACE */
a0ed51b3 293 0, /* SPACEUTF8 */
d09b2d29 294 0, /* SPACEL */
a0ed51b3 295 0, /* SPACELUTF8 */
d09b2d29 296 0, /* NSPACE */
a0ed51b3 297 0, /* NSPACEUTF8 */
d09b2d29 298 0, /* NSPACEL */
a0ed51b3 299 0, /* NSPACELUTF8 */
d09b2d29 300 0, /* DIGIT */
a0ed51b3 301 0, /* DIGITUTF8 */
b8c5462f
JH
302 0, /* DIGITL */
303 0, /* DIGITLUTF8 */
d09b2d29 304 0, /* NDIGIT */
a0ed51b3 305 0, /* NDIGITUTF8 */
b8c5462f
JH
306 0, /* NDIGITL */
307 0, /* NDIGITLUTF8 */
a0ed51b3 308 0, /* CLUMP */
d09b2d29
IZ
309 0, /* BRANCH */
310 0, /* BACK */
311 0, /* EXACT */
312 0, /* EXACTF */
313 0, /* EXACTFL */
314 0, /* NOTHING */
315 0, /* TAIL */
316 0, /* STAR */
317 0, /* PLUS */
318 0, /* CURLY */
319 0, /* CURLYN */
320 0, /* CURLYM */
321 0, /* CURLYX */
322 0, /* WHILEM */
323 0, /* OPEN */
324 0, /* CLOSE */
325 0, /* REF */
326 0, /* REFF */
327 0, /* REFFL */
328 2, /* IFMATCH */
329 2, /* UNLESSM */
330 1, /* SUSPEND */
331 1, /* IFTHEN */
332 0, /* GROUPP */
333 1, /* LONGJMP */
334 1, /* BRANCHJ */
335 0, /* EVAL */
336 0, /* MINMOD */
337 0, /* LOGICAL */
338 1, /* RENUM */
339 0, /* OPTIMIZED */
340};
885f9e59
GS
341
342#ifdef DEBUGGING
29de9391 343static const char * const reg_name[] = {
885f9e59
GS
344 "END", /* 0 */
345 "SUCCEED", /* 0x1 */
346 "BOL", /* 0x2 */
347 "MBOL", /* 0x3 */
348 "SBOL", /* 0x4 */
349 "EOS", /* 0x5 */
350 "EOL", /* 0x6 */
351 "MEOL", /* 0x7 */
352 "SEOL", /* 0x8 */
353 "BOUND", /* 0x9 */
354 "BOUNDUTF8", /* 0xa */
355 "BOUNDL", /* 0xb */
356 "BOUNDLUTF8", /* 0xc */
357 "NBOUND", /* 0xd */
358 "NBOUNDUTF8", /* 0xe */
359 "NBOUNDL", /* 0xf */
360 "NBOUNDLUTF8", /* 0x10 */
361 "GPOS", /* 0x11 */
362 "REG_ANY", /* 0x12 */
363 "ANYUTF8", /* 0x13 */
364 "SANY", /* 0x14 */
365 "SANYUTF8", /* 0x15 */
366 "ANYOF", /* 0x16 */
367 "ANYOFUTF8", /* 0x17 */
368 "ALNUM", /* 0x18 */
369 "ALNUMUTF8", /* 0x19 */
370 "ALNUML", /* 0x1a */
371 "ALNUMLUTF8", /* 0x1b */
372 "NALNUM", /* 0x1c */
373 "NALNUMUTF8", /* 0x1d */
374 "NALNUML", /* 0x1e */
375 "NALNUMLUTF8", /* 0x1f */
376 "SPACE", /* 0x20 */
377 "SPACEUTF8", /* 0x21 */
378 "SPACEL", /* 0x22 */
379 "SPACELUTF8", /* 0x23 */
380 "NSPACE", /* 0x24 */
381 "NSPACEUTF8", /* 0x25 */
382 "NSPACEL", /* 0x26 */
383 "NSPACELUTF8", /* 0x27 */
384 "DIGIT", /* 0x28 */
385 "DIGITUTF8", /* 0x29 */
b8c5462f
JH
386 "DIGITL", /* 0x2a */
387 "DIGITLUTF8", /* 0x2b */
388 "NDIGIT", /* 0x2c */
389 "NDIGITUTF8", /* 0x2d */
390 "NDIGITL", /* 0x2e */
391 "NDIGITLUTF8", /* 0x2f */
d6a28714
JH
392 "CLUMP", /* 0x30 */
393 "BRANCH", /* 0x31 */
394 "BACK", /* 0x32 */
395 "EXACT", /* 0x33 */
396 "EXACTF", /* 0x34 */
397 "EXACTFL", /* 0x35 */
398 "NOTHING", /* 0x36 */
399 "TAIL", /* 0x37 */
400 "STAR", /* 0x38 */
401 "PLUS", /* 0x39 */
402 "CURLY", /* 0x3a */
403 "CURLYN", /* 0x3b */
404 "CURLYM", /* 0x3c */
405 "CURLYX", /* 0x3d */
406 "WHILEM", /* 0x3e */
407 "OPEN", /* 0x3f */
408 "CLOSE", /* 0x40 */
409 "REF", /* 0x41 */
410 "REFF", /* 0x42 */
411 "REFFL", /* 0x43 */
412 "IFMATCH", /* 0x44 */
413 "UNLESSM", /* 0x45 */
414 "SUSPEND", /* 0x46 */
415 "IFTHEN", /* 0x47 */
416 "GROUPP", /* 0x48 */
417 "LONGJMP", /* 0x49 */
418 "BRANCHJ", /* 0x4a */
419 "EVAL", /* 0x4b */
420 "MINMOD", /* 0x4c */
421 "LOGICAL", /* 0x4d */
422 "RENUM", /* 0x4e */
423 "OPTIMIZED", /* 0x4f */
885f9e59
GS
424};
425
29de9391 426static const int reg_num = 80;
885f9e59
GS
427
428#endif /* DEBUGGING */
d09b2d29
IZ
429#endif /* REG_COMP_C */
430