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