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