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 | ||
693fefec KW |
9 | #define REGNODE_MAX 114 |
10 | #define REGMATCH_STATE_MAX 154 | |
03363afd | 11 | |
f9f4320a YO |
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. */ | |
1e355c70 | 21 | #define BOUND 9 /* 0x09 Match "" at any word boundary using native charset semantics for non-utf8 */ |
f2284805 | 22 | #define BOUNDL 10 /* 0x0a Match "" at any locale word boundary */ |
1e355c70 | 23 | #define BOUNDU 11 /* 0x0b Match "" at any word boundary using Unicode semantics */ |
0c6e81eb KW |
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 */ | |
693fefec KW |
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 CLUMP 47 /* 0x2f Match any extended grapheme cluster sequence */ | |
60 | #define BRANCH 48 /* 0x30 Match this alternative, or the next... */ | |
61 | #define BACK 49 /* 0x31 Match "", "next" ptr points backward. */ | |
62 | #define EXACT 50 /* 0x32 Match this string (preceded by length). */ | |
63 | #define EXACTF 51 /* 0x33 Match this non-UTF-8 string (not guaranteed to be folded) using /id rules (w/len). */ | |
64 | #define EXACTFL 52 /* 0x34 Match this string (not guaranteed to be folded) using /il rules (w/len). */ | |
65 | #define EXACTFU 53 /* 0x35 Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */ | |
66 | #define EXACTFA 54 /* 0x36 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */ | |
67 | #define EXACTFU_SS 55 /* 0x37 Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */ | |
68 | #define EXACTFU_TRICKYFOLD 56 /* 0x38 Match this folded UTF-8 string using /iu rules */ | |
69 | #define NOTHING 57 /* 0x39 Match empty string. */ | |
70 | #define TAIL 58 /* 0x3a Match empty string. Can jump here from outside. */ | |
71 | #define STAR 59 /* 0x3b Match this (simple) thing 0 or more times. */ | |
72 | #define PLUS 60 /* 0x3c Match this (simple) thing 1 or more times. */ | |
73 | #define CURLY 61 /* 0x3d Match this simple thing {n,m} times. */ | |
74 | #define CURLYN 62 /* 0x3e Capture next-after-this simple thing */ | |
75 | #define CURLYM 63 /* 0x3f Capture this medium-complex thing {n,m} times. */ | |
76 | #define CURLYX 64 /* 0x40 Match this complex thing {n,m} times. */ | |
77 | #define WHILEM 65 /* 0x41 Do curly processing and see if rest matches. */ | |
78 | #define OPEN 66 /* 0x42 Mark this point in input as start of */ | |
79 | #define CLOSE 67 /* 0x43 Analogous to OPEN. */ | |
80 | #define REF 68 /* 0x44 Match some already matched string */ | |
81 | #define REFF 69 /* 0x45 Match already matched string, folded using native charset semantics for non-utf8 */ | |
82 | #define REFFL 70 /* 0x46 Match already matched string, folded in loc. */ | |
83 | #define REFFU 71 /* 0x47 Match already matched string, folded using unicode semantics for non-utf8 */ | |
84 | #define REFFA 72 /* 0x48 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */ | |
85 | #define NREF 73 /* 0x49 Match some already matched string */ | |
86 | #define NREFF 74 /* 0x4a Match already matched string, folded using native charset semantics for non-utf8 */ | |
87 | #define NREFFL 75 /* 0x4b Match already matched string, folded in loc. */ | |
88 | #define NREFFU 76 /* 0x4c Match already matched string, folded using unicode semantics for non-utf8 */ | |
89 | #define NREFFA 77 /* 0x4d Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */ | |
90 | #define IFMATCH 78 /* 0x4e Succeeds if the following matches. */ | |
91 | #define UNLESSM 79 /* 0x4f Fails if the following matches. */ | |
92 | #define SUSPEND 80 /* 0x50 "Independent" sub-RE. */ | |
93 | #define IFTHEN 81 /* 0x51 Switch, should be preceded by switcher . */ | |
94 | #define GROUPP 82 /* 0x52 Whether the group matched. */ | |
95 | #define LONGJMP 83 /* 0x53 Jump far away. */ | |
96 | #define BRANCHJ 84 /* 0x54 BRANCH with long offset. */ | |
97 | #define EVAL 85 /* 0x55 Execute some Perl code. */ | |
98 | #define MINMOD 86 /* 0x56 Next operator is not greedy. */ | |
99 | #define LOGICAL 87 /* 0x57 Next opcode should set the flag only. */ | |
100 | #define RENUM 88 /* 0x58 Group with independently numbered parens. */ | |
101 | #define TRIE 89 /* 0x59 Match many EXACT(F[ALU]?)? at once. flags==type */ | |
102 | #define TRIEC 90 /* 0x5a Same as TRIE, but with embedded charclass data */ | |
103 | #define AHOCORASICK 91 /* 0x5b Aho Corasick stclass. flags==type */ | |
104 | #define AHOCORASICKC 92 /* 0x5c Same as AHOCORASICK, but with embedded charclass data */ | |
105 | #define GOSUB 93 /* 0x5d recurse to paren arg1 at (signed) ofs arg2 */ | |
106 | #define GOSTART 94 /* 0x5e recurse to start of pattern */ | |
107 | #define NGROUPP 95 /* 0x5f Whether the group matched. */ | |
108 | #define INSUBP 96 /* 0x60 Whether we are in a specific recurse. */ | |
109 | #define DEFINEP 97 /* 0x61 Never execute directly. */ | |
110 | #define ENDLIKE 98 /* 0x62 Used only for the type field of verbs */ | |
111 | #define OPFAIL 99 /* 0x63 Same as (?!) */ | |
112 | #define ACCEPT 100 /* 0x64 Accepts the current matched string. */ | |
113 | #define VERB 101 /* 0x65 Used only for the type field of verbs */ | |
114 | #define PRUNE 102 /* 0x66 Pattern fails at this startpoint if no-backtracking through this */ | |
115 | #define MARKPOINT 103 /* 0x67 Push the current location for rollback by cut. */ | |
116 | #define SKIP 104 /* 0x68 On failure skip forward (to the mark) before retrying */ | |
117 | #define COMMIT 105 /* 0x69 Pattern fails outright if backtracking through this */ | |
118 | #define CUTGROUP 106 /* 0x6a On failure go to the next alternation in the group */ | |
119 | #define KEEPS 107 /* 0x6b $& begins here. */ | |
120 | #define LNBREAK 108 /* 0x6c generic newline pattern */ | |
121 | #define VERTWS 109 /* 0x6d vertical whitespace (Perl 6) */ | |
122 | #define NVERTWS 110 /* 0x6e not vertical whitespace (Perl 6) */ | |
123 | #define HORIZWS 111 /* 0x6f horizontal whitespace (Perl 6) */ | |
124 | #define NHORIZWS 112 /* 0x70 not horizontal whitespace (Perl 6) */ | |
125 | #define OPTIMIZED 113 /* 0x71 Placeholder for dump. */ | |
126 | #define PSEUDO 114 /* 0x72 Pseudo opcode for internal use. */ | |
03363afd | 127 | /* ------------ States ------------- */ |
24b23f37 YO |
128 | #define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */ |
129 | #define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */ | |
130 | #define EVAL_AB (REGNODE_MAX + 3) /* state for EVAL */ | |
131 | #define EVAL_AB_fail (REGNODE_MAX + 4) /* state for EVAL */ | |
132 | #define CURLYX_end (REGNODE_MAX + 5) /* state for CURLYX */ | |
133 | #define CURLYX_end_fail (REGNODE_MAX + 6) /* state for CURLYX */ | |
134 | #define WHILEM_A_pre (REGNODE_MAX + 7) /* state for WHILEM */ | |
135 | #define WHILEM_A_pre_fail (REGNODE_MAX + 8) /* state for WHILEM */ | |
136 | #define WHILEM_A_min (REGNODE_MAX + 9) /* state for WHILEM */ | |
137 | #define WHILEM_A_min_fail (REGNODE_MAX + 10) /* state for WHILEM */ | |
138 | #define WHILEM_A_max (REGNODE_MAX + 11) /* state for WHILEM */ | |
139 | #define WHILEM_A_max_fail (REGNODE_MAX + 12) /* state for WHILEM */ | |
140 | #define WHILEM_B_min (REGNODE_MAX + 13) /* state for WHILEM */ | |
141 | #define WHILEM_B_min_fail (REGNODE_MAX + 14) /* state for WHILEM */ | |
142 | #define WHILEM_B_max (REGNODE_MAX + 15) /* state for WHILEM */ | |
143 | #define WHILEM_B_max_fail (REGNODE_MAX + 16) /* state for WHILEM */ | |
144 | #define BRANCH_next (REGNODE_MAX + 17) /* state for BRANCH */ | |
145 | #define BRANCH_next_fail (REGNODE_MAX + 18) /* state for BRANCH */ | |
146 | #define CURLYM_A (REGNODE_MAX + 19) /* state for CURLYM */ | |
147 | #define CURLYM_A_fail (REGNODE_MAX + 20) /* state for CURLYM */ | |
148 | #define CURLYM_B (REGNODE_MAX + 21) /* state for CURLYM */ | |
149 | #define CURLYM_B_fail (REGNODE_MAX + 22) /* state for CURLYM */ | |
150 | #define IFMATCH_A (REGNODE_MAX + 23) /* state for IFMATCH */ | |
151 | #define IFMATCH_A_fail (REGNODE_MAX + 24) /* state for IFMATCH */ | |
152 | #define CURLY_B_min_known (REGNODE_MAX + 25) /* state for CURLY */ | |
153 | #define CURLY_B_min_known_fail (REGNODE_MAX + 26) /* state for CURLY */ | |
154 | #define CURLY_B_min (REGNODE_MAX + 27) /* state for CURLY */ | |
155 | #define CURLY_B_min_fail (REGNODE_MAX + 28) /* state for CURLY */ | |
156 | #define CURLY_B_max (REGNODE_MAX + 29) /* state for CURLY */ | |
157 | #define CURLY_B_max_fail (REGNODE_MAX + 30) /* state for CURLY */ | |
158 | #define COMMIT_next (REGNODE_MAX + 31) /* state for COMMIT */ | |
159 | #define COMMIT_next_fail (REGNODE_MAX + 32) /* state for COMMIT */ | |
e2e6a0f1 YO |
160 | #define MARKPOINT_next (REGNODE_MAX + 33) /* state for MARKPOINT */ |
161 | #define MARKPOINT_next_fail (REGNODE_MAX + 34) /* state for MARKPOINT */ | |
5d458dd8 YO |
162 | #define SKIP_next (REGNODE_MAX + 35) /* state for SKIP */ |
163 | #define SKIP_next_fail (REGNODE_MAX + 36) /* state for SKIP */ | |
164 | #define CUTGROUP_next (REGNODE_MAX + 37) /* state for CUTGROUP */ | |
165 | #define CUTGROUP_next_fail (REGNODE_MAX + 38) /* state for CUTGROUP */ | |
ee9b8eae YO |
166 | #define KEEPS_next (REGNODE_MAX + 39) /* state for KEEPS */ |
167 | #define KEEPS_next_fail (REGNODE_MAX + 40) /* state for KEEPS */ | |
03363afd | 168 | |
6bda09f9 | 169 | /* PL_regkind[] What type of regop or state is this. */ |
d09b2d29 IZ |
170 | |
171 | #ifndef DOINIT | |
22c35a8c | 172 | EXTCONST U8 PL_regkind[]; |
d09b2d29 | 173 | #else |
22c35a8c | 174 | EXTCONST U8 PL_regkind[] = { |
e2e6a0f1 YO |
175 | END, /* END */ |
176 | END, /* SUCCEED */ | |
177 | BOL, /* BOL */ | |
178 | BOL, /* MBOL */ | |
179 | BOL, /* SBOL */ | |
180 | EOL, /* EOS */ | |
181 | EOL, /* EOL */ | |
182 | EOL, /* MEOL */ | |
183 | EOL, /* SEOL */ | |
184 | BOUND, /* BOUND */ | |
185 | BOUND, /* BOUNDL */ | |
1e355c70 | 186 | BOUND, /* BOUNDU */ |
0c6e81eb | 187 | BOUND, /* BOUNDA */ |
e2e6a0f1 YO |
188 | NBOUND, /* NBOUND */ |
189 | NBOUND, /* NBOUNDL */ | |
1e355c70 | 190 | NBOUND, /* NBOUNDU */ |
0c6e81eb | 191 | NBOUND, /* NBOUNDA */ |
e2e6a0f1 YO |
192 | GPOS, /* GPOS */ |
193 | REG_ANY, /* REG_ANY */ | |
194 | REG_ANY, /* SANY */ | |
195 | REG_ANY, /* CANY */ | |
196 | ANYOF, /* ANYOF */ | |
0e019ad6 | 197 | ANYOF, /* ANYOFV */ |
e2e6a0f1 YO |
198 | ALNUM, /* ALNUM */ |
199 | ALNUM, /* ALNUML */ | |
fdf48794 | 200 | ALNUM, /* ALNUMU */ |
0c6e81eb | 201 | ALNUM, /* ALNUMA */ |
e2e6a0f1 YO |
202 | NALNUM, /* NALNUM */ |
203 | NALNUM, /* NALNUML */ | |
fdf48794 | 204 | NALNUM, /* NALNUMU */ |
0c6e81eb | 205 | NALNUM, /* NALNUMA */ |
e2e6a0f1 YO |
206 | SPACE, /* SPACE */ |
207 | SPACE, /* SPACEL */ | |
fdf48794 | 208 | SPACE, /* SPACEU */ |
0c6e81eb | 209 | SPACE, /* SPACEA */ |
e2e6a0f1 YO |
210 | NSPACE, /* NSPACE */ |
211 | NSPACE, /* NSPACEL */ | |
fdf48794 | 212 | NSPACE, /* NSPACEU */ |
0c6e81eb | 213 | NSPACE, /* NSPACEA */ |
e2e6a0f1 YO |
214 | DIGIT, /* DIGIT */ |
215 | DIGIT, /* DIGITL */ | |
693fefec | 216 | NOTHING, /* PLACEHOLDER1 */ |
0c6e81eb | 217 | DIGIT, /* DIGITA */ |
e2e6a0f1 YO |
218 | NDIGIT, /* NDIGIT */ |
219 | NDIGIT, /* NDIGITL */ | |
693fefec | 220 | NOTHING, /* PLACEHOLDER2 */ |
0c6e81eb | 221 | NDIGIT, /* NDIGITA */ |
e2e6a0f1 YO |
222 | CLUMP, /* CLUMP */ |
223 | BRANCH, /* BRANCH */ | |
224 | BACK, /* BACK */ | |
225 | EXACT, /* EXACT */ | |
226 | EXACT, /* EXACTF */ | |
227 | EXACT, /* EXACTFL */ | |
01f98ec2 | 228 | EXACT, /* EXACTFU */ |
8c1182fd | 229 | EXACT, /* EXACTFA */ |
3c760661 | 230 | EXACT, /* EXACTFU_SS */ |
fab2782b | 231 | EXACT, /* EXACTFU_TRICKYFOLD */ |
e2e6a0f1 YO |
232 | NOTHING, /* NOTHING */ |
233 | NOTHING, /* TAIL */ | |
234 | STAR, /* STAR */ | |
235 | PLUS, /* PLUS */ | |
236 | CURLY, /* CURLY */ | |
237 | CURLY, /* CURLYN */ | |
238 | CURLY, /* CURLYM */ | |
239 | CURLY, /* CURLYX */ | |
240 | WHILEM, /* WHILEM */ | |
241 | OPEN, /* OPEN */ | |
242 | CLOSE, /* CLOSE */ | |
243 | REF, /* REF */ | |
244 | REF, /* REFF */ | |
245 | REF, /* REFFL */ | |
01f98ec2 | 246 | REF, /* REFFU */ |
781aab5c | 247 | REF, /* REFFA */ |
01f98ec2 KW |
248 | REF, /* NREF */ |
249 | REF, /* NREFF */ | |
250 | REF, /* NREFFL */ | |
251 | REF, /* NREFFU */ | |
781aab5c | 252 | REF, /* NREFFA */ |
e2e6a0f1 YO |
253 | BRANCHJ, /* IFMATCH */ |
254 | BRANCHJ, /* UNLESSM */ | |
255 | BRANCHJ, /* SUSPEND */ | |
256 | BRANCHJ, /* IFTHEN */ | |
257 | GROUPP, /* GROUPP */ | |
258 | LONGJMP, /* LONGJMP */ | |
259 | BRANCHJ, /* BRANCHJ */ | |
260 | EVAL, /* EVAL */ | |
261 | MINMOD, /* MINMOD */ | |
262 | LOGICAL, /* LOGICAL */ | |
263 | BRANCHJ, /* RENUM */ | |
264 | TRIE, /* TRIE */ | |
265 | TRIE, /* TRIEC */ | |
266 | TRIE, /* AHOCORASICK */ | |
267 | TRIE, /* AHOCORASICKC */ | |
268 | GOSUB, /* GOSUB */ | |
269 | GOSTART, /* GOSTART */ | |
e2e6a0f1 YO |
270 | NGROUPP, /* NGROUPP */ |
271 | INSUBP, /* INSUBP */ | |
272 | DEFINEP, /* DEFINEP */ | |
273 | ENDLIKE, /* ENDLIKE */ | |
274 | ENDLIKE, /* OPFAIL */ | |
275 | ENDLIKE, /* ACCEPT */ | |
276 | VERB, /* VERB */ | |
5d458dd8 | 277 | VERB, /* PRUNE */ |
e2e6a0f1 | 278 | VERB, /* MARKPOINT */ |
5d458dd8 | 279 | VERB, /* SKIP */ |
e2e6a0f1 | 280 | VERB, /* COMMIT */ |
5d458dd8 | 281 | VERB, /* CUTGROUP */ |
ee9b8eae | 282 | KEEPS, /* KEEPS */ |
e1d1eefb YO |
283 | LNBREAK, /* LNBREAK */ |
284 | VERTWS, /* VERTWS */ | |
285 | NVERTWS, /* NVERTWS */ | |
286 | HORIZWS, /* HORIZWS */ | |
287 | NHORIZWS, /* NHORIZWS */ | |
e2e6a0f1 YO |
288 | NOTHING, /* OPTIMIZED */ |
289 | PSEUDO, /* PSEUDO */ | |
03363afd | 290 | /* ------------ States ------------- */ |
e2e6a0f1 YO |
291 | TRIE, /* TRIE_next */ |
292 | TRIE, /* TRIE_next_fail */ | |
293 | EVAL, /* EVAL_AB */ | |
294 | EVAL, /* EVAL_AB_fail */ | |
295 | CURLYX, /* CURLYX_end */ | |
296 | CURLYX, /* CURLYX_end_fail */ | |
297 | WHILEM, /* WHILEM_A_pre */ | |
298 | WHILEM, /* WHILEM_A_pre_fail */ | |
299 | WHILEM, /* WHILEM_A_min */ | |
300 | WHILEM, /* WHILEM_A_min_fail */ | |
301 | WHILEM, /* WHILEM_A_max */ | |
302 | WHILEM, /* WHILEM_A_max_fail */ | |
303 | WHILEM, /* WHILEM_B_min */ | |
304 | WHILEM, /* WHILEM_B_min_fail */ | |
305 | WHILEM, /* WHILEM_B_max */ | |
306 | WHILEM, /* WHILEM_B_max_fail */ | |
307 | BRANCH, /* BRANCH_next */ | |
308 | BRANCH, /* BRANCH_next_fail */ | |
309 | CURLYM, /* CURLYM_A */ | |
310 | CURLYM, /* CURLYM_A_fail */ | |
311 | CURLYM, /* CURLYM_B */ | |
312 | CURLYM, /* CURLYM_B_fail */ | |
313 | IFMATCH, /* IFMATCH_A */ | |
314 | IFMATCH, /* IFMATCH_A_fail */ | |
315 | CURLY, /* CURLY_B_min_known */ | |
316 | CURLY, /* CURLY_B_min_known_fail */ | |
317 | CURLY, /* CURLY_B_min */ | |
318 | CURLY, /* CURLY_B_min_fail */ | |
319 | CURLY, /* CURLY_B_max */ | |
320 | CURLY, /* CURLY_B_max_fail */ | |
321 | COMMIT, /* COMMIT_next */ | |
322 | COMMIT, /* COMMIT_next_fail */ | |
323 | MARKPOINT, /* MARKPOINT_next */ | |
324 | MARKPOINT, /* MARKPOINT_next_fail */ | |
5d458dd8 YO |
325 | SKIP, /* SKIP_next */ |
326 | SKIP, /* SKIP_next_fail */ | |
327 | CUTGROUP, /* CUTGROUP_next */ | |
328 | CUTGROUP, /* CUTGROUP_next_fail */ | |
ee9b8eae YO |
329 | KEEPS, /* KEEPS_next */ |
330 | KEEPS, /* KEEPS_next_fail */ | |
d09b2d29 IZ |
331 | }; |
332 | #endif | |
333 | ||
6bda09f9 | 334 | /* regarglen[] - How large is the argument part of the node (in regnodes) */ |
d09b2d29 IZ |
335 | |
336 | #ifdef REG_COMP_C | |
29de9391 | 337 | static const U8 regarglen[] = { |
03363afd YO |
338 | 0, /* END */ |
339 | 0, /* SUCCEED */ | |
340 | 0, /* BOL */ | |
341 | 0, /* MBOL */ | |
342 | 0, /* SBOL */ | |
343 | 0, /* EOS */ | |
344 | 0, /* EOL */ | |
345 | 0, /* MEOL */ | |
346 | 0, /* SEOL */ | |
347 | 0, /* BOUND */ | |
348 | 0, /* BOUNDL */ | |
1e355c70 | 349 | 0, /* BOUNDU */ |
0c6e81eb | 350 | 0, /* BOUNDA */ |
03363afd YO |
351 | 0, /* NBOUND */ |
352 | 0, /* NBOUNDL */ | |
1e355c70 | 353 | 0, /* NBOUNDU */ |
0c6e81eb | 354 | 0, /* NBOUNDA */ |
03363afd YO |
355 | 0, /* GPOS */ |
356 | 0, /* REG_ANY */ | |
357 | 0, /* SANY */ | |
358 | 0, /* CANY */ | |
359 | 0, /* ANYOF */ | |
0e019ad6 | 360 | 0, /* ANYOFV */ |
03363afd YO |
361 | 0, /* ALNUM */ |
362 | 0, /* ALNUML */ | |
fdf48794 | 363 | 0, /* ALNUMU */ |
0c6e81eb | 364 | 0, /* ALNUMA */ |
03363afd YO |
365 | 0, /* NALNUM */ |
366 | 0, /* NALNUML */ | |
fdf48794 | 367 | 0, /* NALNUMU */ |
0c6e81eb | 368 | 0, /* NALNUMA */ |
03363afd YO |
369 | 0, /* SPACE */ |
370 | 0, /* SPACEL */ | |
fdf48794 | 371 | 0, /* SPACEU */ |
0c6e81eb | 372 | 0, /* SPACEA */ |
03363afd YO |
373 | 0, /* NSPACE */ |
374 | 0, /* NSPACEL */ | |
fdf48794 | 375 | 0, /* NSPACEU */ |
0c6e81eb | 376 | 0, /* NSPACEA */ |
03363afd YO |
377 | 0, /* DIGIT */ |
378 | 0, /* DIGITL */ | |
693fefec | 379 | 0, /* PLACEHOLDER1 */ |
0c6e81eb | 380 | 0, /* DIGITA */ |
03363afd YO |
381 | 0, /* NDIGIT */ |
382 | 0, /* NDIGITL */ | |
693fefec | 383 | 0, /* PLACEHOLDER2 */ |
0c6e81eb | 384 | 0, /* NDIGITA */ |
03363afd YO |
385 | 0, /* CLUMP */ |
386 | 0, /* BRANCH */ | |
387 | 0, /* BACK */ | |
388 | 0, /* EXACT */ | |
389 | 0, /* EXACTF */ | |
390 | 0, /* EXACTFL */ | |
01f98ec2 | 391 | 0, /* EXACTFU */ |
8c1182fd | 392 | 0, /* EXACTFA */ |
3c760661 | 393 | 0, /* EXACTFU_SS */ |
fab2782b | 394 | 0, /* EXACTFU_TRICKYFOLD */ |
03363afd YO |
395 | 0, /* NOTHING */ |
396 | 0, /* TAIL */ | |
397 | 0, /* STAR */ | |
398 | 0, /* PLUS */ | |
399 | EXTRA_SIZE(struct regnode_2), /* CURLY */ | |
400 | EXTRA_SIZE(struct regnode_2), /* CURLYN */ | |
401 | EXTRA_SIZE(struct regnode_2), /* CURLYM */ | |
402 | EXTRA_SIZE(struct regnode_2), /* CURLYX */ | |
403 | 0, /* WHILEM */ | |
404 | EXTRA_SIZE(struct regnode_1), /* OPEN */ | |
405 | EXTRA_SIZE(struct regnode_1), /* CLOSE */ | |
406 | EXTRA_SIZE(struct regnode_1), /* REF */ | |
407 | EXTRA_SIZE(struct regnode_1), /* REFF */ | |
408 | EXTRA_SIZE(struct regnode_1), /* REFFL */ | |
01f98ec2 | 409 | EXTRA_SIZE(struct regnode_1), /* REFFU */ |
781aab5c | 410 | EXTRA_SIZE(struct regnode_1), /* REFFA */ |
01f98ec2 KW |
411 | EXTRA_SIZE(struct regnode_1), /* NREF */ |
412 | EXTRA_SIZE(struct regnode_1), /* NREFF */ | |
413 | EXTRA_SIZE(struct regnode_1), /* NREFFL */ | |
414 | EXTRA_SIZE(struct regnode_1), /* NREFFU */ | |
781aab5c | 415 | EXTRA_SIZE(struct regnode_1), /* NREFFA */ |
03363afd YO |
416 | EXTRA_SIZE(struct regnode_1), /* IFMATCH */ |
417 | EXTRA_SIZE(struct regnode_1), /* UNLESSM */ | |
418 | EXTRA_SIZE(struct regnode_1), /* SUSPEND */ | |
419 | EXTRA_SIZE(struct regnode_1), /* IFTHEN */ | |
420 | EXTRA_SIZE(struct regnode_1), /* GROUPP */ | |
421 | EXTRA_SIZE(struct regnode_1), /* LONGJMP */ | |
422 | EXTRA_SIZE(struct regnode_1), /* BRANCHJ */ | |
423 | EXTRA_SIZE(struct regnode_1), /* EVAL */ | |
424 | 0, /* MINMOD */ | |
425 | 0, /* LOGICAL */ | |
426 | EXTRA_SIZE(struct regnode_1), /* RENUM */ | |
427 | EXTRA_SIZE(struct regnode_1), /* TRIE */ | |
428 | EXTRA_SIZE(struct regnode_charclass), /* TRIEC */ | |
429 | EXTRA_SIZE(struct regnode_1), /* AHOCORASICK */ | |
430 | EXTRA_SIZE(struct regnode_charclass), /* AHOCORASICKC */ | |
1a147d38 YO |
431 | EXTRA_SIZE(struct regnode_2L), /* GOSUB */ |
432 | 0, /* GOSTART */ | |
0a4db386 | 433 | EXTRA_SIZE(struct regnode_1), /* NGROUPP */ |
1a147d38 | 434 | EXTRA_SIZE(struct regnode_1), /* INSUBP */ |
0a4db386 | 435 | EXTRA_SIZE(struct regnode_1), /* DEFINEP */ |
e2e6a0f1 | 436 | 0, /* ENDLIKE */ |
7f69552c | 437 | 0, /* OPFAIL */ |
e2e6a0f1 | 438 | EXTRA_SIZE(struct regnode_1), /* ACCEPT */ |
20832bc5 | 439 | EXTRA_SIZE(struct regnode_1), /* VERB */ |
5d458dd8 | 440 | EXTRA_SIZE(struct regnode_1), /* PRUNE */ |
e2e6a0f1 | 441 | EXTRA_SIZE(struct regnode_1), /* MARKPOINT */ |
5d458dd8 | 442 | EXTRA_SIZE(struct regnode_1), /* SKIP */ |
e2e6a0f1 | 443 | EXTRA_SIZE(struct regnode_1), /* COMMIT */ |
5d458dd8 | 444 | EXTRA_SIZE(struct regnode_1), /* CUTGROUP */ |
ee9b8eae | 445 | 0, /* KEEPS */ |
e1d1eefb YO |
446 | 0, /* LNBREAK */ |
447 | 0, /* VERTWS */ | |
448 | 0, /* NVERTWS */ | |
449 | 0, /* HORIZWS */ | |
450 | 0, /* NHORIZWS */ | |
03363afd YO |
451 | 0, /* OPTIMIZED */ |
452 | 0, /* PSEUDO */ | |
d09b2d29 IZ |
453 | }; |
454 | ||
6bda09f9 YO |
455 | /* reg_off_by_arg[] - Which argument holds the offset to the next node */ |
456 | ||
29de9391 | 457 | static const char reg_off_by_arg[] = { |
03363afd YO |
458 | 0, /* END */ |
459 | 0, /* SUCCEED */ | |
460 | 0, /* BOL */ | |
461 | 0, /* MBOL */ | |
462 | 0, /* SBOL */ | |
463 | 0, /* EOS */ | |
464 | 0, /* EOL */ | |
465 | 0, /* MEOL */ | |
466 | 0, /* SEOL */ | |
467 | 0, /* BOUND */ | |
468 | 0, /* BOUNDL */ | |
1e355c70 | 469 | 0, /* BOUNDU */ |
0c6e81eb | 470 | 0, /* BOUNDA */ |
03363afd YO |
471 | 0, /* NBOUND */ |
472 | 0, /* NBOUNDL */ | |
1e355c70 | 473 | 0, /* NBOUNDU */ |
0c6e81eb | 474 | 0, /* NBOUNDA */ |
03363afd YO |
475 | 0, /* GPOS */ |
476 | 0, /* REG_ANY */ | |
477 | 0, /* SANY */ | |
478 | 0, /* CANY */ | |
479 | 0, /* ANYOF */ | |
0e019ad6 | 480 | 0, /* ANYOFV */ |
03363afd YO |
481 | 0, /* ALNUM */ |
482 | 0, /* ALNUML */ | |
fdf48794 | 483 | 0, /* ALNUMU */ |
0c6e81eb | 484 | 0, /* ALNUMA */ |
03363afd YO |
485 | 0, /* NALNUM */ |
486 | 0, /* NALNUML */ | |
fdf48794 | 487 | 0, /* NALNUMU */ |
0c6e81eb | 488 | 0, /* NALNUMA */ |
03363afd YO |
489 | 0, /* SPACE */ |
490 | 0, /* SPACEL */ | |
fdf48794 | 491 | 0, /* SPACEU */ |
0c6e81eb | 492 | 0, /* SPACEA */ |
03363afd YO |
493 | 0, /* NSPACE */ |
494 | 0, /* NSPACEL */ | |
fdf48794 | 495 | 0, /* NSPACEU */ |
0c6e81eb | 496 | 0, /* NSPACEA */ |
03363afd YO |
497 | 0, /* DIGIT */ |
498 | 0, /* DIGITL */ | |
693fefec | 499 | 0, /* PLACEHOLDER1 */ |
0c6e81eb | 500 | 0, /* DIGITA */ |
03363afd YO |
501 | 0, /* NDIGIT */ |
502 | 0, /* NDIGITL */ | |
693fefec | 503 | 0, /* PLACEHOLDER2 */ |
0c6e81eb | 504 | 0, /* NDIGITA */ |
03363afd YO |
505 | 0, /* CLUMP */ |
506 | 0, /* BRANCH */ | |
507 | 0, /* BACK */ | |
508 | 0, /* EXACT */ | |
509 | 0, /* EXACTF */ | |
510 | 0, /* EXACTFL */ | |
01f98ec2 | 511 | 0, /* EXACTFU */ |
8c1182fd | 512 | 0, /* EXACTFA */ |
3c760661 | 513 | 0, /* EXACTFU_SS */ |
fab2782b | 514 | 0, /* EXACTFU_TRICKYFOLD */ |
03363afd YO |
515 | 0, /* NOTHING */ |
516 | 0, /* TAIL */ | |
517 | 0, /* STAR */ | |
518 | 0, /* PLUS */ | |
519 | 0, /* CURLY */ | |
520 | 0, /* CURLYN */ | |
521 | 0, /* CURLYM */ | |
522 | 0, /* CURLYX */ | |
523 | 0, /* WHILEM */ | |
524 | 0, /* OPEN */ | |
525 | 0, /* CLOSE */ | |
526 | 0, /* REF */ | |
527 | 0, /* REFF */ | |
528 | 0, /* REFFL */ | |
01f98ec2 | 529 | 0, /* REFFU */ |
781aab5c | 530 | 0, /* REFFA */ |
01f98ec2 KW |
531 | 0, /* NREF */ |
532 | 0, /* NREFF */ | |
533 | 0, /* NREFFL */ | |
534 | 0, /* NREFFU */ | |
781aab5c | 535 | 0, /* NREFFA */ |
03363afd YO |
536 | 2, /* IFMATCH */ |
537 | 2, /* UNLESSM */ | |
538 | 1, /* SUSPEND */ | |
539 | 1, /* IFTHEN */ | |
540 | 0, /* GROUPP */ | |
541 | 1, /* LONGJMP */ | |
542 | 1, /* BRANCHJ */ | |
543 | 0, /* EVAL */ | |
544 | 0, /* MINMOD */ | |
545 | 0, /* LOGICAL */ | |
546 | 1, /* RENUM */ | |
547 | 0, /* TRIE */ | |
548 | 0, /* TRIEC */ | |
549 | 0, /* AHOCORASICK */ | |
550 | 0, /* AHOCORASICKC */ | |
1a147d38 YO |
551 | 0, /* GOSUB */ |
552 | 0, /* GOSTART */ | |
0a4db386 | 553 | 0, /* NGROUPP */ |
1a147d38 | 554 | 0, /* INSUBP */ |
0a4db386 | 555 | 0, /* DEFINEP */ |
e2e6a0f1 | 556 | 0, /* ENDLIKE */ |
7f69552c | 557 | 0, /* OPFAIL */ |
e2e6a0f1 YO |
558 | 0, /* ACCEPT */ |
559 | 0, /* VERB */ | |
5d458dd8 | 560 | 0, /* PRUNE */ |
e2e6a0f1 | 561 | 0, /* MARKPOINT */ |
5d458dd8 | 562 | 0, /* SKIP */ |
e2e6a0f1 | 563 | 0, /* COMMIT */ |
5d458dd8 | 564 | 0, /* CUTGROUP */ |
ee9b8eae | 565 | 0, /* KEEPS */ |
e1d1eefb YO |
566 | 0, /* LNBREAK */ |
567 | 0, /* VERTWS */ | |
568 | 0, /* NVERTWS */ | |
569 | 0, /* HORIZWS */ | |
570 | 0, /* NHORIZWS */ | |
03363afd YO |
571 | 0, /* OPTIMIZED */ |
572 | 0, /* PSEUDO */ | |
d09b2d29 | 573 | }; |
885f9e59 | 574 | |
13d6edb4 NC |
575 | #endif /* REG_COMP_C */ |
576 | ||
6bda09f9 YO |
577 | /* reg_name[] - Opcode/state names in string form, for debugging */ |
578 | ||
22429478 | 579 | #ifndef DOINIT |
13d6edb4 | 580 | EXTCONST char * PL_reg_name[]; |
22429478 | 581 | #else |
4764e399 | 582 | EXTCONST char * const PL_reg_name[] = { |
03363afd YO |
583 | "END", /* 0000 */ |
584 | "SUCCEED", /* 0x01 */ | |
585 | "BOL", /* 0x02 */ | |
586 | "MBOL", /* 0x03 */ | |
587 | "SBOL", /* 0x04 */ | |
588 | "EOS", /* 0x05 */ | |
589 | "EOL", /* 0x06 */ | |
590 | "MEOL", /* 0x07 */ | |
591 | "SEOL", /* 0x08 */ | |
592 | "BOUND", /* 0x09 */ | |
593 | "BOUNDL", /* 0x0a */ | |
1e355c70 | 594 | "BOUNDU", /* 0x0b */ |
0c6e81eb KW |
595 | "BOUNDA", /* 0x0c */ |
596 | "NBOUND", /* 0x0d */ | |
597 | "NBOUNDL", /* 0x0e */ | |
598 | "NBOUNDU", /* 0x0f */ | |
599 | "NBOUNDA", /* 0x10 */ | |
600 | "GPOS", /* 0x11 */ | |
601 | "REG_ANY", /* 0x12 */ | |
602 | "SANY", /* 0x13 */ | |
603 | "CANY", /* 0x14 */ | |
604 | "ANYOF", /* 0x15 */ | |
605 | "ANYOFV", /* 0x16 */ | |
606 | "ALNUM", /* 0x17 */ | |
607 | "ALNUML", /* 0x18 */ | |
608 | "ALNUMU", /* 0x19 */ | |
609 | "ALNUMA", /* 0x1a */ | |
610 | "NALNUM", /* 0x1b */ | |
611 | "NALNUML", /* 0x1c */ | |
612 | "NALNUMU", /* 0x1d */ | |
613 | "NALNUMA", /* 0x1e */ | |
614 | "SPACE", /* 0x1f */ | |
615 | "SPACEL", /* 0x20 */ | |
616 | "SPACEU", /* 0x21 */ | |
617 | "SPACEA", /* 0x22 */ | |
618 | "NSPACE", /* 0x23 */ | |
619 | "NSPACEL", /* 0x24 */ | |
620 | "NSPACEU", /* 0x25 */ | |
621 | "NSPACEA", /* 0x26 */ | |
622 | "DIGIT", /* 0x27 */ | |
623 | "DIGITL", /* 0x28 */ | |
693fefec KW |
624 | "PLACEHOLDER1", /* 0x29 */ |
625 | "DIGITA", /* 0x2a */ | |
626 | "NDIGIT", /* 0x2b */ | |
627 | "NDIGITL", /* 0x2c */ | |
628 | "PLACEHOLDER2", /* 0x2d */ | |
629 | "NDIGITA", /* 0x2e */ | |
630 | "CLUMP", /* 0x2f */ | |
631 | "BRANCH", /* 0x30 */ | |
632 | "BACK", /* 0x31 */ | |
633 | "EXACT", /* 0x32 */ | |
634 | "EXACTF", /* 0x33 */ | |
635 | "EXACTFL", /* 0x34 */ | |
636 | "EXACTFU", /* 0x35 */ | |
637 | "EXACTFA", /* 0x36 */ | |
638 | "EXACTFU_SS", /* 0x37 */ | |
639 | "EXACTFU_TRICKYFOLD", /* 0x38 */ | |
640 | "NOTHING", /* 0x39 */ | |
641 | "TAIL", /* 0x3a */ | |
642 | "STAR", /* 0x3b */ | |
643 | "PLUS", /* 0x3c */ | |
644 | "CURLY", /* 0x3d */ | |
645 | "CURLYN", /* 0x3e */ | |
646 | "CURLYM", /* 0x3f */ | |
647 | "CURLYX", /* 0x40 */ | |
648 | "WHILEM", /* 0x41 */ | |
649 | "OPEN", /* 0x42 */ | |
650 | "CLOSE", /* 0x43 */ | |
651 | "REF", /* 0x44 */ | |
652 | "REFF", /* 0x45 */ | |
653 | "REFFL", /* 0x46 */ | |
654 | "REFFU", /* 0x47 */ | |
655 | "REFFA", /* 0x48 */ | |
656 | "NREF", /* 0x49 */ | |
657 | "NREFF", /* 0x4a */ | |
658 | "NREFFL", /* 0x4b */ | |
659 | "NREFFU", /* 0x4c */ | |
660 | "NREFFA", /* 0x4d */ | |
661 | "IFMATCH", /* 0x4e */ | |
662 | "UNLESSM", /* 0x4f */ | |
663 | "SUSPEND", /* 0x50 */ | |
664 | "IFTHEN", /* 0x51 */ | |
665 | "GROUPP", /* 0x52 */ | |
666 | "LONGJMP", /* 0x53 */ | |
667 | "BRANCHJ", /* 0x54 */ | |
668 | "EVAL", /* 0x55 */ | |
669 | "MINMOD", /* 0x56 */ | |
670 | "LOGICAL", /* 0x57 */ | |
671 | "RENUM", /* 0x58 */ | |
672 | "TRIE", /* 0x59 */ | |
673 | "TRIEC", /* 0x5a */ | |
674 | "AHOCORASICK", /* 0x5b */ | |
675 | "AHOCORASICKC", /* 0x5c */ | |
676 | "GOSUB", /* 0x5d */ | |
677 | "GOSTART", /* 0x5e */ | |
678 | "NGROUPP", /* 0x5f */ | |
679 | "INSUBP", /* 0x60 */ | |
680 | "DEFINEP", /* 0x61 */ | |
681 | "ENDLIKE", /* 0x62 */ | |
682 | "OPFAIL", /* 0x63 */ | |
683 | "ACCEPT", /* 0x64 */ | |
684 | "VERB", /* 0x65 */ | |
685 | "PRUNE", /* 0x66 */ | |
686 | "MARKPOINT", /* 0x67 */ | |
687 | "SKIP", /* 0x68 */ | |
688 | "COMMIT", /* 0x69 */ | |
689 | "CUTGROUP", /* 0x6a */ | |
690 | "KEEPS", /* 0x6b */ | |
691 | "LNBREAK", /* 0x6c */ | |
692 | "VERTWS", /* 0x6d */ | |
693 | "NVERTWS", /* 0x6e */ | |
694 | "HORIZWS", /* 0x6f */ | |
695 | "NHORIZWS", /* 0x70 */ | |
696 | "OPTIMIZED", /* 0x71 */ | |
697 | "PSEUDO", /* 0x72 */ | |
03363afd | 698 | /* ------------ States ------------- */ |
24b23f37 YO |
699 | "TRIE_next", /* REGNODE_MAX +0x01 */ |
700 | "TRIE_next_fail", /* REGNODE_MAX +0x02 */ | |
701 | "EVAL_AB", /* REGNODE_MAX +0x03 */ | |
702 | "EVAL_AB_fail", /* REGNODE_MAX +0x04 */ | |
703 | "CURLYX_end", /* REGNODE_MAX +0x05 */ | |
704 | "CURLYX_end_fail", /* REGNODE_MAX +0x06 */ | |
705 | "WHILEM_A_pre", /* REGNODE_MAX +0x07 */ | |
706 | "WHILEM_A_pre_fail", /* REGNODE_MAX +0x08 */ | |
707 | "WHILEM_A_min", /* REGNODE_MAX +0x09 */ | |
708 | "WHILEM_A_min_fail", /* REGNODE_MAX +0x0a */ | |
709 | "WHILEM_A_max", /* REGNODE_MAX +0x0b */ | |
710 | "WHILEM_A_max_fail", /* REGNODE_MAX +0x0c */ | |
711 | "WHILEM_B_min", /* REGNODE_MAX +0x0d */ | |
712 | "WHILEM_B_min_fail", /* REGNODE_MAX +0x0e */ | |
713 | "WHILEM_B_max", /* REGNODE_MAX +0x0f */ | |
714 | "WHILEM_B_max_fail", /* REGNODE_MAX +0x10 */ | |
715 | "BRANCH_next", /* REGNODE_MAX +0x11 */ | |
716 | "BRANCH_next_fail", /* REGNODE_MAX +0x12 */ | |
717 | "CURLYM_A", /* REGNODE_MAX +0x13 */ | |
718 | "CURLYM_A_fail", /* REGNODE_MAX +0x14 */ | |
719 | "CURLYM_B", /* REGNODE_MAX +0x15 */ | |
720 | "CURLYM_B_fail", /* REGNODE_MAX +0x16 */ | |
721 | "IFMATCH_A", /* REGNODE_MAX +0x17 */ | |
722 | "IFMATCH_A_fail", /* REGNODE_MAX +0x18 */ | |
723 | "CURLY_B_min_known", /* REGNODE_MAX +0x19 */ | |
724 | "CURLY_B_min_known_fail", /* REGNODE_MAX +0x1a */ | |
725 | "CURLY_B_min", /* REGNODE_MAX +0x1b */ | |
726 | "CURLY_B_min_fail", /* REGNODE_MAX +0x1c */ | |
727 | "CURLY_B_max", /* REGNODE_MAX +0x1d */ | |
728 | "CURLY_B_max_fail", /* REGNODE_MAX +0x1e */ | |
729 | "COMMIT_next", /* REGNODE_MAX +0x1f */ | |
730 | "COMMIT_next_fail", /* REGNODE_MAX +0x20 */ | |
e2e6a0f1 YO |
731 | "MARKPOINT_next", /* REGNODE_MAX +0x21 */ |
732 | "MARKPOINT_next_fail", /* REGNODE_MAX +0x22 */ | |
5d458dd8 YO |
733 | "SKIP_next", /* REGNODE_MAX +0x23 */ |
734 | "SKIP_next_fail", /* REGNODE_MAX +0x24 */ | |
735 | "CUTGROUP_next", /* REGNODE_MAX +0x25 */ | |
736 | "CUTGROUP_next_fail", /* REGNODE_MAX +0x26 */ | |
ee9b8eae YO |
737 | "KEEPS_next", /* REGNODE_MAX +0x27 */ |
738 | "KEEPS_next_fail", /* REGNODE_MAX +0x28 */ | |
885f9e59 | 739 | }; |
22429478 | 740 | #endif /* DOINIT */ |
d09b2d29 | 741 | |
f7819f85 A |
742 | /* PL_reg_extflags_name[] - Opcode/state names in string form, for debugging */ |
743 | ||
744 | #ifndef DOINIT | |
745 | EXTCONST char * PL_reg_extflags_name[]; | |
746 | #else | |
747 | EXTCONST char * const PL_reg_extflags_name[] = { | |
df7a8460 | 748 | /* Bits in extflags defined: 11111111111111111111111011111111 */ |
52d81aa8 NC |
749 | "MULTILINE", /* 0x00000001 */ |
750 | "SINGLELINE", /* 0x00000002 */ | |
751 | "FOLD", /* 0x00000004 */ | |
752 | "EXTENDED", /* 0x00000008 */ | |
753 | "KEEPCOPY", /* 0x00000010 */ | |
df7a8460 KW |
754 | "CHARSET", /* 0x000000e0 */ |
755 | "CHARSET", /* 0x000000e0 */ | |
756 | "CHARSET", /* 0x000000e0 */ | |
e795e964 KW |
757 | "UNUSED_BIT_8", /* 0x00000100 */ |
758 | "ANCH_BOL", /* 0x00000200 */ | |
759 | "ANCH_MBOL", /* 0x00000400 */ | |
760 | "ANCH_SBOL", /* 0x00000800 */ | |
761 | "ANCH_GPOS", /* 0x00001000 */ | |
762 | "GPOS_SEEN", /* 0x00002000 */ | |
763 | "GPOS_FLOAT", /* 0x00004000 */ | |
764 | "LOOKBEHIND_SEEN", /* 0x00008000 */ | |
765 | "EVAL_SEEN", /* 0x00010000 */ | |
766 | "CANY_SEEN", /* 0x00020000 */ | |
767 | "NOSCAN", /* 0x00040000 */ | |
768 | "CHECK_ALL", /* 0x00080000 */ | |
52d81aa8 NC |
769 | "MATCH_UTF8", /* 0x00100000 */ |
770 | "USE_INTUIT_NOML", /* 0x00200000 */ | |
771 | "USE_INTUIT_ML", /* 0x00400000 */ | |
772 | "INTUIT_TAIL", /* 0x00800000 */ | |
773 | "SPLIT", /* 0x01000000 */ | |
774 | "COPY_DONE", /* 0x02000000 */ | |
775 | "TAINTED_SEEN", /* 0x04000000 */ | |
776 | "TAINTED", /* 0x08000000 */ | |
777 | "START_ONLY", /* 0x10000000 */ | |
778 | "SKIPWHITE", /* 0x20000000 */ | |
779 | "WHITE", /* 0x40000000 */ | |
780 | "NULL", /* 0x80000000 */ | |
f7819f85 A |
781 | }; |
782 | #endif /* DOINIT */ | |
783 | ||
f9ef50a7 | 784 | /* The following have no fixed length. U8 so we can do strchr() on it. */ |
ded4dd2a | 785 | #define REGNODE_VARIES(node) (PL_varies_bitmask[(node) >> 3] & (1 << ((node) & 7))) |
e52fc539 | 786 | |
f9ef50a7 | 787 | #ifndef DOINIT |
ded4dd2a | 788 | EXTCONST U8 PL_varies[] __attribute__deprecated__; |
f9ef50a7 | 789 | #else |
ded4dd2a | 790 | EXTCONST U8 PL_varies[] __attribute__deprecated__ = { |
0e019ad6 | 791 | ANYOFV, CLUMP, BRANCH, BACK, STAR, PLUS, CURLY, CURLYN, CURLYM, CURLYX, |
781aab5c KW |
792 | WHILEM, REF, REFF, REFFL, REFFU, REFFA, NREF, NREFF, NREFFL, NREFFU, |
793 | NREFFA, SUSPEND, IFTHEN, BRANCHJ, | |
f9ef50a7 NC |
794 | 0 |
795 | }; | |
796 | #endif /* DOINIT */ | |
797 | ||
ded4dd2a NC |
798 | #ifndef DOINIT |
799 | EXTCONST U8 PL_varies_bitmask[]; | |
800 | #else | |
801 | EXTCONST U8 PL_varies_bitmask[] = { | |
693fefec | 802 | 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x03, 0xF8, 0xF3, 0x3F, 0x13, 0x00, 0x00, 0x00, 0x00 |
ded4dd2a NC |
803 | }; |
804 | #endif /* DOINIT */ | |
805 | ||
f9ef50a7 NC |
806 | /* The following always have a length of 1. U8 we can do strchr() on it. */ |
807 | /* (Note that length 1 means "one character" under UTF8, not "one octet".) */ | |
ded4dd2a | 808 | #define REGNODE_SIMPLE(node) (PL_simple_bitmask[(node) >> 3] & (1 << ((node) & 7))) |
e52fc539 | 809 | |
f9ef50a7 | 810 | #ifndef DOINIT |
ded4dd2a | 811 | EXTCONST U8 PL_simple[] __attribute__deprecated__; |
f9ef50a7 | 812 | #else |
ded4dd2a | 813 | EXTCONST U8 PL_simple[] __attribute__deprecated__ = { |
0c6e81eb KW |
814 | REG_ANY, SANY, CANY, ANYOF, ALNUM, ALNUML, ALNUMU, ALNUMA, NALNUM, |
815 | NALNUML, NALNUMU, NALNUMA, SPACE, SPACEL, SPACEU, SPACEA, NSPACE, | |
816 | NSPACEL, NSPACEU, NSPACEA, DIGIT, DIGITL, DIGITA, NDIGIT, NDIGITL, | |
817 | NDIGITA, VERTWS, NVERTWS, HORIZWS, NHORIZWS, | |
f9ef50a7 NC |
818 | 0 |
819 | }; | |
820 | #endif /* DOINIT */ | |
821 | ||
ded4dd2a NC |
822 | #ifndef DOINIT |
823 | EXTCONST U8 PL_simple_bitmask[]; | |
824 | #else | |
825 | EXTCONST U8 PL_simple_bitmask[] = { | |
693fefec | 826 | 0x00, 0x00, 0xBC, 0xFF, 0xFF, 0x5D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x01 |
ded4dd2a NC |
827 | }; |
828 | #endif /* DOINIT */ | |
829 | ||
37442d52 | 830 | /* ex: set ro: */ |