1 /* -*- buffer-read-only: t -*-
2 !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
3 This file is built by regen/regcomp.pl from regcomp.sym.
4 Any changes made here will be lost!
7 /* Regops and State definitions */
9 #define REGNODE_MAX 122
10 #define REGMATCH_STATE_MAX 162
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 using native charset semantics for non-utf8 */
22 #define BOUNDL 10 /* 0x0a Match "" at any locale word boundary */
23 #define BOUNDU 11 /* 0x0b Match "" at any word boundary using Unicode semantics */
24 #define BOUNDA 12 /* 0x0c Match "" at any word boundary using ASCII semantics */
25 #define NBOUND 13 /* 0x0d Match "" at any word non-boundary using native charset semantics for non-utf8 */
26 #define NBOUNDL 14 /* 0x0e Match "" at any locale word non-boundary */
27 #define NBOUNDU 15 /* 0x0f Match "" at any word non-boundary using Unicode semantics */
28 #define NBOUNDA 16 /* 0x10 Match "" at any word non-boundary using ASCII semantics */
29 #define GPOS 17 /* 0x11 Matches where last m//g left off. */
30 #define REG_ANY 18 /* 0x12 Match any one character (except newline). */
31 #define SANY 19 /* 0x13 Match any one character. */
32 #define CANY 20 /* 0x14 Match any one byte. */
33 #define ANYOF 21 /* 0x15 Match character in (or not in) this class, single char match only */
34 #define ANYOFV 22 /* 0x16 Match character in (or not in) this class, can match-multiple chars */
35 #define ALNUM 23 /* 0x17 Match any alphanumeric character using native charset semantics for non-utf8 */
36 #define ALNUML 24 /* 0x18 Match any alphanumeric char in locale */
37 #define ALNUMU 25 /* 0x19 Match any alphanumeric char using Unicode semantics */
38 #define ALNUMA 26 /* 0x1a Match [A-Za-z_0-9] */
39 #define NALNUM 27 /* 0x1b Match any non-alphanumeric character using native charset semantics for non-utf8 */
40 #define NALNUML 28 /* 0x1c Match any non-alphanumeric char in locale */
41 #define NALNUMU 29 /* 0x1d Match any non-alphanumeric char using Unicode semantics */
42 #define NALNUMA 30 /* 0x1e Match [^A-Za-z_0-9] */
43 #define SPACE 31 /* 0x1f Match any whitespace character using native charset semantics for non-utf8 */
44 #define SPACEL 32 /* 0x20 Match any whitespace char in locale */
45 #define SPACEU 33 /* 0x21 Match any whitespace char using Unicode semantics */
46 #define SPACEA 34 /* 0x22 Match [ \t\n\f\r] */
47 #define NSPACE 35 /* 0x23 Match any non-whitespace character using native charset semantics for non-utf8 */
48 #define NSPACEL 36 /* 0x24 Match any non-whitespace char in locale */
49 #define NSPACEU 37 /* 0x25 Match any non-whitespace char using Unicode semantics */
50 #define NSPACEA 38 /* 0x26 Match [^ \t\n\f\r] */
51 #define DIGIT 39 /* 0x27 Match any numeric character using native charset semantics for non-utf8 */
52 #define DIGITL 40 /* 0x28 Match any numeric character in locale */
53 #define PLACEHOLDER1 41 /* 0x29 placeholder for missing DIGITU */
54 #define DIGITA 42 /* 0x2a Match [0-9] */
55 #define NDIGIT 43 /* 0x2b Match any non-numeric character using native charset semantics for non-utf8 */
56 #define NDIGITL 44 /* 0x2c Match any non-numeric character in locale */
57 #define PLACEHOLDER2 45 /* 0x2d placeholder for missing NDIGITU */
58 #define NDIGITA 46 /* 0x2e Match [^0-9] */
59 #define POSIXD 47 /* 0x2f currently unused except as a placeholder */
60 #define POSIXL 48 /* 0x30 currently unused except as a placeholder */
61 #define POSIXU 49 /* 0x31 currently unused except as a placeholder */
62 #define POSIXA 50 /* 0x32 Some [[:class:]] under /a; the FLAGS field gives which one */
63 #define NPOSIXD 51 /* 0x33 currently unused except as a placeholder */
64 #define NPOSIXL 52 /* 0x34 currently unused except as a placeholder */
65 #define NPOSIXU 53 /* 0x35 currently unused except as a placeholder */
66 #define NPOSIXA 54 /* 0x36 complement of POSIXA, [[:^class:]] */
67 #define CLUMP 55 /* 0x37 Match any extended grapheme cluster sequence */
68 #define BRANCH 56 /* 0x38 Match this alternative, or the next... */
69 #define BACK 57 /* 0x39 Match "", "next" ptr points backward. */
70 #define EXACT 58 /* 0x3a Match this string (preceded by length). */
71 #define EXACTF 59 /* 0x3b Match this non-UTF-8 string (not guaranteed to be folded) using /id rules (w/len). */
72 #define EXACTFL 60 /* 0x3c Match this string (not guaranteed to be folded) using /il rules (w/len). */
73 #define EXACTFU 61 /* 0x3d Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */
74 #define EXACTFA 62 /* 0x3e Match this string (not guaranteed to be folded) using /iaa rules (w/len). */
75 #define EXACTFU_SS 63 /* 0x3f Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */
76 #define EXACTFU_TRICKYFOLD 64 /* 0x40 Match this folded UTF-8 string using /iu rules */
77 #define NOTHING 65 /* 0x41 Match empty string. */
78 #define TAIL 66 /* 0x42 Match empty string. Can jump here from outside. */
79 #define STAR 67 /* 0x43 Match this (simple) thing 0 or more times. */
80 #define PLUS 68 /* 0x44 Match this (simple) thing 1 or more times. */
81 #define CURLY 69 /* 0x45 Match this simple thing {n,m} times. */
82 #define CURLYN 70 /* 0x46 Capture next-after-this simple thing */
83 #define CURLYM 71 /* 0x47 Capture this medium-complex thing {n,m} times. */
84 #define CURLYX 72 /* 0x48 Match this complex thing {n,m} times. */
85 #define WHILEM 73 /* 0x49 Do curly processing and see if rest matches. */
86 #define OPEN 74 /* 0x4a Mark this point in input as start of */
87 #define CLOSE 75 /* 0x4b Analogous to OPEN. */
88 #define REF 76 /* 0x4c Match some already matched string */
89 #define REFF 77 /* 0x4d Match already matched string, folded using native charset semantics for non-utf8 */
90 #define REFFL 78 /* 0x4e Match already matched string, folded in loc. */
91 #define REFFU 79 /* 0x4f Match already matched string, folded using unicode semantics for non-utf8 */
92 #define REFFA 80 /* 0x50 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
93 #define NREF 81 /* 0x51 Match some already matched string */
94 #define NREFF 82 /* 0x52 Match already matched string, folded using native charset semantics for non-utf8 */
95 #define NREFFL 83 /* 0x53 Match already matched string, folded in loc. */
96 #define NREFFU 84 /* 0x54 Match already matched string, folded using unicode semantics for non-utf8 */
97 #define NREFFA 85 /* 0x55 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
98 #define IFMATCH 86 /* 0x56 Succeeds if the following matches. */
99 #define UNLESSM 87 /* 0x57 Fails if the following matches. */
100 #define SUSPEND 88 /* 0x58 "Independent" sub-RE. */
101 #define IFTHEN 89 /* 0x59 Switch, should be preceded by switcher . */
102 #define GROUPP 90 /* 0x5a Whether the group matched. */
103 #define LONGJMP 91 /* 0x5b Jump far away. */
104 #define BRANCHJ 92 /* 0x5c BRANCH with long offset. */
105 #define EVAL 93 /* 0x5d Execute some Perl code. */
106 #define MINMOD 94 /* 0x5e Next operator is not greedy. */
107 #define LOGICAL 95 /* 0x5f Next opcode should set the flag only. */
108 #define RENUM 96 /* 0x60 Group with independently numbered parens. */
109 #define TRIE 97 /* 0x61 Match many EXACT(F[ALU]?)? at once. flags==type */
110 #define TRIEC 98 /* 0x62 Same as TRIE, but with embedded charclass data */
111 #define AHOCORASICK 99 /* 0x63 Aho Corasick stclass. flags==type */
112 #define AHOCORASICKC 100 /* 0x64 Same as AHOCORASICK, but with embedded charclass data */
113 #define GOSUB 101 /* 0x65 recurse to paren arg1 at (signed) ofs arg2 */
114 #define GOSTART 102 /* 0x66 recurse to start of pattern */
115 #define NGROUPP 103 /* 0x67 Whether the group matched. */
116 #define INSUBP 104 /* 0x68 Whether we are in a specific recurse. */
117 #define DEFINEP 105 /* 0x69 Never execute directly. */
118 #define ENDLIKE 106 /* 0x6a Used only for the type field of verbs */
119 #define OPFAIL 107 /* 0x6b Same as (?!) */
120 #define ACCEPT 108 /* 0x6c Accepts the current matched string. */
121 #define VERB 109 /* 0x6d Used only for the type field of verbs */
122 #define PRUNE 110 /* 0x6e Pattern fails at this startpoint if no-backtracking through this */
123 #define MARKPOINT 111 /* 0x6f Push the current location for rollback by cut. */
124 #define SKIP 112 /* 0x70 On failure skip forward (to the mark) before retrying */
125 #define COMMIT 113 /* 0x71 Pattern fails outright if backtracking through this */
126 #define CUTGROUP 114 /* 0x72 On failure go to the next alternation in the group */
127 #define KEEPS 115 /* 0x73 $& begins here. */
128 #define LNBREAK 116 /* 0x74 generic newline pattern */
129 #define VERTWS 117 /* 0x75 vertical whitespace (Perl 6) */
130 #define NVERTWS 118 /* 0x76 not vertical whitespace (Perl 6) */
131 #define HORIZWS 119 /* 0x77 horizontal whitespace (Perl 6) */
132 #define NHORIZWS 120 /* 0x78 not horizontal whitespace (Perl 6) */
133 #define OPTIMIZED 121 /* 0x79 Placeholder for dump. */
134 #define PSEUDO 122 /* 0x7a Pseudo opcode for internal use. */
135 /* ------------ States ------------- */
136 #define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */
137 #define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */
138 #define EVAL_AB (REGNODE_MAX + 3) /* state for EVAL */
139 #define EVAL_AB_fail (REGNODE_MAX + 4) /* state for EVAL */
140 #define CURLYX_end (REGNODE_MAX + 5) /* state for CURLYX */
141 #define CURLYX_end_fail (REGNODE_MAX + 6) /* state for CURLYX */
142 #define WHILEM_A_pre (REGNODE_MAX + 7) /* state for WHILEM */
143 #define WHILEM_A_pre_fail (REGNODE_MAX + 8) /* state for WHILEM */
144 #define WHILEM_A_min (REGNODE_MAX + 9) /* state for WHILEM */
145 #define WHILEM_A_min_fail (REGNODE_MAX + 10) /* state for WHILEM */
146 #define WHILEM_A_max (REGNODE_MAX + 11) /* state for WHILEM */
147 #define WHILEM_A_max_fail (REGNODE_MAX + 12) /* state for WHILEM */
148 #define WHILEM_B_min (REGNODE_MAX + 13) /* state for WHILEM */
149 #define WHILEM_B_min_fail (REGNODE_MAX + 14) /* state for WHILEM */
150 #define WHILEM_B_max (REGNODE_MAX + 15) /* state for WHILEM */
151 #define WHILEM_B_max_fail (REGNODE_MAX + 16) /* state for WHILEM */
152 #define BRANCH_next (REGNODE_MAX + 17) /* state for BRANCH */
153 #define BRANCH_next_fail (REGNODE_MAX + 18) /* state for BRANCH */
154 #define CURLYM_A (REGNODE_MAX + 19) /* state for CURLYM */
155 #define CURLYM_A_fail (REGNODE_MAX + 20) /* state for CURLYM */
156 #define CURLYM_B (REGNODE_MAX + 21) /* state for CURLYM */
157 #define CURLYM_B_fail (REGNODE_MAX + 22) /* state for CURLYM */
158 #define IFMATCH_A (REGNODE_MAX + 23) /* state for IFMATCH */
159 #define IFMATCH_A_fail (REGNODE_MAX + 24) /* state for IFMATCH */
160 #define CURLY_B_min_known (REGNODE_MAX + 25) /* state for CURLY */
161 #define CURLY_B_min_known_fail (REGNODE_MAX + 26) /* state for CURLY */
162 #define CURLY_B_min (REGNODE_MAX + 27) /* state for CURLY */
163 #define CURLY_B_min_fail (REGNODE_MAX + 28) /* state for CURLY */
164 #define CURLY_B_max (REGNODE_MAX + 29) /* state for CURLY */
165 #define CURLY_B_max_fail (REGNODE_MAX + 30) /* state for CURLY */
166 #define COMMIT_next (REGNODE_MAX + 31) /* state for COMMIT */
167 #define COMMIT_next_fail (REGNODE_MAX + 32) /* state for COMMIT */
168 #define MARKPOINT_next (REGNODE_MAX + 33) /* state for MARKPOINT */
169 #define MARKPOINT_next_fail (REGNODE_MAX + 34) /* state for MARKPOINT */
170 #define SKIP_next (REGNODE_MAX + 35) /* state for SKIP */
171 #define SKIP_next_fail (REGNODE_MAX + 36) /* state for SKIP */
172 #define CUTGROUP_next (REGNODE_MAX + 37) /* state for CUTGROUP */
173 #define CUTGROUP_next_fail (REGNODE_MAX + 38) /* state for CUTGROUP */
174 #define KEEPS_next (REGNODE_MAX + 39) /* state for KEEPS */
175 #define KEEPS_next_fail (REGNODE_MAX + 40) /* state for KEEPS */
177 /* PL_regkind[] What type of regop or state is this. */
180 EXTCONST U8 PL_regkind[];
182 EXTCONST U8 PL_regkind[] = {
197 NBOUND, /* NBOUNDL */
198 NBOUND, /* NBOUNDU */
199 NBOUND, /* NBOUNDA */
201 REG_ANY, /* REG_ANY */
211 NALNUM, /* NALNUML */
212 NALNUM, /* NALNUMU */
213 NALNUM, /* NALNUMA */
219 NSPACE, /* NSPACEL */
220 NSPACE, /* NSPACEU */
221 NSPACE, /* NSPACEA */
224 NOTHING, /* PLACEHOLDER1 */
227 NDIGIT, /* NDIGITL */
228 NOTHING, /* PLACEHOLDER2 */
229 NDIGIT, /* NDIGITA */
234 POSIXD, /* NPOSIXD */
235 POSIXD, /* NPOSIXL */
236 POSIXD, /* NPOSIXU */
237 POSIXD, /* NPOSIXA */
246 EXACT, /* EXACTFU_SS */
247 EXACT, /* EXACTFU_TRICKYFOLD */
248 NOTHING, /* NOTHING */
269 BRANCHJ, /* IFMATCH */
270 BRANCHJ, /* UNLESSM */
271 BRANCHJ, /* SUSPEND */
272 BRANCHJ, /* IFTHEN */
274 LONGJMP, /* LONGJMP */
275 BRANCHJ, /* BRANCHJ */
278 LOGICAL, /* LOGICAL */
282 TRIE, /* AHOCORASICK */
283 TRIE, /* AHOCORASICKC */
285 GOSTART, /* GOSTART */
286 NGROUPP, /* NGROUPP */
288 DEFINEP, /* DEFINEP */
289 ENDLIKE, /* ENDLIKE */
290 ENDLIKE, /* OPFAIL */
291 ENDLIKE, /* ACCEPT */
294 VERB, /* MARKPOINT */
299 LNBREAK, /* LNBREAK */
301 NVERTWS, /* NVERTWS */
302 HORIZWS, /* HORIZWS */
303 NHORIZWS, /* NHORIZWS */
304 NOTHING, /* OPTIMIZED */
306 /* ------------ States ------------- */
307 TRIE, /* TRIE_next */
308 TRIE, /* TRIE_next_fail */
310 EVAL, /* EVAL_AB_fail */
311 CURLYX, /* CURLYX_end */
312 CURLYX, /* CURLYX_end_fail */
313 WHILEM, /* WHILEM_A_pre */
314 WHILEM, /* WHILEM_A_pre_fail */
315 WHILEM, /* WHILEM_A_min */
316 WHILEM, /* WHILEM_A_min_fail */
317 WHILEM, /* WHILEM_A_max */
318 WHILEM, /* WHILEM_A_max_fail */
319 WHILEM, /* WHILEM_B_min */
320 WHILEM, /* WHILEM_B_min_fail */
321 WHILEM, /* WHILEM_B_max */
322 WHILEM, /* WHILEM_B_max_fail */
323 BRANCH, /* BRANCH_next */
324 BRANCH, /* BRANCH_next_fail */
325 CURLYM, /* CURLYM_A */
326 CURLYM, /* CURLYM_A_fail */
327 CURLYM, /* CURLYM_B */
328 CURLYM, /* CURLYM_B_fail */
329 IFMATCH, /* IFMATCH_A */
330 IFMATCH, /* IFMATCH_A_fail */
331 CURLY, /* CURLY_B_min_known */
332 CURLY, /* CURLY_B_min_known_fail */
333 CURLY, /* CURLY_B_min */
334 CURLY, /* CURLY_B_min_fail */
335 CURLY, /* CURLY_B_max */
336 CURLY, /* CURLY_B_max_fail */
337 COMMIT, /* COMMIT_next */
338 COMMIT, /* COMMIT_next_fail */
339 MARKPOINT, /* MARKPOINT_next */
340 MARKPOINT, /* MARKPOINT_next_fail */
341 SKIP, /* SKIP_next */
342 SKIP, /* SKIP_next_fail */
343 CUTGROUP, /* CUTGROUP_next */
344 CUTGROUP, /* CUTGROUP_next_fail */
345 KEEPS, /* KEEPS_next */
346 KEEPS, /* KEEPS_next_fail */
350 /* regarglen[] - How large is the argument part of the node (in regnodes) */
353 static const U8 regarglen[] = {
395 0, /* PLACEHOLDER1 */
399 0, /* PLACEHOLDER2 */
418 0, /* EXACTFU_TRICKYFOLD */
423 EXTRA_SIZE(struct regnode_2), /* CURLY */
424 EXTRA_SIZE(struct regnode_2), /* CURLYN */
425 EXTRA_SIZE(struct regnode_2), /* CURLYM */
426 EXTRA_SIZE(struct regnode_2), /* CURLYX */
428 EXTRA_SIZE(struct regnode_1), /* OPEN */
429 EXTRA_SIZE(struct regnode_1), /* CLOSE */
430 EXTRA_SIZE(struct regnode_1), /* REF */
431 EXTRA_SIZE(struct regnode_1), /* REFF */
432 EXTRA_SIZE(struct regnode_1), /* REFFL */
433 EXTRA_SIZE(struct regnode_1), /* REFFU */
434 EXTRA_SIZE(struct regnode_1), /* REFFA */
435 EXTRA_SIZE(struct regnode_1), /* NREF */
436 EXTRA_SIZE(struct regnode_1), /* NREFF */
437 EXTRA_SIZE(struct regnode_1), /* NREFFL */
438 EXTRA_SIZE(struct regnode_1), /* NREFFU */
439 EXTRA_SIZE(struct regnode_1), /* NREFFA */
440 EXTRA_SIZE(struct regnode_1), /* IFMATCH */
441 EXTRA_SIZE(struct regnode_1), /* UNLESSM */
442 EXTRA_SIZE(struct regnode_1), /* SUSPEND */
443 EXTRA_SIZE(struct regnode_1), /* IFTHEN */
444 EXTRA_SIZE(struct regnode_1), /* GROUPP */
445 EXTRA_SIZE(struct regnode_1), /* LONGJMP */
446 EXTRA_SIZE(struct regnode_1), /* BRANCHJ */
447 EXTRA_SIZE(struct regnode_1), /* EVAL */
450 EXTRA_SIZE(struct regnode_1), /* RENUM */
451 EXTRA_SIZE(struct regnode_1), /* TRIE */
452 EXTRA_SIZE(struct regnode_charclass), /* TRIEC */
453 EXTRA_SIZE(struct regnode_1), /* AHOCORASICK */
454 EXTRA_SIZE(struct regnode_charclass), /* AHOCORASICKC */
455 EXTRA_SIZE(struct regnode_2L), /* GOSUB */
457 EXTRA_SIZE(struct regnode_1), /* NGROUPP */
458 EXTRA_SIZE(struct regnode_1), /* INSUBP */
459 EXTRA_SIZE(struct regnode_1), /* DEFINEP */
462 EXTRA_SIZE(struct regnode_1), /* ACCEPT */
463 EXTRA_SIZE(struct regnode_1), /* VERB */
464 EXTRA_SIZE(struct regnode_1), /* PRUNE */
465 EXTRA_SIZE(struct regnode_1), /* MARKPOINT */
466 EXTRA_SIZE(struct regnode_1), /* SKIP */
467 EXTRA_SIZE(struct regnode_1), /* COMMIT */
468 EXTRA_SIZE(struct regnode_1), /* CUTGROUP */
479 /* reg_off_by_arg[] - Which argument holds the offset to the next node */
481 static const char reg_off_by_arg[] = {
523 0, /* PLACEHOLDER1 */
527 0, /* PLACEHOLDER2 */
546 0, /* EXACTFU_TRICKYFOLD */
582 0, /* AHOCORASICKC */
607 #endif /* REG_COMP_C */
609 /* reg_name[] - Opcode/state names in string form, for debugging */
612 EXTCONST char * PL_reg_name[];
614 EXTCONST char * const PL_reg_name[] = {
616 "SUCCEED", /* 0x01 */
629 "NBOUNDL", /* 0x0e */
630 "NBOUNDU", /* 0x0f */
631 "NBOUNDA", /* 0x10 */
633 "REG_ANY", /* 0x12 */
643 "NALNUML", /* 0x1c */
644 "NALNUMU", /* 0x1d */
645 "NALNUMA", /* 0x1e */
651 "NSPACEL", /* 0x24 */
652 "NSPACEU", /* 0x25 */
653 "NSPACEA", /* 0x26 */
656 "PLACEHOLDER1", /* 0x29 */
659 "NDIGITL", /* 0x2c */
660 "PLACEHOLDER2", /* 0x2d */
661 "NDIGITA", /* 0x2e */
666 "NPOSIXD", /* 0x33 */
667 "NPOSIXL", /* 0x34 */
668 "NPOSIXU", /* 0x35 */
669 "NPOSIXA", /* 0x36 */
675 "EXACTFL", /* 0x3c */
676 "EXACTFU", /* 0x3d */
677 "EXACTFA", /* 0x3e */
678 "EXACTFU_SS", /* 0x3f */
679 "EXACTFU_TRICKYFOLD", /* 0x40 */
680 "NOTHING", /* 0x41 */
701 "IFMATCH", /* 0x56 */
702 "UNLESSM", /* 0x57 */
703 "SUSPEND", /* 0x58 */
706 "LONGJMP", /* 0x5b */
707 "BRANCHJ", /* 0x5c */
710 "LOGICAL", /* 0x5f */
714 "AHOCORASICK", /* 0x63 */
715 "AHOCORASICKC", /* 0x64 */
717 "GOSTART", /* 0x66 */
718 "NGROUPP", /* 0x67 */
720 "DEFINEP", /* 0x69 */
721 "ENDLIKE", /* 0x6a */
726 "MARKPOINT", /* 0x6f */
729 "CUTGROUP", /* 0x72 */
731 "LNBREAK", /* 0x74 */
733 "NVERTWS", /* 0x76 */
734 "HORIZWS", /* 0x77 */
735 "NHORIZWS", /* 0x78 */
736 "OPTIMIZED", /* 0x79 */
738 /* ------------ States ------------- */
739 "TRIE_next", /* REGNODE_MAX +0x01 */
740 "TRIE_next_fail", /* REGNODE_MAX +0x02 */
741 "EVAL_AB", /* REGNODE_MAX +0x03 */
742 "EVAL_AB_fail", /* REGNODE_MAX +0x04 */
743 "CURLYX_end", /* REGNODE_MAX +0x05 */
744 "CURLYX_end_fail", /* REGNODE_MAX +0x06 */
745 "WHILEM_A_pre", /* REGNODE_MAX +0x07 */
746 "WHILEM_A_pre_fail", /* REGNODE_MAX +0x08 */
747 "WHILEM_A_min", /* REGNODE_MAX +0x09 */
748 "WHILEM_A_min_fail", /* REGNODE_MAX +0x0a */
749 "WHILEM_A_max", /* REGNODE_MAX +0x0b */
750 "WHILEM_A_max_fail", /* REGNODE_MAX +0x0c */
751 "WHILEM_B_min", /* REGNODE_MAX +0x0d */
752 "WHILEM_B_min_fail", /* REGNODE_MAX +0x0e */
753 "WHILEM_B_max", /* REGNODE_MAX +0x0f */
754 "WHILEM_B_max_fail", /* REGNODE_MAX +0x10 */
755 "BRANCH_next", /* REGNODE_MAX +0x11 */
756 "BRANCH_next_fail", /* REGNODE_MAX +0x12 */
757 "CURLYM_A", /* REGNODE_MAX +0x13 */
758 "CURLYM_A_fail", /* REGNODE_MAX +0x14 */
759 "CURLYM_B", /* REGNODE_MAX +0x15 */
760 "CURLYM_B_fail", /* REGNODE_MAX +0x16 */
761 "IFMATCH_A", /* REGNODE_MAX +0x17 */
762 "IFMATCH_A_fail", /* REGNODE_MAX +0x18 */
763 "CURLY_B_min_known", /* REGNODE_MAX +0x19 */
764 "CURLY_B_min_known_fail", /* REGNODE_MAX +0x1a */
765 "CURLY_B_min", /* REGNODE_MAX +0x1b */
766 "CURLY_B_min_fail", /* REGNODE_MAX +0x1c */
767 "CURLY_B_max", /* REGNODE_MAX +0x1d */
768 "CURLY_B_max_fail", /* REGNODE_MAX +0x1e */
769 "COMMIT_next", /* REGNODE_MAX +0x1f */
770 "COMMIT_next_fail", /* REGNODE_MAX +0x20 */
771 "MARKPOINT_next", /* REGNODE_MAX +0x21 */
772 "MARKPOINT_next_fail", /* REGNODE_MAX +0x22 */
773 "SKIP_next", /* REGNODE_MAX +0x23 */
774 "SKIP_next_fail", /* REGNODE_MAX +0x24 */
775 "CUTGROUP_next", /* REGNODE_MAX +0x25 */
776 "CUTGROUP_next_fail", /* REGNODE_MAX +0x26 */
777 "KEEPS_next", /* REGNODE_MAX +0x27 */
778 "KEEPS_next_fail", /* REGNODE_MAX +0x28 */
782 /* PL_reg_extflags_name[] - Opcode/state names in string form, for debugging */
785 EXTCONST char * PL_reg_extflags_name[];
787 EXTCONST char * const PL_reg_extflags_name[] = {
788 /* Bits in extflags defined: 11111111111111111111111011111111 */
789 "MULTILINE", /* 0x00000001 */
790 "SINGLELINE", /* 0x00000002 */
791 "FOLD", /* 0x00000004 */
792 "EXTENDED", /* 0x00000008 */
793 "KEEPCOPY", /* 0x00000010 */
794 "CHARSET", /* 0x000000e0 */
795 "CHARSET", /* 0x000000e0 */
796 "CHARSET", /* 0x000000e0 */
797 "UNUSED_BIT_8", /* 0x00000100 */
798 "ANCH_BOL", /* 0x00000200 */
799 "ANCH_MBOL", /* 0x00000400 */
800 "ANCH_SBOL", /* 0x00000800 */
801 "ANCH_GPOS", /* 0x00001000 */
802 "GPOS_SEEN", /* 0x00002000 */
803 "GPOS_FLOAT", /* 0x00004000 */
804 "LOOKBEHIND_SEEN", /* 0x00008000 */
805 "EVAL_SEEN", /* 0x00010000 */
806 "CANY_SEEN", /* 0x00020000 */
807 "NOSCAN", /* 0x00040000 */
808 "CHECK_ALL", /* 0x00080000 */
809 "MATCH_UTF8", /* 0x00100000 */
810 "USE_INTUIT_NOML", /* 0x00200000 */
811 "USE_INTUIT_ML", /* 0x00400000 */
812 "INTUIT_TAIL", /* 0x00800000 */
813 "SPLIT", /* 0x01000000 */
814 "COPY_DONE", /* 0x02000000 */
815 "TAINTED_SEEN", /* 0x04000000 */
816 "TAINTED", /* 0x08000000 */
817 "START_ONLY", /* 0x10000000 */
818 "SKIPWHITE", /* 0x20000000 */
819 "WHITE", /* 0x40000000 */
820 "NULL", /* 0x80000000 */
824 /* The following have no fixed length. U8 so we can do strchr() on it. */
825 #define REGNODE_VARIES(node) (PL_varies_bitmask[(node) >> 3] & (1 << ((node) & 7)))
828 EXTCONST U8 PL_varies[] __attribute__deprecated__;
830 EXTCONST U8 PL_varies[] __attribute__deprecated__ = {
831 ANYOFV, CLUMP, BRANCH, BACK, STAR, PLUS, CURLY, CURLYN, CURLYM, CURLYX,
832 WHILEM, REF, REFF, REFFL, REFFU, REFFA, NREF, NREFF, NREFFL, NREFFU,
833 NREFFA, SUSPEND, IFTHEN, BRANCHJ,
839 EXTCONST U8 PL_varies_bitmask[];
841 EXTCONST U8 PL_varies_bitmask[] = {
842 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x03, 0xF8, 0xF3, 0x3F, 0x13, 0x00, 0x00, 0x00, 0x00
846 /* The following always have a length of 1. U8 we can do strchr() on it. */
847 /* (Note that length 1 means "one character" under UTF8, not "one octet".) */
848 #define REGNODE_SIMPLE(node) (PL_simple_bitmask[(node) >> 3] & (1 << ((node) & 7)))
851 EXTCONST U8 PL_simple[] __attribute__deprecated__;
853 EXTCONST U8 PL_simple[] __attribute__deprecated__ = {
854 REG_ANY, SANY, CANY, ANYOF, ALNUM, ALNUML, ALNUMU, ALNUMA, NALNUM,
855 NALNUML, NALNUMU, NALNUMA, SPACE, SPACEL, SPACEU, SPACEA, NSPACE,
856 NSPACEL, NSPACEU, NSPACEA, DIGIT, DIGITL, DIGITA, NDIGIT, NDIGITL,
857 NDIGITA, POSIXD, POSIXL, POSIXU, POSIXA, NPOSIXD, NPOSIXL, NPOSIXU,
858 NPOSIXA, VERTWS, NVERTWS, HORIZWS, NHORIZWS,
864 EXTCONST U8 PL_simple_bitmask[];
866 EXTCONST U8 PL_simple_bitmask[] = {
867 0x00, 0x00, 0xBC, 0xFF, 0xFF, 0xDD, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01