Commit | Line | Data |
---|---|---|
37442d52 RGS |
1 | /* -*- buffer-read-only: t -*- |
2 | !!!!!!! DO NOT EDIT THIS FILE !!!!!!! | |
eb2624c9 | 3 | This file is built by regen/regcomp.pl from regcomp.sym. |
d09b2d29 | 4 | Any changes made here will be lost! |
78102347 | 5 | */ |
d09b2d29 | 6 | |
6bda09f9 YO |
7 | /* Regops and State definitions */ |
8 | ||
d5a00e4a YO |
9 | #define REGNODE_MAX 92 |
10 | #define REGMATCH_STATE_MAX 132 | |
03363afd | 11 | |
f9f4320a YO |
12 | #define END 0 /* 0000 End of program. */ |
13 | #define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */ | |
d3d47aac YO |
14 | #define SBOL 2 /* 0x02 Match "" at beginning of line: /^/, /\A/ */ |
15 | #define BOL 2 /* 0x02 type alias */ | |
16 | #define MBOL 3 /* 0x03 Same, assuming multiline: /^/m */ | |
17 | #define SEOL 4 /* 0x04 Match "" at end of line: /$/ */ | |
18 | #define EOL 4 /* 0x04 type alias */ | |
19 | #define MEOL 5 /* 0x05 Same, assuming multiline: /$/m */ | |
20 | #define EOS 6 /* 0x06 Match "" at end of string: /\z/ */ | |
21 | #define GPOS 7 /* 0x07 Matches where last m//g left off. */ | |
c440a570 KW |
22 | #define BOUND 8 /* 0x08 Like BOUNDA for non-utf8, otherwise match "" between any Unicode \w\W or \W\w */ |
23 | #define BOUNDL 9 /* 0x09 Like BOUND/BOUNDU, but \w and \W are defined by current locale */ | |
64935bc6 | 24 | #define BOUNDU 10 /* 0x0a Match "" at any boundary of a given type using Unicode rules */ |
c440a570 KW |
25 | #define BOUNDA 11 /* 0x0b Match "" at any boundary between \w\W or \W\w, where \w is [_a-zA-Z0-9] */ |
26 | #define NBOUND 12 /* 0x0c Like NBOUNDA for non-utf8, otherwise match "" between any Unicode \w\w or \W\W */ | |
27 | #define NBOUNDL 13 /* 0x0d Like NBOUND/NBOUNDU, but \w and \W are defined by current locale */ | |
28 | #define NBOUNDU 14 /* 0x0e Match "" at any non-boundary of a given type using using Unicode rules */ | |
29 | #define NBOUNDA 15 /* 0x0f Match "" betweeen any \w\w or \W\W, where \w is [_a-zA-Z0-9] */ | |
d3d47aac YO |
30 | #define REG_ANY 16 /* 0x10 Match any one character (except newline). */ |
31 | #define SANY 17 /* 0x11 Match any one character. */ | |
33c28ab2 | 32 | #define ANYOF 18 /* 0x12 Match character in (or not in) this class, single char match only */ |
ac44c12e KW |
33 | #define ANYOFD 19 /* 0x13 Like ANYOF, but /d is in effect */ |
34 | #define ANYOFL 20 /* 0x14 Like ANYOF, but /l is in effect */ | |
35 | #define POSIXD 21 /* 0x15 Some [[:class:]] under /d; the FLAGS field gives which one */ | |
36 | #define POSIXL 22 /* 0x16 Some [[:class:]] under /l; the FLAGS field gives which one */ | |
37 | #define POSIXU 23 /* 0x17 Some [[:class:]] under /u; the FLAGS field gives which one */ | |
38 | #define POSIXA 24 /* 0x18 Some [[:class:]] under /a; the FLAGS field gives which one */ | |
39 | #define NPOSIXD 25 /* 0x19 complement of POSIXD, [[:^class:]] */ | |
40 | #define NPOSIXL 26 /* 0x1a complement of POSIXL, [[:^class:]] */ | |
41 | #define NPOSIXU 27 /* 0x1b complement of POSIXU, [[:^class:]] */ | |
42 | #define NPOSIXA 28 /* 0x1c complement of POSIXA, [[:^class:]] */ | |
43 | #define CLUMP 29 /* 0x1d Match any extended grapheme cluster sequence */ | |
44 | #define BRANCH 30 /* 0x1e Match this alternative, or the next... */ | |
45 | #define EXACT 31 /* 0x1f Match this string (preceded by length). */ | |
46 | #define EXACTL 32 /* 0x20 Like EXACT, but /l is in effect (used so locale-related warnings can be checked for). */ | |
47 | #define EXACTF 33 /* 0x21 Match this non-UTF-8 string (not guaranteed to be folded) using /id rules (w/len). */ | |
48 | #define EXACTFL 34 /* 0x22 Match this string (not guaranteed to be folded) using /il rules (w/len). */ | |
49 | #define EXACTFU 35 /* 0x23 Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */ | |
50 | #define EXACTFA 36 /* 0x24 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */ | |
51 | #define EXACTFU_SS 37 /* 0x25 Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */ | |
52 | #define EXACTFLU8 38 /* 0x26 Rare cirucmstances: like EXACTFU, but is under /l, UTF-8, folded, and everything in it is above 255. */ | |
53 | #define EXACTFA_NO_TRIE 39 /* 0x27 Match this string (which is not trie-able; not guaranteed to be folded) using /iaa rules (w/len). */ | |
54 | #define NOTHING 40 /* 0x28 Match empty string. */ | |
55 | #define TAIL 41 /* 0x29 Match empty string. Can jump here from outside. */ | |
56 | #define STAR 42 /* 0x2a Match this (simple) thing 0 or more times. */ | |
57 | #define PLUS 43 /* 0x2b Match this (simple) thing 1 or more times. */ | |
58 | #define CURLY 44 /* 0x2c Match this simple thing {n,m} times. */ | |
59 | #define CURLYN 45 /* 0x2d Capture next-after-this simple thing */ | |
60 | #define CURLYM 46 /* 0x2e Capture this medium-complex thing {n,m} times. */ | |
61 | #define CURLYX 47 /* 0x2f Match this complex thing {n,m} times. */ | |
62 | #define WHILEM 48 /* 0x30 Do curly processing and see if rest matches. */ | |
63 | #define OPEN 49 /* 0x31 Mark this point in input as start of #n. */ | |
64 | #define CLOSE 50 /* 0x32 Analogous to OPEN. */ | |
65 | #define REF 51 /* 0x33 Match some already matched string */ | |
66 | #define REFF 52 /* 0x34 Match already matched string, folded using native charset rules for non-utf8 */ | |
67 | #define REFFL 53 /* 0x35 Match already matched string, folded in loc. */ | |
68 | #define REFFU 54 /* 0x36 Match already matched string, folded using unicode rules for non-utf8 */ | |
69 | #define REFFA 55 /* 0x37 Match already matched string, folded using unicode rules for non-utf8, no mixing ASCII, non-ASCII */ | |
70 | #define NREF 56 /* 0x38 Match some already matched string */ | |
71 | #define NREFF 57 /* 0x39 Match already matched string, folded using native charset rules for non-utf8 */ | |
72 | #define NREFFL 58 /* 0x3a Match already matched string, folded in loc. */ | |
73 | #define NREFFU 59 /* 0x3b Match already matched string, folded using unicode rules for non-utf8 */ | |
74 | #define NREFFA 60 /* 0x3c Match already matched string, folded using unicode rules for non-utf8, no mixing ASCII, non-ASCII */ | |
75 | #define LONGJMP 61 /* 0x3d Jump far away. */ | |
76 | #define BRANCHJ 62 /* 0x3e BRANCH with long offset. */ | |
77 | #define IFMATCH 63 /* 0x3f Succeeds if the following matches. */ | |
78 | #define UNLESSM 64 /* 0x40 Fails if the following matches. */ | |
79 | #define SUSPEND 65 /* 0x41 "Independent" sub-RE. */ | |
80 | #define IFTHEN 66 /* 0x42 Switch, should be preceded by switcher. */ | |
81 | #define GROUPP 67 /* 0x43 Whether the group matched. */ | |
82 | #define EVAL 68 /* 0x44 Execute some Perl code. */ | |
83 | #define MINMOD 69 /* 0x45 Next operator is not greedy. */ | |
84 | #define LOGICAL 70 /* 0x46 Next opcode should set the flag only. */ | |
85 | #define RENUM 71 /* 0x47 Group with independently numbered parens. */ | |
86 | #define TRIE 72 /* 0x48 Match many EXACT(F[ALU]?)? at once. flags==type */ | |
87 | #define TRIEC 73 /* 0x49 Same as TRIE, but with embedded charclass data */ | |
88 | #define AHOCORASICK 74 /* 0x4a Aho Corasick stclass. flags==type */ | |
89 | #define AHOCORASICKC 75 /* 0x4b Same as AHOCORASICK, but with embedded charclass data */ | |
90 | #define GOSUB 76 /* 0x4c recurse to paren arg1 at (signed) ofs arg2 */ | |
d5a00e4a YO |
91 | #define NGROUPP 77 /* 0x4d Whether the group matched. */ |
92 | #define INSUBP 78 /* 0x4e Whether we are in a specific recurse. */ | |
93 | #define DEFINEP 79 /* 0x4f Never execute directly. */ | |
94 | #define ENDLIKE 80 /* 0x50 Used only for the type field of verbs */ | |
95 | #define OPFAIL 81 /* 0x51 Same as (?!), but with verb arg */ | |
96 | #define ACCEPT 82 /* 0x52 Accepts the current matched string, with verbar */ | |
97 | #define VERB 83 /* 0x53 Used only for the type field of verbs */ | |
98 | #define PRUNE 84 /* 0x54 Pattern fails at this startpoint if no-backtracking through this */ | |
99 | #define MARKPOINT 85 /* 0x55 Push the current location for rollback by cut. */ | |
100 | #define SKIP 86 /* 0x56 On failure skip forward (to the mark) before retrying */ | |
101 | #define COMMIT 87 /* 0x57 Pattern fails outright if backtracking through this */ | |
102 | #define CUTGROUP 88 /* 0x58 On failure go to the next alternation in the group */ | |
103 | #define KEEPS 89 /* 0x59 $& begins here. */ | |
104 | #define LNBREAK 90 /* 0x5a generic newline pattern */ | |
105 | #define OPTIMIZED 91 /* 0x5b Placeholder for dump. */ | |
106 | #define PSEUDO 92 /* 0x5c Pseudo opcode for internal use. */ | |
03363afd | 107 | /* ------------ States ------------- */ |
24b23f37 YO |
108 | #define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */ |
109 | #define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */ | |
110 | #define EVAL_AB (REGNODE_MAX + 3) /* state for EVAL */ | |
111 | #define EVAL_AB_fail (REGNODE_MAX + 4) /* state for EVAL */ | |
112 | #define CURLYX_end (REGNODE_MAX + 5) /* state for CURLYX */ | |
113 | #define CURLYX_end_fail (REGNODE_MAX + 6) /* state for CURLYX */ | |
114 | #define WHILEM_A_pre (REGNODE_MAX + 7) /* state for WHILEM */ | |
115 | #define WHILEM_A_pre_fail (REGNODE_MAX + 8) /* state for WHILEM */ | |
116 | #define WHILEM_A_min (REGNODE_MAX + 9) /* state for WHILEM */ | |
117 | #define WHILEM_A_min_fail (REGNODE_MAX + 10) /* state for WHILEM */ | |
118 | #define WHILEM_A_max (REGNODE_MAX + 11) /* state for WHILEM */ | |
119 | #define WHILEM_A_max_fail (REGNODE_MAX + 12) /* state for WHILEM */ | |
120 | #define WHILEM_B_min (REGNODE_MAX + 13) /* state for WHILEM */ | |
121 | #define WHILEM_B_min_fail (REGNODE_MAX + 14) /* state for WHILEM */ | |
122 | #define WHILEM_B_max (REGNODE_MAX + 15) /* state for WHILEM */ | |
123 | #define WHILEM_B_max_fail (REGNODE_MAX + 16) /* state for WHILEM */ | |
124 | #define BRANCH_next (REGNODE_MAX + 17) /* state for BRANCH */ | |
125 | #define BRANCH_next_fail (REGNODE_MAX + 18) /* state for BRANCH */ | |
126 | #define CURLYM_A (REGNODE_MAX + 19) /* state for CURLYM */ | |
127 | #define CURLYM_A_fail (REGNODE_MAX + 20) /* state for CURLYM */ | |
128 | #define CURLYM_B (REGNODE_MAX + 21) /* state for CURLYM */ | |
129 | #define CURLYM_B_fail (REGNODE_MAX + 22) /* state for CURLYM */ | |
130 | #define IFMATCH_A (REGNODE_MAX + 23) /* state for IFMATCH */ | |
131 | #define IFMATCH_A_fail (REGNODE_MAX + 24) /* state for IFMATCH */ | |
132 | #define CURLY_B_min_known (REGNODE_MAX + 25) /* state for CURLY */ | |
133 | #define CURLY_B_min_known_fail (REGNODE_MAX + 26) /* state for CURLY */ | |
134 | #define CURLY_B_min (REGNODE_MAX + 27) /* state for CURLY */ | |
135 | #define CURLY_B_min_fail (REGNODE_MAX + 28) /* state for CURLY */ | |
136 | #define CURLY_B_max (REGNODE_MAX + 29) /* state for CURLY */ | |
137 | #define CURLY_B_max_fail (REGNODE_MAX + 30) /* state for CURLY */ | |
138 | #define COMMIT_next (REGNODE_MAX + 31) /* state for COMMIT */ | |
139 | #define COMMIT_next_fail (REGNODE_MAX + 32) /* state for COMMIT */ | |
e2e6a0f1 YO |
140 | #define MARKPOINT_next (REGNODE_MAX + 33) /* state for MARKPOINT */ |
141 | #define MARKPOINT_next_fail (REGNODE_MAX + 34) /* state for MARKPOINT */ | |
5d458dd8 YO |
142 | #define SKIP_next (REGNODE_MAX + 35) /* state for SKIP */ |
143 | #define SKIP_next_fail (REGNODE_MAX + 36) /* state for SKIP */ | |
144 | #define CUTGROUP_next (REGNODE_MAX + 37) /* state for CUTGROUP */ | |
145 | #define CUTGROUP_next_fail (REGNODE_MAX + 38) /* state for CUTGROUP */ | |
ee9b8eae YO |
146 | #define KEEPS_next (REGNODE_MAX + 39) /* state for KEEPS */ |
147 | #define KEEPS_next_fail (REGNODE_MAX + 40) /* state for KEEPS */ | |
03363afd | 148 | |
6bda09f9 | 149 | /* PL_regkind[] What type of regop or state is this. */ |
d09b2d29 IZ |
150 | |
151 | #ifndef DOINIT | |
22c35a8c | 152 | EXTCONST U8 PL_regkind[]; |
d09b2d29 | 153 | #else |
22c35a8c | 154 | EXTCONST U8 PL_regkind[] = { |
e2e6a0f1 YO |
155 | END, /* END */ |
156 | END, /* SUCCEED */ | |
e2e6a0f1 | 157 | BOL, /* SBOL */ |
d3d47aac | 158 | BOL, /* MBOL */ |
e2e6a0f1 | 159 | EOL, /* SEOL */ |
d3d47aac YO |
160 | EOL, /* MEOL */ |
161 | EOL, /* EOS */ | |
162 | GPOS, /* GPOS */ | |
e2e6a0f1 YO |
163 | BOUND, /* BOUND */ |
164 | BOUND, /* BOUNDL */ | |
1e355c70 | 165 | BOUND, /* BOUNDU */ |
0c6e81eb | 166 | BOUND, /* BOUNDA */ |
e2e6a0f1 YO |
167 | NBOUND, /* NBOUND */ |
168 | NBOUND, /* NBOUNDL */ | |
1e355c70 | 169 | NBOUND, /* NBOUNDU */ |
0c6e81eb | 170 | NBOUND, /* NBOUNDA */ |
e2e6a0f1 YO |
171 | REG_ANY, /* REG_ANY */ |
172 | REG_ANY, /* SANY */ | |
e2e6a0f1 | 173 | ANYOF, /* ANYOF */ |
ac44c12e | 174 | ANYOF, /* ANYOFD */ |
a4525e78 | 175 | ANYOF, /* ANYOFL */ |
3615ea58 KW |
176 | POSIXD, /* POSIXD */ |
177 | POSIXD, /* POSIXL */ | |
178 | POSIXD, /* POSIXU */ | |
179 | POSIXD, /* POSIXA */ | |
9e84774b KW |
180 | NPOSIXD, /* NPOSIXD */ |
181 | NPOSIXD, /* NPOSIXL */ | |
182 | NPOSIXD, /* NPOSIXU */ | |
183 | NPOSIXD, /* NPOSIXA */ | |
e2e6a0f1 YO |
184 | CLUMP, /* CLUMP */ |
185 | BRANCH, /* BRANCH */ | |
e2e6a0f1 | 186 | EXACT, /* EXACT */ |
a4525e78 | 187 | EXACT, /* EXACTL */ |
e2e6a0f1 YO |
188 | EXACT, /* EXACTF */ |
189 | EXACT, /* EXACTFL */ | |
01f98ec2 | 190 | EXACT, /* EXACTFU */ |
8c1182fd | 191 | EXACT, /* EXACTFA */ |
3c760661 | 192 | EXACT, /* EXACTFU_SS */ |
a4525e78 | 193 | EXACT, /* EXACTFLU8 */ |
098b07d5 | 194 | EXACT, /* EXACTFA_NO_TRIE */ |
e2e6a0f1 YO |
195 | NOTHING, /* NOTHING */ |
196 | NOTHING, /* TAIL */ | |
197 | STAR, /* STAR */ | |
198 | PLUS, /* PLUS */ | |
199 | CURLY, /* CURLY */ | |
200 | CURLY, /* CURLYN */ | |
201 | CURLY, /* CURLYM */ | |
202 | CURLY, /* CURLYX */ | |
203 | WHILEM, /* WHILEM */ | |
204 | OPEN, /* OPEN */ | |
205 | CLOSE, /* CLOSE */ | |
206 | REF, /* REF */ | |
207 | REF, /* REFF */ | |
208 | REF, /* REFFL */ | |
01f98ec2 | 209 | REF, /* REFFU */ |
781aab5c | 210 | REF, /* REFFA */ |
01f98ec2 KW |
211 | REF, /* NREF */ |
212 | REF, /* NREFF */ | |
213 | REF, /* NREFFL */ | |
214 | REF, /* NREFFU */ | |
781aab5c | 215 | REF, /* NREFFA */ |
d3d47aac YO |
216 | LONGJMP, /* LONGJMP */ |
217 | BRANCHJ, /* BRANCHJ */ | |
e2e6a0f1 YO |
218 | BRANCHJ, /* IFMATCH */ |
219 | BRANCHJ, /* UNLESSM */ | |
220 | BRANCHJ, /* SUSPEND */ | |
221 | BRANCHJ, /* IFTHEN */ | |
222 | GROUPP, /* GROUPP */ | |
e2e6a0f1 YO |
223 | EVAL, /* EVAL */ |
224 | MINMOD, /* MINMOD */ | |
225 | LOGICAL, /* LOGICAL */ | |
226 | BRANCHJ, /* RENUM */ | |
227 | TRIE, /* TRIE */ | |
228 | TRIE, /* TRIEC */ | |
229 | TRIE, /* AHOCORASICK */ | |
230 | TRIE, /* AHOCORASICKC */ | |
231 | GOSUB, /* GOSUB */ | |
e2e6a0f1 YO |
232 | NGROUPP, /* NGROUPP */ |
233 | INSUBP, /* INSUBP */ | |
234 | DEFINEP, /* DEFINEP */ | |
235 | ENDLIKE, /* ENDLIKE */ | |
236 | ENDLIKE, /* OPFAIL */ | |
237 | ENDLIKE, /* ACCEPT */ | |
238 | VERB, /* VERB */ | |
5d458dd8 | 239 | VERB, /* PRUNE */ |
e2e6a0f1 | 240 | VERB, /* MARKPOINT */ |
5d458dd8 | 241 | VERB, /* SKIP */ |
e2e6a0f1 | 242 | VERB, /* COMMIT */ |
5d458dd8 | 243 | VERB, /* CUTGROUP */ |
ee9b8eae | 244 | KEEPS, /* KEEPS */ |
e1d1eefb | 245 | LNBREAK, /* LNBREAK */ |
e2e6a0f1 YO |
246 | NOTHING, /* OPTIMIZED */ |
247 | PSEUDO, /* PSEUDO */ | |
03363afd | 248 | /* ------------ States ------------- */ |
e2e6a0f1 YO |
249 | TRIE, /* TRIE_next */ |
250 | TRIE, /* TRIE_next_fail */ | |
251 | EVAL, /* EVAL_AB */ | |
252 | EVAL, /* EVAL_AB_fail */ | |
253 | CURLYX, /* CURLYX_end */ | |
254 | CURLYX, /* CURLYX_end_fail */ | |
255 | WHILEM, /* WHILEM_A_pre */ | |
256 | WHILEM, /* WHILEM_A_pre_fail */ | |
257 | WHILEM, /* WHILEM_A_min */ | |
258 | WHILEM, /* WHILEM_A_min_fail */ | |
259 | WHILEM, /* WHILEM_A_max */ | |
260 | WHILEM, /* WHILEM_A_max_fail */ | |
261 | WHILEM, /* WHILEM_B_min */ | |
262 | WHILEM, /* WHILEM_B_min_fail */ | |
263 | WHILEM, /* WHILEM_B_max */ | |
264 | WHILEM, /* WHILEM_B_max_fail */ | |
265 | BRANCH, /* BRANCH_next */ | |
266 | BRANCH, /* BRANCH_next_fail */ | |
267 | CURLYM, /* CURLYM_A */ | |
268 | CURLYM, /* CURLYM_A_fail */ | |
269 | CURLYM, /* CURLYM_B */ | |
270 | CURLYM, /* CURLYM_B_fail */ | |
271 | IFMATCH, /* IFMATCH_A */ | |
272 | IFMATCH, /* IFMATCH_A_fail */ | |
273 | CURLY, /* CURLY_B_min_known */ | |
274 | CURLY, /* CURLY_B_min_known_fail */ | |
275 | CURLY, /* CURLY_B_min */ | |
276 | CURLY, /* CURLY_B_min_fail */ | |
277 | CURLY, /* CURLY_B_max */ | |
278 | CURLY, /* CURLY_B_max_fail */ | |
279 | COMMIT, /* COMMIT_next */ | |
280 | COMMIT, /* COMMIT_next_fail */ | |
281 | MARKPOINT, /* MARKPOINT_next */ | |
282 | MARKPOINT, /* MARKPOINT_next_fail */ | |
5d458dd8 YO |
283 | SKIP, /* SKIP_next */ |
284 | SKIP, /* SKIP_next_fail */ | |
285 | CUTGROUP, /* CUTGROUP_next */ | |
286 | CUTGROUP, /* CUTGROUP_next_fail */ | |
ee9b8eae YO |
287 | KEEPS, /* KEEPS_next */ |
288 | KEEPS, /* KEEPS_next_fail */ | |
d09b2d29 IZ |
289 | }; |
290 | #endif | |
291 | ||
f83e001e YO |
292 | #ifdef REG_COMP_C |
293 | ||
6bda09f9 | 294 | /* regarglen[] - How large is the argument part of the node (in regnodes) */ |
d09b2d29 | 295 | |
29de9391 | 296 | static const U8 regarglen[] = { |
03363afd YO |
297 | 0, /* END */ |
298 | 0, /* SUCCEED */ | |
03363afd | 299 | 0, /* SBOL */ |
d3d47aac | 300 | 0, /* MBOL */ |
03363afd | 301 | 0, /* SEOL */ |
d3d47aac YO |
302 | 0, /* MEOL */ |
303 | 0, /* EOS */ | |
304 | 0, /* GPOS */ | |
03363afd YO |
305 | 0, /* BOUND */ |
306 | 0, /* BOUNDL */ | |
1e355c70 | 307 | 0, /* BOUNDU */ |
0c6e81eb | 308 | 0, /* BOUNDA */ |
03363afd YO |
309 | 0, /* NBOUND */ |
310 | 0, /* NBOUNDL */ | |
1e355c70 | 311 | 0, /* NBOUNDU */ |
0c6e81eb | 312 | 0, /* NBOUNDA */ |
03363afd YO |
313 | 0, /* REG_ANY */ |
314 | 0, /* SANY */ | |
975a06f7 | 315 | EXTRA_SIZE(struct regnode_1), /* ANYOF */ |
ac44c12e | 316 | EXTRA_SIZE(struct regnode_1), /* ANYOFD */ |
a4525e78 | 317 | EXTRA_SIZE(struct regnode_1), /* ANYOFL */ |
3615ea58 KW |
318 | 0, /* POSIXD */ |
319 | 0, /* POSIXL */ | |
320 | 0, /* POSIXU */ | |
321 | 0, /* POSIXA */ | |
322 | 0, /* NPOSIXD */ | |
323 | 0, /* NPOSIXL */ | |
324 | 0, /* NPOSIXU */ | |
325 | 0, /* NPOSIXA */ | |
03363afd YO |
326 | 0, /* CLUMP */ |
327 | 0, /* BRANCH */ | |
03363afd | 328 | 0, /* EXACT */ |
a4525e78 | 329 | 0, /* EXACTL */ |
03363afd YO |
330 | 0, /* EXACTF */ |
331 | 0, /* EXACTFL */ | |
01f98ec2 | 332 | 0, /* EXACTFU */ |
8c1182fd | 333 | 0, /* EXACTFA */ |
3c760661 | 334 | 0, /* EXACTFU_SS */ |
a4525e78 | 335 | 0, /* EXACTFLU8 */ |
098b07d5 | 336 | 0, /* EXACTFA_NO_TRIE */ |
03363afd YO |
337 | 0, /* NOTHING */ |
338 | 0, /* TAIL */ | |
339 | 0, /* STAR */ | |
340 | 0, /* PLUS */ | |
341 | EXTRA_SIZE(struct regnode_2), /* CURLY */ | |
342 | EXTRA_SIZE(struct regnode_2), /* CURLYN */ | |
343 | EXTRA_SIZE(struct regnode_2), /* CURLYM */ | |
344 | EXTRA_SIZE(struct regnode_2), /* CURLYX */ | |
345 | 0, /* WHILEM */ | |
346 | EXTRA_SIZE(struct regnode_1), /* OPEN */ | |
347 | EXTRA_SIZE(struct regnode_1), /* CLOSE */ | |
348 | EXTRA_SIZE(struct regnode_1), /* REF */ | |
349 | EXTRA_SIZE(struct regnode_1), /* REFF */ | |
350 | EXTRA_SIZE(struct regnode_1), /* REFFL */ | |
01f98ec2 | 351 | EXTRA_SIZE(struct regnode_1), /* REFFU */ |
781aab5c | 352 | EXTRA_SIZE(struct regnode_1), /* REFFA */ |
01f98ec2 KW |
353 | EXTRA_SIZE(struct regnode_1), /* NREF */ |
354 | EXTRA_SIZE(struct regnode_1), /* NREFF */ | |
355 | EXTRA_SIZE(struct regnode_1), /* NREFFL */ | |
356 | EXTRA_SIZE(struct regnode_1), /* NREFFU */ | |
781aab5c | 357 | EXTRA_SIZE(struct regnode_1), /* NREFFA */ |
d3d47aac YO |
358 | EXTRA_SIZE(struct regnode_1), /* LONGJMP */ |
359 | EXTRA_SIZE(struct regnode_1), /* BRANCHJ */ | |
03363afd YO |
360 | EXTRA_SIZE(struct regnode_1), /* IFMATCH */ |
361 | EXTRA_SIZE(struct regnode_1), /* UNLESSM */ | |
362 | EXTRA_SIZE(struct regnode_1), /* SUSPEND */ | |
363 | EXTRA_SIZE(struct regnode_1), /* IFTHEN */ | |
364 | EXTRA_SIZE(struct regnode_1), /* GROUPP */ | |
13f27704 | 365 | EXTRA_SIZE(struct regnode_2L), /* EVAL */ |
03363afd YO |
366 | 0, /* MINMOD */ |
367 | 0, /* LOGICAL */ | |
368 | EXTRA_SIZE(struct regnode_1), /* RENUM */ | |
369 | EXTRA_SIZE(struct regnode_1), /* TRIE */ | |
370 | EXTRA_SIZE(struct regnode_charclass), /* TRIEC */ | |
371 | EXTRA_SIZE(struct regnode_1), /* AHOCORASICK */ | |
372 | EXTRA_SIZE(struct regnode_charclass), /* AHOCORASICKC */ | |
1a147d38 | 373 | EXTRA_SIZE(struct regnode_2L), /* GOSUB */ |
0a4db386 | 374 | EXTRA_SIZE(struct regnode_1), /* NGROUPP */ |
1a147d38 | 375 | EXTRA_SIZE(struct regnode_1), /* INSUBP */ |
0a4db386 | 376 | EXTRA_SIZE(struct regnode_1), /* DEFINEP */ |
e2e6a0f1 | 377 | 0, /* ENDLIKE */ |
fee50582 YO |
378 | EXTRA_SIZE(struct regnode_1), /* OPFAIL */ |
379 | EXTRA_SIZE(struct regnode_2L), /* ACCEPT */ | |
20832bc5 | 380 | EXTRA_SIZE(struct regnode_1), /* VERB */ |
5d458dd8 | 381 | EXTRA_SIZE(struct regnode_1), /* PRUNE */ |
e2e6a0f1 | 382 | EXTRA_SIZE(struct regnode_1), /* MARKPOINT */ |
5d458dd8 | 383 | EXTRA_SIZE(struct regnode_1), /* SKIP */ |
e2e6a0f1 | 384 | EXTRA_SIZE(struct regnode_1), /* COMMIT */ |
5d458dd8 | 385 | EXTRA_SIZE(struct regnode_1), /* CUTGROUP */ |
ee9b8eae | 386 | 0, /* KEEPS */ |
e1d1eefb | 387 | 0, /* LNBREAK */ |
03363afd YO |
388 | 0, /* OPTIMIZED */ |
389 | 0, /* PSEUDO */ | |
d09b2d29 IZ |
390 | }; |
391 | ||
6bda09f9 YO |
392 | /* reg_off_by_arg[] - Which argument holds the offset to the next node */ |
393 | ||
29de9391 | 394 | static const char reg_off_by_arg[] = { |
03363afd YO |
395 | 0, /* END */ |
396 | 0, /* SUCCEED */ | |
03363afd | 397 | 0, /* SBOL */ |
d3d47aac | 398 | 0, /* MBOL */ |
03363afd | 399 | 0, /* SEOL */ |
d3d47aac YO |
400 | 0, /* MEOL */ |
401 | 0, /* EOS */ | |
402 | 0, /* GPOS */ | |
03363afd YO |
403 | 0, /* BOUND */ |
404 | 0, /* BOUNDL */ | |
1e355c70 | 405 | 0, /* BOUNDU */ |
0c6e81eb | 406 | 0, /* BOUNDA */ |
03363afd YO |
407 | 0, /* NBOUND */ |
408 | 0, /* NBOUNDL */ | |
1e355c70 | 409 | 0, /* NBOUNDU */ |
0c6e81eb | 410 | 0, /* NBOUNDA */ |
03363afd YO |
411 | 0, /* REG_ANY */ |
412 | 0, /* SANY */ | |
03363afd | 413 | 0, /* ANYOF */ |
ac44c12e | 414 | 0, /* ANYOFD */ |
a4525e78 | 415 | 0, /* ANYOFL */ |
3615ea58 KW |
416 | 0, /* POSIXD */ |
417 | 0, /* POSIXL */ | |
418 | 0, /* POSIXU */ | |
419 | 0, /* POSIXA */ | |
420 | 0, /* NPOSIXD */ | |
421 | 0, /* NPOSIXL */ | |
422 | 0, /* NPOSIXU */ | |
423 | 0, /* NPOSIXA */ | |
03363afd YO |
424 | 0, /* CLUMP */ |
425 | 0, /* BRANCH */ | |
03363afd | 426 | 0, /* EXACT */ |
a4525e78 | 427 | 0, /* EXACTL */ |
03363afd YO |
428 | 0, /* EXACTF */ |
429 | 0, /* EXACTFL */ | |
01f98ec2 | 430 | 0, /* EXACTFU */ |
8c1182fd | 431 | 0, /* EXACTFA */ |
3c760661 | 432 | 0, /* EXACTFU_SS */ |
a4525e78 | 433 | 0, /* EXACTFLU8 */ |
098b07d5 | 434 | 0, /* EXACTFA_NO_TRIE */ |
03363afd YO |
435 | 0, /* NOTHING */ |
436 | 0, /* TAIL */ | |
437 | 0, /* STAR */ | |
438 | 0, /* PLUS */ | |
439 | 0, /* CURLY */ | |
440 | 0, /* CURLYN */ | |
441 | 0, /* CURLYM */ | |
442 | 0, /* CURLYX */ | |
443 | 0, /* WHILEM */ | |
444 | 0, /* OPEN */ | |
445 | 0, /* CLOSE */ | |
446 | 0, /* REF */ | |
447 | 0, /* REFF */ | |
448 | 0, /* REFFL */ | |
01f98ec2 | 449 | 0, /* REFFU */ |
781aab5c | 450 | 0, /* REFFA */ |
01f98ec2 KW |
451 | 0, /* NREF */ |
452 | 0, /* NREFF */ | |
453 | 0, /* NREFFL */ | |
454 | 0, /* NREFFU */ | |
781aab5c | 455 | 0, /* NREFFA */ |
d3d47aac YO |
456 | 1, /* LONGJMP */ |
457 | 1, /* BRANCHJ */ | |
03363afd YO |
458 | 2, /* IFMATCH */ |
459 | 2, /* UNLESSM */ | |
460 | 1, /* SUSPEND */ | |
461 | 1, /* IFTHEN */ | |
462 | 0, /* GROUPP */ | |
03363afd YO |
463 | 0, /* EVAL */ |
464 | 0, /* MINMOD */ | |
465 | 0, /* LOGICAL */ | |
466 | 1, /* RENUM */ | |
467 | 0, /* TRIE */ | |
468 | 0, /* TRIEC */ | |
469 | 0, /* AHOCORASICK */ | |
470 | 0, /* AHOCORASICKC */ | |
1a147d38 | 471 | 0, /* GOSUB */ |
0a4db386 | 472 | 0, /* NGROUPP */ |
1a147d38 | 473 | 0, /* INSUBP */ |
0a4db386 | 474 | 0, /* DEFINEP */ |
e2e6a0f1 | 475 | 0, /* ENDLIKE */ |
7f69552c | 476 | 0, /* OPFAIL */ |
e2e6a0f1 YO |
477 | 0, /* ACCEPT */ |
478 | 0, /* VERB */ | |
5d458dd8 | 479 | 0, /* PRUNE */ |
e2e6a0f1 | 480 | 0, /* MARKPOINT */ |
5d458dd8 | 481 | 0, /* SKIP */ |
e2e6a0f1 | 482 | 0, /* COMMIT */ |
5d458dd8 | 483 | 0, /* CUTGROUP */ |
ee9b8eae | 484 | 0, /* KEEPS */ |
e1d1eefb | 485 | 0, /* LNBREAK */ |
03363afd YO |
486 | 0, /* OPTIMIZED */ |
487 | 0, /* PSEUDO */ | |
d09b2d29 | 488 | }; |
885f9e59 | 489 | |
13d6edb4 NC |
490 | #endif /* REG_COMP_C */ |
491 | ||
f83e001e | 492 | |
6bda09f9 YO |
493 | /* reg_name[] - Opcode/state names in string form, for debugging */ |
494 | ||
22429478 | 495 | #ifndef DOINIT |
13d6edb4 | 496 | EXTCONST char * PL_reg_name[]; |
22429478 | 497 | #else |
4764e399 | 498 | EXTCONST char * const PL_reg_name[] = { |
03363afd YO |
499 | "END", /* 0000 */ |
500 | "SUCCEED", /* 0x01 */ | |
d3d47aac | 501 | "SBOL", /* 0x02 */ |
03363afd | 502 | "MBOL", /* 0x03 */ |
d3d47aac YO |
503 | "SEOL", /* 0x04 */ |
504 | "MEOL", /* 0x05 */ | |
505 | "EOS", /* 0x06 */ | |
506 | "GPOS", /* 0x07 */ | |
507 | "BOUND", /* 0x08 */ | |
508 | "BOUNDL", /* 0x09 */ | |
509 | "BOUNDU", /* 0x0a */ | |
510 | "BOUNDA", /* 0x0b */ | |
511 | "NBOUND", /* 0x0c */ | |
512 | "NBOUNDL", /* 0x0d */ | |
513 | "NBOUNDU", /* 0x0e */ | |
514 | "NBOUNDA", /* 0x0f */ | |
515 | "REG_ANY", /* 0x10 */ | |
516 | "SANY", /* 0x11 */ | |
33c28ab2 | 517 | "ANYOF", /* 0x12 */ |
ac44c12e KW |
518 | "ANYOFD", /* 0x13 */ |
519 | "ANYOFL", /* 0x14 */ | |
520 | "POSIXD", /* 0x15 */ | |
521 | "POSIXL", /* 0x16 */ | |
522 | "POSIXU", /* 0x17 */ | |
523 | "POSIXA", /* 0x18 */ | |
524 | "NPOSIXD", /* 0x19 */ | |
525 | "NPOSIXL", /* 0x1a */ | |
526 | "NPOSIXU", /* 0x1b */ | |
527 | "NPOSIXA", /* 0x1c */ | |
528 | "CLUMP", /* 0x1d */ | |
529 | "BRANCH", /* 0x1e */ | |
530 | "EXACT", /* 0x1f */ | |
531 | "EXACTL", /* 0x20 */ | |
532 | "EXACTF", /* 0x21 */ | |
533 | "EXACTFL", /* 0x22 */ | |
534 | "EXACTFU", /* 0x23 */ | |
535 | "EXACTFA", /* 0x24 */ | |
536 | "EXACTFU_SS", /* 0x25 */ | |
537 | "EXACTFLU8", /* 0x26 */ | |
538 | "EXACTFA_NO_TRIE", /* 0x27 */ | |
539 | "NOTHING", /* 0x28 */ | |
540 | "TAIL", /* 0x29 */ | |
541 | "STAR", /* 0x2a */ | |
542 | "PLUS", /* 0x2b */ | |
543 | "CURLY", /* 0x2c */ | |
544 | "CURLYN", /* 0x2d */ | |
545 | "CURLYM", /* 0x2e */ | |
546 | "CURLYX", /* 0x2f */ | |
547 | "WHILEM", /* 0x30 */ | |
548 | "OPEN", /* 0x31 */ | |
549 | "CLOSE", /* 0x32 */ | |
550 | "REF", /* 0x33 */ | |
551 | "REFF", /* 0x34 */ | |
552 | "REFFL", /* 0x35 */ | |
553 | "REFFU", /* 0x36 */ | |
554 | "REFFA", /* 0x37 */ | |
555 | "NREF", /* 0x38 */ | |
556 | "NREFF", /* 0x39 */ | |
557 | "NREFFL", /* 0x3a */ | |
558 | "NREFFU", /* 0x3b */ | |
559 | "NREFFA", /* 0x3c */ | |
560 | "LONGJMP", /* 0x3d */ | |
561 | "BRANCHJ", /* 0x3e */ | |
562 | "IFMATCH", /* 0x3f */ | |
563 | "UNLESSM", /* 0x40 */ | |
564 | "SUSPEND", /* 0x41 */ | |
565 | "IFTHEN", /* 0x42 */ | |
566 | "GROUPP", /* 0x43 */ | |
567 | "EVAL", /* 0x44 */ | |
568 | "MINMOD", /* 0x45 */ | |
569 | "LOGICAL", /* 0x46 */ | |
570 | "RENUM", /* 0x47 */ | |
571 | "TRIE", /* 0x48 */ | |
572 | "TRIEC", /* 0x49 */ | |
573 | "AHOCORASICK", /* 0x4a */ | |
574 | "AHOCORASICKC", /* 0x4b */ | |
575 | "GOSUB", /* 0x4c */ | |
d5a00e4a YO |
576 | "NGROUPP", /* 0x4d */ |
577 | "INSUBP", /* 0x4e */ | |
578 | "DEFINEP", /* 0x4f */ | |
579 | "ENDLIKE", /* 0x50 */ | |
580 | "OPFAIL", /* 0x51 */ | |
581 | "ACCEPT", /* 0x52 */ | |
582 | "VERB", /* 0x53 */ | |
583 | "PRUNE", /* 0x54 */ | |
584 | "MARKPOINT", /* 0x55 */ | |
585 | "SKIP", /* 0x56 */ | |
586 | "COMMIT", /* 0x57 */ | |
587 | "CUTGROUP", /* 0x58 */ | |
588 | "KEEPS", /* 0x59 */ | |
589 | "LNBREAK", /* 0x5a */ | |
590 | "OPTIMIZED", /* 0x5b */ | |
591 | "PSEUDO", /* 0x5c */ | |
03363afd | 592 | /* ------------ States ------------- */ |
24b23f37 YO |
593 | "TRIE_next", /* REGNODE_MAX +0x01 */ |
594 | "TRIE_next_fail", /* REGNODE_MAX +0x02 */ | |
595 | "EVAL_AB", /* REGNODE_MAX +0x03 */ | |
596 | "EVAL_AB_fail", /* REGNODE_MAX +0x04 */ | |
597 | "CURLYX_end", /* REGNODE_MAX +0x05 */ | |
598 | "CURLYX_end_fail", /* REGNODE_MAX +0x06 */ | |
599 | "WHILEM_A_pre", /* REGNODE_MAX +0x07 */ | |
600 | "WHILEM_A_pre_fail", /* REGNODE_MAX +0x08 */ | |
601 | "WHILEM_A_min", /* REGNODE_MAX +0x09 */ | |
602 | "WHILEM_A_min_fail", /* REGNODE_MAX +0x0a */ | |
603 | "WHILEM_A_max", /* REGNODE_MAX +0x0b */ | |
604 | "WHILEM_A_max_fail", /* REGNODE_MAX +0x0c */ | |
605 | "WHILEM_B_min", /* REGNODE_MAX +0x0d */ | |
606 | "WHILEM_B_min_fail", /* REGNODE_MAX +0x0e */ | |
607 | "WHILEM_B_max", /* REGNODE_MAX +0x0f */ | |
608 | "WHILEM_B_max_fail", /* REGNODE_MAX +0x10 */ | |
609 | "BRANCH_next", /* REGNODE_MAX +0x11 */ | |
610 | "BRANCH_next_fail", /* REGNODE_MAX +0x12 */ | |
611 | "CURLYM_A", /* REGNODE_MAX +0x13 */ | |
612 | "CURLYM_A_fail", /* REGNODE_MAX +0x14 */ | |
613 | "CURLYM_B", /* REGNODE_MAX +0x15 */ | |
614 | "CURLYM_B_fail", /* REGNODE_MAX +0x16 */ | |
615 | "IFMATCH_A", /* REGNODE_MAX +0x17 */ | |
616 | "IFMATCH_A_fail", /* REGNODE_MAX +0x18 */ | |
617 | "CURLY_B_min_known", /* REGNODE_MAX +0x19 */ | |
618 | "CURLY_B_min_known_fail", /* REGNODE_MAX +0x1a */ | |
619 | "CURLY_B_min", /* REGNODE_MAX +0x1b */ | |
620 | "CURLY_B_min_fail", /* REGNODE_MAX +0x1c */ | |
621 | "CURLY_B_max", /* REGNODE_MAX +0x1d */ | |
622 | "CURLY_B_max_fail", /* REGNODE_MAX +0x1e */ | |
623 | "COMMIT_next", /* REGNODE_MAX +0x1f */ | |
624 | "COMMIT_next_fail", /* REGNODE_MAX +0x20 */ | |
e2e6a0f1 YO |
625 | "MARKPOINT_next", /* REGNODE_MAX +0x21 */ |
626 | "MARKPOINT_next_fail", /* REGNODE_MAX +0x22 */ | |
5d458dd8 YO |
627 | "SKIP_next", /* REGNODE_MAX +0x23 */ |
628 | "SKIP_next_fail", /* REGNODE_MAX +0x24 */ | |
629 | "CUTGROUP_next", /* REGNODE_MAX +0x25 */ | |
630 | "CUTGROUP_next_fail", /* REGNODE_MAX +0x26 */ | |
ee9b8eae YO |
631 | "KEEPS_next", /* REGNODE_MAX +0x27 */ |
632 | "KEEPS_next_fail", /* REGNODE_MAX +0x28 */ | |
885f9e59 | 633 | }; |
22429478 | 634 | #endif /* DOINIT */ |
d09b2d29 | 635 | |
f7819f85 A |
636 | /* PL_reg_extflags_name[] - Opcode/state names in string form, for debugging */ |
637 | ||
638 | #ifndef DOINIT | |
639 | EXTCONST char * PL_reg_extflags_name[]; | |
640 | #else | |
641 | EXTCONST char * const PL_reg_extflags_name[] = { | |
d262c0c7 | 642 | /* Bits in extflags defined: 11111111111111110000111111111111 */ |
52d81aa8 NC |
643 | "MULTILINE", /* 0x00000001 */ |
644 | "SINGLELINE", /* 0x00000002 */ | |
645 | "FOLD", /* 0x00000004 */ | |
646 | "EXTENDED", /* 0x00000008 */ | |
334afb3e | 647 | "EXTENDED_MORE", /* 0x00000010 */ |
e3b64d84 KW |
648 | "NOCAPTURE", /* 0x00000020 */ |
649 | "KEEPCOPY", /* 0x00000040 */ | |
650 | "CHARSET0", /* 0x00000080 : "CHARSET" - 0x00000380 */ | |
651 | "CHARSET1", /* 0x00000100 : "CHARSET" - 0x00000380 */ | |
652 | "CHARSET2", /* 0x00000200 : "CHARSET" - 0x00000380 */ | |
d262c0c7 KW |
653 | "STRICT", /* 0x00000400 */ |
654 | "SPLIT", /* 0x00000800 */ | |
1d32d911 KW |
655 | "UNUSED_BIT_12", /* 0x00001000 */ |
656 | "UNUSED_BIT_13", /* 0x00002000 */ | |
657 | "UNUSED_BIT_14", /* 0x00004000 */ | |
a3b51d37 KW |
658 | "UNUSED_BIT_15", /* 0x00008000 */ |
659 | "NO_INPLACE_SUBST", /* 0x00010000 */ | |
660 | "EVAL_SEEN", /* 0x00020000 */ | |
ee273784 | 661 | "UNBOUNDED_QUANTIFIER_SEEN",/* 0x00040000 */ |
e795e964 | 662 | "CHECK_ALL", /* 0x00080000 */ |
52d81aa8 NC |
663 | "MATCH_UTF8", /* 0x00100000 */ |
664 | "USE_INTUIT_NOML", /* 0x00200000 */ | |
665 | "USE_INTUIT_ML", /* 0x00400000 */ | |
666 | "INTUIT_TAIL", /* 0x00800000 */ | |
a3b51d37 | 667 | "IS_ANCHORED", /* 0x01000000 */ |
52d81aa8 NC |
668 | "COPY_DONE", /* 0x02000000 */ |
669 | "TAINTED_SEEN", /* 0x04000000 */ | |
670 | "TAINTED", /* 0x08000000 */ | |
671 | "START_ONLY", /* 0x10000000 */ | |
dbc200c5 | 672 | "SKIPWHITE", /* 0x20000000 */ |
52d81aa8 NC |
673 | "WHITE", /* 0x40000000 */ |
674 | "NULL", /* 0x80000000 */ | |
f7819f85 A |
675 | }; |
676 | #endif /* DOINIT */ | |
677 | ||
adc2d0c9 JH |
678 | #ifdef DEBUGGING |
679 | # define REG_EXTFLAGS_NAME_SIZE 32 | |
680 | #endif | |
681 | ||
337ff307 YO |
682 | /* PL_reg_intflags_name[] - Opcode/state names in string form, for debugging */ |
683 | ||
684 | #ifndef DOINIT | |
685 | EXTCONST char * PL_reg_intflags_name[]; | |
686 | #else | |
687 | EXTCONST char * const PL_reg_intflags_name[] = { | |
b8f6efdd YO |
688 | "SKIP", /* 0x00000001 - PREGf_SKIP */ |
689 | "IMPLICIT", /* 0x00000002 - PREGf_IMPLICIT - Converted .* to ^.* */ | |
690 | "NAUGHTY", /* 0x00000004 - PREGf_NAUGHTY - how exponential is this pattern? */ | |
691 | "VERBARG_SEEN", /* 0x00000008 - PREGf_VERBARG_SEEN */ | |
692 | "CUTGROUP_SEEN", /* 0x00000010 - PREGf_CUTGROUP_SEEN */ | |
693 | "USE_RE_EVAL", /* 0x00000020 - PREGf_USE_RE_EVAL - compiled with "use re 'eval'" */ | |
58430ea8 | 694 | "NOSCAN", /* 0x00000040 - PREGf_NOSCAN */ |
58430ea8 YO |
695 | "GPOS_SEEN", /* 0x00000100 - PREGf_GPOS_SEEN */ |
696 | "GPOS_FLOAT", /* 0x00000200 - PREGf_GPOS_FLOAT */ | |
d3d47aac YO |
697 | "ANCH_MBOL", /* 0x00000400 - PREGf_ANCH_MBOL */ |
698 | "ANCH_SBOL", /* 0x00000800 - PREGf_ANCH_SBOL */ | |
699 | "ANCH_GPOS", /* 0x00001000 - PREGf_ANCH_GPOS */ | |
d5a00e4a | 700 | "RECURSE_SEEN", /* 0x00002000 - PREGf_RECURSE_SEEN */ |
337ff307 YO |
701 | }; |
702 | #endif /* DOINIT */ | |
703 | ||
adc2d0c9 | 704 | #ifdef DEBUGGING |
d5a00e4a | 705 | # define REG_INTFLAGS_NAME_SIZE 13 |
adc2d0c9 JH |
706 | #endif |
707 | ||
f9ef50a7 | 708 | /* The following have no fixed length. U8 so we can do strchr() on it. */ |
ded4dd2a | 709 | #define REGNODE_VARIES(node) (PL_varies_bitmask[(node) >> 3] & (1 << ((node) & 7))) |
e52fc539 | 710 | |
f9ef50a7 | 711 | #ifndef DOINIT |
ded4dd2a | 712 | EXTCONST U8 PL_varies[] __attribute__deprecated__; |
f9ef50a7 | 713 | #else |
ded4dd2a | 714 | EXTCONST U8 PL_varies[] __attribute__deprecated__ = { |
62e6ef33 AC |
715 | CLUMP, BRANCH, STAR, PLUS, CURLY, CURLYN, CURLYM, CURLYX, WHILEM, REF, |
716 | REFF, REFFL, REFFU, REFFA, NREF, NREFF, NREFFL, NREFFU, NREFFA, | |
d3d47aac | 717 | BRANCHJ, SUSPEND, IFTHEN, |
f9ef50a7 NC |
718 | 0 |
719 | }; | |
720 | #endif /* DOINIT */ | |
721 | ||
ded4dd2a NC |
722 | #ifndef DOINIT |
723 | EXTCONST U8 PL_varies_bitmask[]; | |
724 | #else | |
725 | EXTCONST U8 PL_varies_bitmask[] = { | |
ac44c12e | 726 | 0x00, 0x00, 0x00, 0x60, 0x00, 0xFC, 0xF9, 0x5F, 0x06, 0x00, 0x00, 0x00 |
ded4dd2a NC |
727 | }; |
728 | #endif /* DOINIT */ | |
729 | ||
f9ef50a7 NC |
730 | /* The following always have a length of 1. U8 we can do strchr() on it. */ |
731 | /* (Note that length 1 means "one character" under UTF8, not "one octet".) */ | |
ded4dd2a | 732 | #define REGNODE_SIMPLE(node) (PL_simple_bitmask[(node) >> 3] & (1 << ((node) & 7))) |
e52fc539 | 733 | |
f9ef50a7 | 734 | #ifndef DOINIT |
ded4dd2a | 735 | EXTCONST U8 PL_simple[] __attribute__deprecated__; |
f9ef50a7 | 736 | #else |
ded4dd2a | 737 | EXTCONST U8 PL_simple[] __attribute__deprecated__ = { |
ac44c12e KW |
738 | REG_ANY, SANY, ANYOF, ANYOFD, ANYOFL, POSIXD, POSIXL, POSIXU, POSIXA, |
739 | NPOSIXD, NPOSIXL, NPOSIXU, NPOSIXA, | |
f9ef50a7 NC |
740 | 0 |
741 | }; | |
742 | #endif /* DOINIT */ | |
743 | ||
ded4dd2a NC |
744 | #ifndef DOINIT |
745 | EXTCONST U8 PL_simple_bitmask[]; | |
746 | #else | |
747 | EXTCONST U8 PL_simple_bitmask[] = { | |
ac44c12e | 748 | 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 |
ded4dd2a NC |
749 | }; |
750 | #endif /* DOINIT */ | |
751 | ||
37442d52 | 752 | /* ex: set ro: */ |