This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlapi: Remove per-thread section; move to real scns
[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
33b57041
KW
7#if defined(PERL_CORE) || defined(PERL_EXT_RE_BUILD)
8
6bda09f9
YO
9/* Regops and State definitions */
10
86451f01
KW
11#define REGNODE_MAX 109
12#define REGMATCH_STATE_MAX 149
03363afd 13
ce553cf5
KW
14/* -- For regexec.c to switch on target being utf8 (t8) or not (tb, b='byte');
15 * same with pattern (p8, pb) -- */
16#define with_tp_UTF8ness(op, t_utf8, p_utf8) \
17 (((op) << 2) + (cBOOL(t_utf8) << 1) + cBOOL(p_utf8))
18
19/* The #defines below give both the basic regnode and the expanded version for
20 switching on utf8ness */
21#define END 0 /* 0x00 End of program. */
22#define END_tb_pb 0 /* 0x000 */
23#define END_tb_p8 1 /* 0x001 */
24#define END_t8_pb 2 /* 0x002 */
25#define END_t8_p8 3 /* 0x003 */
26
27#define SUCCEED 1 /* 0x01 Return from a subroutine,
28 basically. */
29#define SUCCEED_tb_pb 4 /* 0x004 */
30#define SUCCEED_tb_p8 5 /* 0x005 */
31#define SUCCEED_t8_pb 6 /* 0x006 */
32#define SUCCEED_t8_p8 7 /* 0x007 */
33
34#define SBOL 2 /* 0x02 Match "" at beginning of
35 line: /^/, /\A/ */
36#define SBOL_tb_pb 8 /* 0x008 */
37#define SBOL_tb_p8 9 /* 0x009 */
38#define SBOL_t8_pb 10 /* 0x00a */
39#define SBOL_t8_p8 11 /* 0x00b */
40
41#define BOL 2 /* 0x02 Match "" at beginning of
42 line: /^/, /\A/ */
43#define BOL_tb_pb 8 /* 0x008 */
44#define BOL_tb_p8 9 /* 0x009 */
45#define BOL_t8_pb 10 /* 0x00a */
46#define BOL_t8_p8 11 /* 0x00b */
47
48#define MBOL 3 /* 0x03 Same, assuming multiline:
49 /^/m */
50#define MBOL_tb_pb 12 /* 0x00c */
51#define MBOL_tb_p8 13 /* 0x00d */
52#define MBOL_t8_pb 14 /* 0x00e */
53#define MBOL_t8_p8 15 /* 0x00f */
54
55#define SEOL 4 /* 0x04 Match "" at end of line:
56 /$/ */
57#define SEOL_tb_pb 16 /* 0x010 */
58#define SEOL_tb_p8 17 /* 0x011 */
59#define SEOL_t8_pb 18 /* 0x012 */
60#define SEOL_t8_p8 19 /* 0x013 */
61
62#define EOL 4 /* 0x04 Match "" at end of line:
63 /$/ */
64#define EOL_tb_pb 16 /* 0x010 */
65#define EOL_tb_p8 17 /* 0x011 */
66#define EOL_t8_pb 18 /* 0x012 */
67#define EOL_t8_p8 19 /* 0x013 */
68
69#define MEOL 5 /* 0x05 Same, assuming multiline:
70 /$/m */
71#define MEOL_tb_pb 20 /* 0x014 */
72#define MEOL_tb_p8 21 /* 0x015 */
73#define MEOL_t8_pb 22 /* 0x016 */
74#define MEOL_t8_p8 23 /* 0x017 */
75
76#define EOS 6 /* 0x06 Match "" at end of string:
77 /\z/ */
78#define EOS_tb_pb 24 /* 0x018 */
79#define EOS_tb_p8 25 /* 0x019 */
80#define EOS_t8_pb 26 /* 0x01a */
81#define EOS_t8_p8 27 /* 0x01b */
82
83#define GPOS 7 /* 0x07 Matches where last m//g
84 left off. */
85#define GPOS_tb_pb 28 /* 0x01c */
86#define GPOS_tb_p8 29 /* 0x01d */
87#define GPOS_t8_pb 30 /* 0x01e */
88#define GPOS_t8_p8 31 /* 0x01f */
89
90#define BOUND 8 /* 0x08 Like BOUNDA for non-utf8,
91 otherwise like BOUNDU */
92#define BOUND_tb_pb 32 /* 0x020 */
93#define BOUND_tb_p8 33 /* 0x021 */
94#define BOUND_t8_pb 34 /* 0x022 */
95#define BOUND_t8_p8 35 /* 0x023 */
96
97#define BOUNDL 9 /* 0x09 Like BOUND/BOUNDU, but \w
98 and \W are defined by current
99 locale */
100#define BOUNDL_tb_pb 36 /* 0x024 */
101#define BOUNDL_tb_p8 37 /* 0x025 */
102#define BOUNDL_t8_pb 38 /* 0x026 */
103#define BOUNDL_t8_p8 39 /* 0x027 */
104
105#define BOUNDU 10 /* 0x0a Match "" at any boundary of
106 a given type using /u rules. */
107#define BOUNDU_tb_pb 40 /* 0x028 */
108#define BOUNDU_tb_p8 41 /* 0x029 */
109#define BOUNDU_t8_pb 42 /* 0x02a */
110#define BOUNDU_t8_p8 43 /* 0x02b */
111
112#define BOUNDA 11 /* 0x0b Match "" at any boundary
113 between \w\W or \W\w, where \w
114 is [_a-zA-Z0-9] */
115#define BOUNDA_tb_pb 44 /* 0x02c */
116#define BOUNDA_tb_p8 45 /* 0x02d */
117#define BOUNDA_t8_pb 46 /* 0x02e */
118#define BOUNDA_t8_p8 47 /* 0x02f */
119
120#define NBOUND 12 /* 0x0c Like NBOUNDA for non-utf8,
121 otherwise like BOUNDU */
122#define NBOUND_tb_pb 48 /* 0x030 */
123#define NBOUND_tb_p8 49 /* 0x031 */
124#define NBOUND_t8_pb 50 /* 0x032 */
125#define NBOUND_t8_p8 51 /* 0x033 */
126
127#define NBOUNDL 13 /* 0x0d Like NBOUND/NBOUNDU, but \w
128 and \W are defined by current
129 locale */
130#define NBOUNDL_tb_pb 52 /* 0x034 */
131#define NBOUNDL_tb_p8 53 /* 0x035 */
132#define NBOUNDL_t8_pb 54 /* 0x036 */
133#define NBOUNDL_t8_p8 55 /* 0x037 */
134
135#define NBOUNDU 14 /* 0x0e Match "" at any
136 non-boundary of a given type
137 using using /u rules. */
138#define NBOUNDU_tb_pb 56 /* 0x038 */
139#define NBOUNDU_tb_p8 57 /* 0x039 */
140#define NBOUNDU_t8_pb 58 /* 0x03a */
141#define NBOUNDU_t8_p8 59 /* 0x03b */
142
143#define NBOUNDA 15 /* 0x0f Match "" betweeen any \w\w
144 or \W\W, where \w is
145 [_a-zA-Z0-9] */
146#define NBOUNDA_tb_pb 60 /* 0x03c */
147#define NBOUNDA_tb_p8 61 /* 0x03d */
148#define NBOUNDA_t8_pb 62 /* 0x03e */
149#define NBOUNDA_t8_p8 63 /* 0x03f */
150
151#define REG_ANY 16 /* 0x10 Match any one character
152 (except newline). */
153#define REG_ANY_tb_pb 64 /* 0x040 */
154#define REG_ANY_tb_p8 65 /* 0x041 */
155#define REG_ANY_t8_pb 66 /* 0x042 */
156#define REG_ANY_t8_p8 67 /* 0x043 */
157
158#define SANY 17 /* 0x11 Match any one character. */
159#define SANY_tb_pb 68 /* 0x044 */
160#define SANY_tb_p8 69 /* 0x045 */
161#define SANY_t8_pb 70 /* 0x046 */
162#define SANY_t8_p8 71 /* 0x047 */
163
164#define ANYOF 18 /* 0x12 Match character in (or not
165 in) this class, single char
166 match only */
167#define ANYOF_tb_pb 72 /* 0x048 */
168#define ANYOF_tb_p8 73 /* 0x049 */
169#define ANYOF_t8_pb 74 /* 0x04a */
170#define ANYOF_t8_p8 75 /* 0x04b */
171
172#define ANYOFD 19 /* 0x13 Like ANYOF, but /d is in
173 effect */
174#define ANYOFD_tb_pb 76 /* 0x04c */
175#define ANYOFD_tb_p8 77 /* 0x04d */
176#define ANYOFD_t8_pb 78 /* 0x04e */
177#define ANYOFD_t8_p8 79 /* 0x04f */
178
179#define ANYOFL 20 /* 0x14 Like ANYOF, but /l is in
180 effect */
181#define ANYOFL_tb_pb 80 /* 0x050 */
182#define ANYOFL_tb_p8 81 /* 0x051 */
183#define ANYOFL_t8_pb 82 /* 0x052 */
184#define ANYOFL_t8_p8 83 /* 0x053 */
185
186#define ANYOFPOSIXL 21 /* 0x15 Like ANYOFL, but matches
187 [[:posix:]] classes */
188#define ANYOFPOSIXL_tb_pb 84 /* 0x054 */
189#define ANYOFPOSIXL_tb_p8 85 /* 0x055 */
190#define ANYOFPOSIXL_t8_pb 86 /* 0x056 */
191#define ANYOFPOSIXL_t8_p8 87 /* 0x057 */
192
193#define ANYOFH 22 /* 0x16 Like ANYOF, but only has
194 "High" matches, none in the
195 bitmap; the flags field contains
196 the lowest matchable UTF-8 start
197 byte */
198#define ANYOFH_tb_pb 88 /* 0x058 */
199#define ANYOFH_tb_p8 89 /* 0x059 */
200#define ANYOFH_t8_pb 90 /* 0x05a */
201#define ANYOFH_t8_p8 91 /* 0x05b */
202
203#define ANYOFHb 23 /* 0x17 Like ANYOFH, but all
204 matches share the same UTF-8
205 start byte, given in the flags
206 field */
207#define ANYOFHb_tb_pb 92 /* 0x05c */
208#define ANYOFHb_tb_p8 93 /* 0x05d */
209#define ANYOFHb_t8_pb 94 /* 0x05e */
210#define ANYOFHb_t8_p8 95 /* 0x05f */
211
212#define ANYOFHr 24 /* 0x18 Like ANYOFH, but the flags
213 field contains packed bounds for
214 all matchable UTF-8 start bytes.
215 */
216#define ANYOFHr_tb_pb 96 /* 0x060 */
217#define ANYOFHr_tb_p8 97 /* 0x061 */
218#define ANYOFHr_t8_pb 98 /* 0x062 */
219#define ANYOFHr_t8_p8 99 /* 0x063 */
220
221#define ANYOFHs 25 /* 0x19 Like ANYOFHb, but has a
222 string field that gives the
223 leading matchable UTF-8 bytes;
224 flags field is len */
225#define ANYOFHs_tb_pb 100 /* 0x064 */
226#define ANYOFHs_tb_p8 101 /* 0x065 */
227#define ANYOFHs_t8_pb 102 /* 0x066 */
228#define ANYOFHs_t8_p8 103 /* 0x067 */
229
230#define ANYOFR 26 /* 0x1a Matches any character in
231 the range given by its packed
232 args: upper 12 bits is the max
233 delta from the base lower 20;
234 the flags field contains the
235 lowest matchable UTF-8 start
236 byte */
237#define ANYOFR_tb_pb 104 /* 0x068 */
238#define ANYOFR_tb_p8 105 /* 0x069 */
239#define ANYOFR_t8_pb 106 /* 0x06a */
240#define ANYOFR_t8_p8 107 /* 0x06b */
241
242#define ANYOFRb 27 /* 0x1b Like ANYOFR, but all
243 matches share the same UTF-8
244 start byte, given in the flags
245 field */
246#define ANYOFRb_tb_pb 108 /* 0x06c */
247#define ANYOFRb_tb_p8 109 /* 0x06d */
248#define ANYOFRb_t8_pb 110 /* 0x06e */
249#define ANYOFRb_t8_p8 111 /* 0x06f */
250
251#define ANYOFM 28 /* 0x1c Like ANYOF, but matches an
252 invariant byte as determined by
253 the mask and arg */
254#define ANYOFM_tb_pb 112 /* 0x070 */
255#define ANYOFM_tb_p8 113 /* 0x071 */
256#define ANYOFM_t8_pb 114 /* 0x072 */
257#define ANYOFM_t8_p8 115 /* 0x073 */
258
259#define NANYOFM 29 /* 0x1d complement of ANYOFM */
260#define NANYOFM_tb_pb 116 /* 0x074 */
261#define NANYOFM_tb_p8 117 /* 0x075 */
262#define NANYOFM_t8_pb 118 /* 0x076 */
263#define NANYOFM_t8_p8 119 /* 0x077 */
264
265#define POSIXD 30 /* 0x1e Some [[:class:]] under /d;
266 the FLAGS field gives which one
267 */
268#define POSIXD_tb_pb 120 /* 0x078 */
269#define POSIXD_tb_p8 121 /* 0x079 */
270#define POSIXD_t8_pb 122 /* 0x07a */
271#define POSIXD_t8_p8 123 /* 0x07b */
272
273#define POSIXL 31 /* 0x1f Some [[:class:]] under /l;
274 the FLAGS field gives which one
275 */
276#define POSIXL_tb_pb 124 /* 0x07c */
277#define POSIXL_tb_p8 125 /* 0x07d */
278#define POSIXL_t8_pb 126 /* 0x07e */
279#define POSIXL_t8_p8 127 /* 0x07f */
280
281#define POSIXU 32 /* 0x20 Some [[:class:]] under /u;
282 the FLAGS field gives which one
283 */
284#define POSIXU_tb_pb 128 /* 0x080 */
285#define POSIXU_tb_p8 129 /* 0x081 */
286#define POSIXU_t8_pb 130 /* 0x082 */
287#define POSIXU_t8_p8 131 /* 0x083 */
288
289#define POSIXA 33 /* 0x21 Some [[:class:]] under /a;
290 the FLAGS field gives which one
291 */
292#define POSIXA_tb_pb 132 /* 0x084 */
293#define POSIXA_tb_p8 133 /* 0x085 */
294#define POSIXA_t8_pb 134 /* 0x086 */
295#define POSIXA_t8_p8 135 /* 0x087 */
296
297#define NPOSIXD 34 /* 0x22 complement of POSIXD,
298 [[:^class:]] */
299#define NPOSIXD_tb_pb 136 /* 0x088 */
300#define NPOSIXD_tb_p8 137 /* 0x089 */
301#define NPOSIXD_t8_pb 138 /* 0x08a */
302#define NPOSIXD_t8_p8 139 /* 0x08b */
303
304#define NPOSIXL 35 /* 0x23 complement of POSIXL,
305 [[:^class:]] */
306#define NPOSIXL_tb_pb 140 /* 0x08c */
307#define NPOSIXL_tb_p8 141 /* 0x08d */
308#define NPOSIXL_t8_pb 142 /* 0x08e */
309#define NPOSIXL_t8_p8 143 /* 0x08f */
310
311#define NPOSIXU 36 /* 0x24 complement of POSIXU,
312 [[:^class:]] */
313#define NPOSIXU_tb_pb 144 /* 0x090 */
314#define NPOSIXU_tb_p8 145 /* 0x091 */
315#define NPOSIXU_t8_pb 146 /* 0x092 */
316#define NPOSIXU_t8_p8 147 /* 0x093 */
317
318#define NPOSIXA 37 /* 0x25 complement of POSIXA,
319 [[:^class:]] */
320#define NPOSIXA_tb_pb 148 /* 0x094 */
321#define NPOSIXA_tb_p8 149 /* 0x095 */
322#define NPOSIXA_t8_pb 150 /* 0x096 */
323#define NPOSIXA_t8_p8 151 /* 0x097 */
324
325#define CLUMP 38 /* 0x26 Match any extended grapheme
326 cluster sequence */
327#define CLUMP_tb_pb 152 /* 0x098 */
328#define CLUMP_tb_p8 153 /* 0x099 */
329#define CLUMP_t8_pb 154 /* 0x09a */
330#define CLUMP_t8_p8 155 /* 0x09b */
331
332#define BRANCH 39 /* 0x27 Match this alternative, or
333 the next... */
334#define BRANCH_tb_pb 156 /* 0x09c */
335#define BRANCH_tb_p8 157 /* 0x09d */
336#define BRANCH_t8_pb 158 /* 0x09e */
337#define BRANCH_t8_p8 159 /* 0x09f */
338
339#define EXACT 40 /* 0x28 Match this string (flags
340 field is the length). */
341#define EXACT_tb_pb 160 /* 0x0a0 */
342#define EXACT_tb_p8 161 /* 0x0a1 */
343#define EXACT_t8_pb 162 /* 0x0a2 */
344#define EXACT_t8_p8 163 /* 0x0a3 */
345
346#define LEXACT 41 /* 0x29 Match this long string
347 (preceded by length; flags
348 unused). */
349#define LEXACT_tb_pb 164 /* 0x0a4 */
350#define LEXACT_tb_p8 165 /* 0x0a5 */
351#define LEXACT_t8_pb 166 /* 0x0a6 */
352#define LEXACT_t8_p8 167 /* 0x0a7 */
353
354#define EXACTL 42 /* 0x2a Like EXACT, but /l is in
355 effect (used so locale-related
356 warnings can be checked for) */
357#define EXACTL_tb_pb 168 /* 0x0a8 */
358#define EXACTL_tb_p8 169 /* 0x0a9 */
359#define EXACTL_t8_pb 170 /* 0x0aa */
360#define EXACTL_t8_p8 171 /* 0x0ab */
361
362#define EXACTF 43 /* 0x2b Like EXACT, but match using
363 /id rules; (string not UTF-8,
364 ASCII folded; non-ASCII not) */
365#define EXACTF_tb_pb 172 /* 0x0ac */
366#define EXACTF_tb_p8 173 /* 0x0ad */
367#define EXACTF_t8_pb 174 /* 0x0ae */
368#define EXACTF_t8_p8 175 /* 0x0af */
369
370#define EXACTFL 44 /* 0x2c Like EXACT, but match using
371 /il rules; (string not likely to
372 be folded) */
373#define EXACTFL_tb_pb 176 /* 0x0b0 */
374#define EXACTFL_tb_p8 177 /* 0x0b1 */
375#define EXACTFL_t8_pb 178 /* 0x0b2 */
376#define EXACTFL_t8_p8 179 /* 0x0b3 */
377
378#define EXACTFU 45 /* 0x2d Like EXACT, but match using
379 /iu rules; (string folded) */
380#define EXACTFU_tb_pb 180 /* 0x0b4 */
381#define EXACTFU_tb_p8 181 /* 0x0b5 */
382#define EXACTFU_t8_pb 182 /* 0x0b6 */
383#define EXACTFU_t8_p8 183 /* 0x0b7 */
384
385#define EXACTFAA 46 /* 0x2e Like EXACT, but match using
386 /iaa rules; (string folded
5f162c35
KW
387 except MICRO in non-UTF8
388 patterns; doesn't contain SHARP
389 S unless UTF-8; folded length <=
ce553cf5
KW
390 unfolded) */
391#define EXACTFAA_tb_pb 184 /* 0x0b8 */
392#define EXACTFAA_tb_p8 185 /* 0x0b9 */
393#define EXACTFAA_t8_pb 186 /* 0x0ba */
394#define EXACTFAA_t8_p8 187 /* 0x0bb */
395
f97d9711
KW
396#define EXACTFAA_NO_TRIE 47 /* 0x2f Like EXACTFAA, (string not
397 UTF-8, folded except: MICRO,
398 SHARP S; folded length <=
399 unfolded, not currently
400 trie-able) */
401#define EXACTFAA_NO_TRIE_tb_pb 188 /* 0x0bc */
402#define EXACTFAA_NO_TRIE_tb_p8 189 /* 0x0bd */
403#define EXACTFAA_NO_TRIE_t8_pb 190 /* 0x0be */
404#define EXACTFAA_NO_TRIE_t8_p8 191 /* 0x0bf */
405
406#define EXACTFUP 48 /* 0x30 Like EXACT, but match using
ce553cf5 407 /iu rules; (string not UTF-8,
5f162c35
KW
408 folded except MICRO: hence
409 Problematic) */
f97d9711
KW
410#define EXACTFUP_tb_pb 192 /* 0x0c0 */
411#define EXACTFUP_tb_p8 193 /* 0x0c1 */
412#define EXACTFUP_t8_pb 194 /* 0x0c2 */
413#define EXACTFUP_t8_p8 195 /* 0x0c3 */
ce553cf5 414
f97d9711 415#define EXACTFLU8 49 /* 0x31 Like EXACTFU, but use /il,
ce553cf5
KW
416 UTF-8, (string is folded, and
417 everything in it is above 255 */
f97d9711
KW
418#define EXACTFLU8_tb_pb 196 /* 0x0c4 */
419#define EXACTFLU8_tb_p8 197 /* 0x0c5 */
420#define EXACTFLU8_t8_pb 198 /* 0x0c6 */
421#define EXACTFLU8_t8_p8 199 /* 0x0c7 */
ce553cf5
KW
422
423#define EXACT_REQ8 50 /* 0x32 Like EXACT, but only UTF-8
424 encoded targets can match */
425#define EXACT_REQ8_tb_pb 200 /* 0x0c8 */
426#define EXACT_REQ8_tb_p8 201 /* 0x0c9 */
427#define EXACT_REQ8_t8_pb 202 /* 0x0ca */
428#define EXACT_REQ8_t8_p8 203 /* 0x0cb */
429
430#define LEXACT_REQ8 51 /* 0x33 Like LEXACT, but only UTF-8
431 encoded targets can match */
432#define LEXACT_REQ8_tb_pb 204 /* 0x0cc */
433#define LEXACT_REQ8_tb_p8 205 /* 0x0cd */
434#define LEXACT_REQ8_t8_pb 206 /* 0x0ce */
435#define LEXACT_REQ8_t8_p8 207 /* 0x0cf */
436
437#define EXACTFU_REQ8 52 /* 0x34 Like EXACTFU, but only
438 UTF-8 encoded targets can match
439 */
440#define EXACTFU_REQ8_tb_pb 208 /* 0x0d0 */
441#define EXACTFU_REQ8_tb_p8 209 /* 0x0d1 */
442#define EXACTFU_REQ8_t8_pb 210 /* 0x0d2 */
443#define EXACTFU_REQ8_t8_p8 211 /* 0x0d3 */
444
445#define EXACTFU_S_EDGE 53 /* 0x35 /di rules, but nothing in
446 it precludes /ui, except begins
447 and/or ends with [Ss]; (string
448 not UTF-8; compile-time only) */
449#define EXACTFU_S_EDGE_tb_pb 212 /* 0x0d4 */
450#define EXACTFU_S_EDGE_tb_p8 213 /* 0x0d5 */
451#define EXACTFU_S_EDGE_t8_pb 214 /* 0x0d6 */
452#define EXACTFU_S_EDGE_t8_p8 215 /* 0x0d7 */
453
454#define LNBREAK 54 /* 0x36 generic newline pattern */
455#define LNBREAK_tb_pb 216 /* 0x0d8 */
456#define LNBREAK_tb_p8 217 /* 0x0d9 */
457#define LNBREAK_t8_pb 218 /* 0x0da */
458#define LNBREAK_t8_p8 219 /* 0x0db */
459
460#define TRIE 55 /* 0x37 Match many EXACT(F[ALU]?)?
461 at once. flags==type */
462#define TRIE_tb_pb 220 /* 0x0dc */
463#define TRIE_tb_p8 221 /* 0x0dd */
464#define TRIE_t8_pb 222 /* 0x0de */
465#define TRIE_t8_p8 223 /* 0x0df */
466
467#define TRIEC 56 /* 0x38 Same as TRIE, but with
468 embedded charclass data */
469#define TRIEC_tb_pb 224 /* 0x0e0 */
470#define TRIEC_tb_p8 225 /* 0x0e1 */
471#define TRIEC_t8_pb 226 /* 0x0e2 */
472#define TRIEC_t8_p8 227 /* 0x0e3 */
473
474#define AHOCORASICK 57 /* 0x39 Aho Corasick stclass.
475 flags==type */
476#define AHOCORASICK_tb_pb 228 /* 0x0e4 */
477#define AHOCORASICK_tb_p8 229 /* 0x0e5 */
478#define AHOCORASICK_t8_pb 230 /* 0x0e6 */
479#define AHOCORASICK_t8_p8 231 /* 0x0e7 */
480
481#define AHOCORASICKC 58 /* 0x3a Same as AHOCORASICK, but
482 with embedded charclass data */
483#define AHOCORASICKC_tb_pb 232 /* 0x0e8 */
484#define AHOCORASICKC_tb_p8 233 /* 0x0e9 */
485#define AHOCORASICKC_t8_pb 234 /* 0x0ea */
486#define AHOCORASICKC_t8_p8 235 /* 0x0eb */
487
488#define NOTHING 59 /* 0x3b Match empty string. */
489#define NOTHING_tb_pb 236 /* 0x0ec */
490#define NOTHING_tb_p8 237 /* 0x0ed */
491#define NOTHING_t8_pb 238 /* 0x0ee */
492#define NOTHING_t8_p8 239 /* 0x0ef */
493
494#define TAIL 60 /* 0x3c Match empty string. Can
495 jump here from outside. */
496#define TAIL_tb_pb 240 /* 0x0f0 */
497#define TAIL_tb_p8 241 /* 0x0f1 */
498#define TAIL_t8_pb 242 /* 0x0f2 */
499#define TAIL_t8_p8 243 /* 0x0f3 */
500
501#define STAR 61 /* 0x3d Match this (simple) thing 0
502 or more times. */
503#define STAR_tb_pb 244 /* 0x0f4 */
504#define STAR_tb_p8 245 /* 0x0f5 */
505#define STAR_t8_pb 246 /* 0x0f6 */
506#define STAR_t8_p8 247 /* 0x0f7 */
507
508#define PLUS 62 /* 0x3e Match this (simple) thing 1
509 or more times. */
510#define PLUS_tb_pb 248 /* 0x0f8 */
511#define PLUS_tb_p8 249 /* 0x0f9 */
512#define PLUS_t8_pb 250 /* 0x0fa */
513#define PLUS_t8_p8 251 /* 0x0fb */
514
515#define CURLY 63 /* 0x3f Match this simple thing
516 {n,m} times. */
517#define CURLY_tb_pb 252 /* 0x0fc */
518#define CURLY_tb_p8 253 /* 0x0fd */
519#define CURLY_t8_pb 254 /* 0x0fe */
520#define CURLY_t8_p8 255 /* 0x0ff */
521
522#define CURLYN 64 /* 0x40 Capture next-after-this
523 simple thing */
524#define CURLYN_tb_pb 256 /* 0x100 */
525#define CURLYN_tb_p8 257 /* 0x101 */
526#define CURLYN_t8_pb 258 /* 0x102 */
527#define CURLYN_t8_p8 259 /* 0x103 */
528
529#define CURLYM 65 /* 0x41 Capture this medium-complex
530 thing {n,m} times. */
531#define CURLYM_tb_pb 260 /* 0x104 */
532#define CURLYM_tb_p8 261 /* 0x105 */
533#define CURLYM_t8_pb 262 /* 0x106 */
534#define CURLYM_t8_p8 263 /* 0x107 */
535
536#define CURLYX 66 /* 0x42 Match this complex thing
537 {n,m} times. */
538#define CURLYX_tb_pb 264 /* 0x108 */
539#define CURLYX_tb_p8 265 /* 0x109 */
540#define CURLYX_t8_pb 266 /* 0x10a */
541#define CURLYX_t8_p8 267 /* 0x10b */
542
543#define WHILEM 67 /* 0x43 Do curly processing and see
544 if rest matches. */
545#define WHILEM_tb_pb 268 /* 0x10c */
546#define WHILEM_tb_p8 269 /* 0x10d */
547#define WHILEM_t8_pb 270 /* 0x10e */
548#define WHILEM_t8_p8 271 /* 0x10f */
549
550#define OPEN 68 /* 0x44 Mark this point in input as
551 start of #n. */
552#define OPEN_tb_pb 272 /* 0x110 */
553#define OPEN_tb_p8 273 /* 0x111 */
554#define OPEN_t8_pb 274 /* 0x112 */
555#define OPEN_t8_p8 275 /* 0x113 */
556
557#define CLOSE 69 /* 0x45 Close corresponding OPEN of
558 #n. */
559#define CLOSE_tb_pb 276 /* 0x114 */
560#define CLOSE_tb_p8 277 /* 0x115 */
561#define CLOSE_t8_pb 278 /* 0x116 */
562#define CLOSE_t8_p8 279 /* 0x117 */
563
564#define SROPEN 70 /* 0x46 Same as OPEN, but for
565 script run */
566#define SROPEN_tb_pb 280 /* 0x118 */
567#define SROPEN_tb_p8 281 /* 0x119 */
568#define SROPEN_t8_pb 282 /* 0x11a */
569#define SROPEN_t8_p8 283 /* 0x11b */
570
571#define SRCLOSE 71 /* 0x47 Close preceding SROPEN */
572#define SRCLOSE_tb_pb 284 /* 0x11c */
573#define SRCLOSE_tb_p8 285 /* 0x11d */
574#define SRCLOSE_t8_pb 286 /* 0x11e */
575#define SRCLOSE_t8_p8 287 /* 0x11f */
576
577#define REF 72 /* 0x48 Match some already matched
578 string */
579#define REF_tb_pb 288 /* 0x120 */
580#define REF_tb_p8 289 /* 0x121 */
581#define REF_t8_pb 290 /* 0x122 */
582#define REF_t8_p8 291 /* 0x123 */
583
584#define REFF 73 /* 0x49 Match already matched
585 string, using /di rules. */
586#define REFF_tb_pb 292 /* 0x124 */
587#define REFF_tb_p8 293 /* 0x125 */
588#define REFF_t8_pb 294 /* 0x126 */
589#define REFF_t8_p8 295 /* 0x127 */
590
591#define REFFL 74 /* 0x4a Match already matched
592 string, using /li rules. */
593#define REFFL_tb_pb 296 /* 0x128 */
594#define REFFL_tb_p8 297 /* 0x129 */
595#define REFFL_t8_pb 298 /* 0x12a */
596#define REFFL_t8_p8 299 /* 0x12b */
597
598#define REFFU 75 /* 0x4b Match already matched
599 string, usng /ui. */
600#define REFFU_tb_pb 300 /* 0x12c */
601#define REFFU_tb_p8 301 /* 0x12d */
602#define REFFU_t8_pb 302 /* 0x12e */
603#define REFFU_t8_p8 303 /* 0x12f */
604
605#define REFFA 76 /* 0x4c Match already matched
606 string, using /aai rules. */
607#define REFFA_tb_pb 304 /* 0x130 */
608#define REFFA_tb_p8 305 /* 0x131 */
609#define REFFA_t8_pb 306 /* 0x132 */
610#define REFFA_t8_p8 307 /* 0x133 */
611
612#define REFN 77 /* 0x4d Match some already matched
613 string */
614#define REFN_tb_pb 308 /* 0x134 */
615#define REFN_tb_p8 309 /* 0x135 */
616#define REFN_t8_pb 310 /* 0x136 */
617#define REFN_t8_p8 311 /* 0x137 */
618
619#define REFFN 78 /* 0x4e Match already matched
620 string, using /di rules. */
621#define REFFN_tb_pb 312 /* 0x138 */
622#define REFFN_tb_p8 313 /* 0x139 */
623#define REFFN_t8_pb 314 /* 0x13a */
624#define REFFN_t8_p8 315 /* 0x13b */
625
626#define REFFLN 79 /* 0x4f Match already matched
627 string, using /li rules. */
628#define REFFLN_tb_pb 316 /* 0x13c */
629#define REFFLN_tb_p8 317 /* 0x13d */
630#define REFFLN_t8_pb 318 /* 0x13e */
631#define REFFLN_t8_p8 319 /* 0x13f */
632
633#define REFFUN 80 /* 0x50 Match already matched
634 string, using /ui rules. */
635#define REFFUN_tb_pb 320 /* 0x140 */
636#define REFFUN_tb_p8 321 /* 0x141 */
637#define REFFUN_t8_pb 322 /* 0x142 */
638#define REFFUN_t8_p8 323 /* 0x143 */
639
640#define REFFAN 81 /* 0x51 Match already matched
641 string, using /aai rules. */
642#define REFFAN_tb_pb 324 /* 0x144 */
643#define REFFAN_tb_p8 325 /* 0x145 */
644#define REFFAN_t8_pb 326 /* 0x146 */
645#define REFFAN_t8_p8 327 /* 0x147 */
646
647#define LONGJMP 82 /* 0x52 Jump far away. */
648#define LONGJMP_tb_pb 328 /* 0x148 */
649#define LONGJMP_tb_p8 329 /* 0x149 */
650#define LONGJMP_t8_pb 330 /* 0x14a */
651#define LONGJMP_t8_p8 331 /* 0x14b */
652
653#define BRANCHJ 83 /* 0x53 BRANCH with long offset. */
654#define BRANCHJ_tb_pb 332 /* 0x14c */
655#define BRANCHJ_tb_p8 333 /* 0x14d */
656#define BRANCHJ_t8_pb 334 /* 0x14e */
657#define BRANCHJ_t8_p8 335 /* 0x14f */
658
659#define IFMATCH 84 /* 0x54 Succeeds if the following
660 matches; non-zero flags "f",
661 next_off "o" means lookbehind
662 assertion starting "f..(f-o)"
663 characters before current */
664#define IFMATCH_tb_pb 336 /* 0x150 */
665#define IFMATCH_tb_p8 337 /* 0x151 */
666#define IFMATCH_t8_pb 338 /* 0x152 */
667#define IFMATCH_t8_p8 339 /* 0x153 */
668
669#define UNLESSM 85 /* 0x55 Fails if the following
670 matches; non-zero flags "f",
671 next_off "o" means lookbehind
672 assertion starting "f..(f-o)"
673 characters before current */
674#define UNLESSM_tb_pb 340 /* 0x154 */
675#define UNLESSM_tb_p8 341 /* 0x155 */
676#define UNLESSM_t8_pb 342 /* 0x156 */
677#define UNLESSM_t8_p8 343 /* 0x157 */
678
679#define SUSPEND 86 /* 0x56 "Independent" sub-RE. */
680#define SUSPEND_tb_pb 344 /* 0x158 */
681#define SUSPEND_tb_p8 345 /* 0x159 */
682#define SUSPEND_t8_pb 346 /* 0x15a */
683#define SUSPEND_t8_p8 347 /* 0x15b */
684
685#define IFTHEN 87 /* 0x57 Switch, should be preceded
686 by switcher. */
687#define IFTHEN_tb_pb 348 /* 0x15c */
688#define IFTHEN_tb_p8 349 /* 0x15d */
689#define IFTHEN_t8_pb 350 /* 0x15e */
690#define IFTHEN_t8_p8 351 /* 0x15f */
691
692#define GROUPP 88 /* 0x58 Whether the group matched.
693 */
694#define GROUPP_tb_pb 352 /* 0x160 */
695#define GROUPP_tb_p8 353 /* 0x161 */
696#define GROUPP_t8_pb 354 /* 0x162 */
697#define GROUPP_t8_p8 355 /* 0x163 */
698
699#define EVAL 89 /* 0x59 Execute some Perl code. */
700#define EVAL_tb_pb 356 /* 0x164 */
701#define EVAL_tb_p8 357 /* 0x165 */
702#define EVAL_t8_pb 358 /* 0x166 */
703#define EVAL_t8_p8 359 /* 0x167 */
704
705#define MINMOD 90 /* 0x5a Next operator is not
706 greedy. */
707#define MINMOD_tb_pb 360 /* 0x168 */
708#define MINMOD_tb_p8 361 /* 0x169 */
709#define MINMOD_t8_pb 362 /* 0x16a */
710#define MINMOD_t8_p8 363 /* 0x16b */
711
712#define LOGICAL 91 /* 0x5b Next opcode should set the
713 flag only. */
714#define LOGICAL_tb_pb 364 /* 0x16c */
715#define LOGICAL_tb_p8 365 /* 0x16d */
716#define LOGICAL_t8_pb 366 /* 0x16e */
717#define LOGICAL_t8_p8 367 /* 0x16f */
718
719#define RENUM 92 /* 0x5c Group with independently
720 numbered parens. */
721#define RENUM_tb_pb 368 /* 0x170 */
722#define RENUM_tb_p8 369 /* 0x171 */
723#define RENUM_t8_pb 370 /* 0x172 */
724#define RENUM_t8_p8 371 /* 0x173 */
725
726#define GOSUB 93 /* 0x5d recurse to paren arg1 at
727 (signed) ofs arg2 */
728#define GOSUB_tb_pb 372 /* 0x174 */
729#define GOSUB_tb_p8 373 /* 0x175 */
730#define GOSUB_t8_pb 374 /* 0x176 */
731#define GOSUB_t8_p8 375 /* 0x177 */
732
733#define GROUPPN 94 /* 0x5e Whether the group matched.
734 */
735#define GROUPPN_tb_pb 376 /* 0x178 */
736#define GROUPPN_tb_p8 377 /* 0x179 */
737#define GROUPPN_t8_pb 378 /* 0x17a */
738#define GROUPPN_t8_p8 379 /* 0x17b */
739
740#define INSUBP 95 /* 0x5f Whether we are in a
741 specific recurse. */
742#define INSUBP_tb_pb 380 /* 0x17c */
743#define INSUBP_tb_p8 381 /* 0x17d */
744#define INSUBP_t8_pb 382 /* 0x17e */
745#define INSUBP_t8_p8 383 /* 0x17f */
746
747#define DEFINEP 96 /* 0x60 Never execute directly. */
748#define DEFINEP_tb_pb 384 /* 0x180 */
749#define DEFINEP_tb_p8 385 /* 0x181 */
750#define DEFINEP_t8_pb 386 /* 0x182 */
751#define DEFINEP_t8_p8 387 /* 0x183 */
752
753#define ENDLIKE 97 /* 0x61 Used only for the type
754 field of verbs */
755#define ENDLIKE_tb_pb 388 /* 0x184 */
756#define ENDLIKE_tb_p8 389 /* 0x185 */
757#define ENDLIKE_t8_pb 390 /* 0x186 */
758#define ENDLIKE_t8_p8 391 /* 0x187 */
759
760#define OPFAIL 98 /* 0x62 Same as (?!), but with verb
761 arg */
762#define OPFAIL_tb_pb 392 /* 0x188 */
763#define OPFAIL_tb_p8 393 /* 0x189 */
764#define OPFAIL_t8_pb 394 /* 0x18a */
765#define OPFAIL_t8_p8 395 /* 0x18b */
766
767#define ACCEPT 99 /* 0x63 Accepts the current matched
768 string, with verbar */
769#define ACCEPT_tb_pb 396 /* 0x18c */
770#define ACCEPT_tb_p8 397 /* 0x18d */
771#define ACCEPT_t8_pb 398 /* 0x18e */
772#define ACCEPT_t8_p8 399 /* 0x18f */
773
774#define VERB 100 /* 0x64 Used only for the type
775 field of verbs */
776#define VERB_tb_pb 400 /* 0x190 */
777#define VERB_tb_p8 401 /* 0x191 */
778#define VERB_t8_pb 402 /* 0x192 */
779#define VERB_t8_p8 403 /* 0x193 */
780
781#define PRUNE 101 /* 0x65 Pattern fails at this
782 startpoint if no-backtracking
783 through this */
784#define PRUNE_tb_pb 404 /* 0x194 */
785#define PRUNE_tb_p8 405 /* 0x195 */
786#define PRUNE_t8_pb 406 /* 0x196 */
787#define PRUNE_t8_p8 407 /* 0x197 */
788
789#define MARKPOINT 102 /* 0x66 Push the current location
790 for rollback by cut. */
791#define MARKPOINT_tb_pb 408 /* 0x198 */
792#define MARKPOINT_tb_p8 409 /* 0x199 */
793#define MARKPOINT_t8_pb 410 /* 0x19a */
794#define MARKPOINT_t8_p8 411 /* 0x19b */
795
796#define SKIP 103 /* 0x67 On failure skip forward (to
797 the mark) before retrying */
798#define SKIP_tb_pb 412 /* 0x19c */
799#define SKIP_tb_p8 413 /* 0x19d */
800#define SKIP_t8_pb 414 /* 0x19e */
801#define SKIP_t8_p8 415 /* 0x19f */
802
803#define COMMIT 104 /* 0x68 Pattern fails outright if
804 backtracking through this */
805#define COMMIT_tb_pb 416 /* 0x1a0 */
806#define COMMIT_tb_p8 417 /* 0x1a1 */
807#define COMMIT_t8_pb 418 /* 0x1a2 */
808#define COMMIT_t8_p8 419 /* 0x1a3 */
809
810#define CUTGROUP 105 /* 0x69 On failure go to the next
811 alternation in the group */
812#define CUTGROUP_tb_pb 420 /* 0x1a4 */
813#define CUTGROUP_tb_p8 421 /* 0x1a5 */
814#define CUTGROUP_t8_pb 422 /* 0x1a6 */
815#define CUTGROUP_t8_p8 423 /* 0x1a7 */
816
817#define KEEPS 106 /* 0x6a $& begins here. */
818#define KEEPS_tb_pb 424 /* 0x1a8 */
819#define KEEPS_tb_p8 425 /* 0x1a9 */
820#define KEEPS_t8_pb 426 /* 0x1aa */
821#define KEEPS_t8_p8 427 /* 0x1ab */
822
823#define OPTIMIZED 107 /* 0x6b Placeholder for dump. */
824#define OPTIMIZED_tb_pb 428 /* 0x1ac */
825#define OPTIMIZED_tb_p8 429 /* 0x1ad */
826#define OPTIMIZED_t8_pb 430 /* 0x1ae */
827#define OPTIMIZED_t8_p8 431 /* 0x1af */
828
829#define PSEUDO 108 /* 0x6c Pseudo opcode for internal
830 use. */
831#define PSEUDO_tb_pb 432 /* 0x1b0 */
832#define PSEUDO_tb_p8 433 /* 0x1b1 */
833#define PSEUDO_t8_pb 434 /* 0x1b2 */
834#define PSEUDO_t8_p8 435 /* 0x1b3 */
835
836#define REGEX_SET 109 /* 0x6d Regex set, temporary node
837 used in pre-optimization
838 compilation */
839#define REGEX_SET_tb_pb 436 /* 0x1b4 */
840#define REGEX_SET_tb_p8 437 /* 0x1b5 */
841#define REGEX_SET_t8_pb 438 /* 0x1b6 */
842#define REGEX_SET_t8_p8 439 /* 0x1b7 */
843
03363afd 844 /* ------------ States ------------- */
ce553cf5
KW
845#define TRIE_next 110 /* 0x6e state for TRIE */
846#define TRIE_next_tb_pb 440 /* 0x1b8 */
847#define TRIE_next_tb_p8 441 /* 0x1b9 */
848#define TRIE_next_t8_pb 442 /* 0x1ba */
849#define TRIE_next_t8_p8 443 /* 0x1bb */
850
851#define TRIE_next_fail 111 /* 0x6f state for TRIE */
852#define TRIE_next_fail_tb_pb 444 /* 0x1bc */
853#define TRIE_next_fail_tb_p8 445 /* 0x1bd */
854#define TRIE_next_fail_t8_pb 446 /* 0x1be */
855#define TRIE_next_fail_t8_p8 447 /* 0x1bf */
856
857#define EVAL_B 112 /* 0x70 state for EVAL */
858#define EVAL_B_tb_pb 448 /* 0x1c0 */
859#define EVAL_B_tb_p8 449 /* 0x1c1 */
860#define EVAL_B_t8_pb 450 /* 0x1c2 */
861#define EVAL_B_t8_p8 451 /* 0x1c3 */
862
863#define EVAL_B_fail 113 /* 0x71 state for EVAL */
864#define EVAL_B_fail_tb_pb 452 /* 0x1c4 */
865#define EVAL_B_fail_tb_p8 453 /* 0x1c5 */
866#define EVAL_B_fail_t8_pb 454 /* 0x1c6 */
867#define EVAL_B_fail_t8_p8 455 /* 0x1c7 */
868
869#define EVAL_postponed_AB 114 /* 0x72 state for EVAL */
870#define EVAL_postponed_AB_tb_pb 456 /* 0x1c8 */
871#define EVAL_postponed_AB_tb_p8 457 /* 0x1c9 */
872#define EVAL_postponed_AB_t8_pb 458 /* 0x1ca */
873#define EVAL_postponed_AB_t8_p8 459 /* 0x1cb */
874
875#define EVAL_postponed_AB_fail 115 /* 0x73 state for EVAL */
876#define EVAL_postponed_AB_fail_tb_pb 460 /* 0x1cc */
877#define EVAL_postponed_AB_fail_tb_p8 461 /* 0x1cd */
878#define EVAL_postponed_AB_fail_t8_pb 462 /* 0x1ce */
879#define EVAL_postponed_AB_fail_t8_p8 463 /* 0x1cf */
880
881#define CURLYX_end 116 /* 0x74 state for CURLYX */
882#define CURLYX_end_tb_pb 464 /* 0x1d0 */
883#define CURLYX_end_tb_p8 465 /* 0x1d1 */
884#define CURLYX_end_t8_pb 466 /* 0x1d2 */
885#define CURLYX_end_t8_p8 467 /* 0x1d3 */
886
887#define CURLYX_end_fail 117 /* 0x75 state for CURLYX */
888#define CURLYX_end_fail_tb_pb 468 /* 0x1d4 */
889#define CURLYX_end_fail_tb_p8 469 /* 0x1d5 */
890#define CURLYX_end_fail_t8_pb 470 /* 0x1d6 */
891#define CURLYX_end_fail_t8_p8 471 /* 0x1d7 */
892
893#define WHILEM_A_pre 118 /* 0x76 state for WHILEM */
894#define WHILEM_A_pre_tb_pb 472 /* 0x1d8 */
895#define WHILEM_A_pre_tb_p8 473 /* 0x1d9 */
896#define WHILEM_A_pre_t8_pb 474 /* 0x1da */
897#define WHILEM_A_pre_t8_p8 475 /* 0x1db */
898
899#define WHILEM_A_pre_fail 119 /* 0x77 state for WHILEM */
900#define WHILEM_A_pre_fail_tb_pb 476 /* 0x1dc */
901#define WHILEM_A_pre_fail_tb_p8 477 /* 0x1dd */
902#define WHILEM_A_pre_fail_t8_pb 478 /* 0x1de */
903#define WHILEM_A_pre_fail_t8_p8 479 /* 0x1df */
904
905#define WHILEM_A_min 120 /* 0x78 state for WHILEM */
906#define WHILEM_A_min_tb_pb 480 /* 0x1e0 */
907#define WHILEM_A_min_tb_p8 481 /* 0x1e1 */
908#define WHILEM_A_min_t8_pb 482 /* 0x1e2 */
909#define WHILEM_A_min_t8_p8 483 /* 0x1e3 */
910
911#define WHILEM_A_min_fail 121 /* 0x79 state for WHILEM */
912#define WHILEM_A_min_fail_tb_pb 484 /* 0x1e4 */
913#define WHILEM_A_min_fail_tb_p8 485 /* 0x1e5 */
914#define WHILEM_A_min_fail_t8_pb 486 /* 0x1e6 */
915#define WHILEM_A_min_fail_t8_p8 487 /* 0x1e7 */
916
917#define WHILEM_A_max 122 /* 0x7a state for WHILEM */
918#define WHILEM_A_max_tb_pb 488 /* 0x1e8 */
919#define WHILEM_A_max_tb_p8 489 /* 0x1e9 */
920#define WHILEM_A_max_t8_pb 490 /* 0x1ea */
921#define WHILEM_A_max_t8_p8 491 /* 0x1eb */
922
923#define WHILEM_A_max_fail 123 /* 0x7b state for WHILEM */
924#define WHILEM_A_max_fail_tb_pb 492 /* 0x1ec */
925#define WHILEM_A_max_fail_tb_p8 493 /* 0x1ed */
926#define WHILEM_A_max_fail_t8_pb 494 /* 0x1ee */
927#define WHILEM_A_max_fail_t8_p8 495 /* 0x1ef */
928
929#define WHILEM_B_min 124 /* 0x7c state for WHILEM */
930#define WHILEM_B_min_tb_pb 496 /* 0x1f0 */
931#define WHILEM_B_min_tb_p8 497 /* 0x1f1 */
932#define WHILEM_B_min_t8_pb 498 /* 0x1f2 */
933#define WHILEM_B_min_t8_p8 499 /* 0x1f3 */
934
935#define WHILEM_B_min_fail 125 /* 0x7d state for WHILEM */
936#define WHILEM_B_min_fail_tb_pb 500 /* 0x1f4 */
937#define WHILEM_B_min_fail_tb_p8 501 /* 0x1f5 */
938#define WHILEM_B_min_fail_t8_pb 502 /* 0x1f6 */
939#define WHILEM_B_min_fail_t8_p8 503 /* 0x1f7 */
940
941#define WHILEM_B_max 126 /* 0x7e state for WHILEM */
942#define WHILEM_B_max_tb_pb 504 /* 0x1f8 */
943#define WHILEM_B_max_tb_p8 505 /* 0x1f9 */
944#define WHILEM_B_max_t8_pb 506 /* 0x1fa */
945#define WHILEM_B_max_t8_p8 507 /* 0x1fb */
946
947#define WHILEM_B_max_fail 127 /* 0x7f state for WHILEM */
948#define WHILEM_B_max_fail_tb_pb 508 /* 0x1fc */
949#define WHILEM_B_max_fail_tb_p8 509 /* 0x1fd */
950#define WHILEM_B_max_fail_t8_pb 510 /* 0x1fe */
951#define WHILEM_B_max_fail_t8_p8 511 /* 0x1ff */
952
953#define BRANCH_next 128 /* 0x80 state for BRANCH */
954#define BRANCH_next_tb_pb 512 /* 0x200 */
955#define BRANCH_next_tb_p8 513 /* 0x201 */
956#define BRANCH_next_t8_pb 514 /* 0x202 */
957#define BRANCH_next_t8_p8 515 /* 0x203 */
958
959#define BRANCH_next_fail 129 /* 0x81 state for BRANCH */
960#define BRANCH_next_fail_tb_pb 516 /* 0x204 */
961#define BRANCH_next_fail_tb_p8 517 /* 0x205 */
962#define BRANCH_next_fail_t8_pb 518 /* 0x206 */
963#define BRANCH_next_fail_t8_p8 519 /* 0x207 */
964
965#define CURLYM_A 130 /* 0x82 state for CURLYM */
966#define CURLYM_A_tb_pb 520 /* 0x208 */
967#define CURLYM_A_tb_p8 521 /* 0x209 */
968#define CURLYM_A_t8_pb 522 /* 0x20a */
969#define CURLYM_A_t8_p8 523 /* 0x20b */
970
971#define CURLYM_A_fail 131 /* 0x83 state for CURLYM */
972#define CURLYM_A_fail_tb_pb 524 /* 0x20c */
973#define CURLYM_A_fail_tb_p8 525 /* 0x20d */
974#define CURLYM_A_fail_t8_pb 526 /* 0x20e */
975#define CURLYM_A_fail_t8_p8 527 /* 0x20f */
976
977#define CURLYM_B 132 /* 0x84 state for CURLYM */
978#define CURLYM_B_tb_pb 528 /* 0x210 */
979#define CURLYM_B_tb_p8 529 /* 0x211 */
980#define CURLYM_B_t8_pb 530 /* 0x212 */
981#define CURLYM_B_t8_p8 531 /* 0x213 */
982
983#define CURLYM_B_fail 133 /* 0x85 state for CURLYM */
984#define CURLYM_B_fail_tb_pb 532 /* 0x214 */
985#define CURLYM_B_fail_tb_p8 533 /* 0x215 */
986#define CURLYM_B_fail_t8_pb 534 /* 0x216 */
987#define CURLYM_B_fail_t8_p8 535 /* 0x217 */
988
989#define IFMATCH_A 134 /* 0x86 state for IFMATCH */
990#define IFMATCH_A_tb_pb 536 /* 0x218 */
991#define IFMATCH_A_tb_p8 537 /* 0x219 */
992#define IFMATCH_A_t8_pb 538 /* 0x21a */
993#define IFMATCH_A_t8_p8 539 /* 0x21b */
994
995#define IFMATCH_A_fail 135 /* 0x87 state for IFMATCH */
996#define IFMATCH_A_fail_tb_pb 540 /* 0x21c */
997#define IFMATCH_A_fail_tb_p8 541 /* 0x21d */
998#define IFMATCH_A_fail_t8_pb 542 /* 0x21e */
999#define IFMATCH_A_fail_t8_p8 543 /* 0x21f */
1000
1001#define CURLY_B_min 136 /* 0x88 state for CURLY */
1002#define CURLY_B_min_tb_pb 544 /* 0x220 */
1003#define CURLY_B_min_tb_p8 545 /* 0x221 */
1004#define CURLY_B_min_t8_pb 546 /* 0x222 */
1005#define CURLY_B_min_t8_p8 547 /* 0x223 */
1006
1007#define CURLY_B_min_fail 137 /* 0x89 state for CURLY */
1008#define CURLY_B_min_fail_tb_pb 548 /* 0x224 */
1009#define CURLY_B_min_fail_tb_p8 549 /* 0x225 */
1010#define CURLY_B_min_fail_t8_pb 550 /* 0x226 */
1011#define CURLY_B_min_fail_t8_p8 551 /* 0x227 */
1012
1013#define CURLY_B_max 138 /* 0x8a state for CURLY */
1014#define CURLY_B_max_tb_pb 552 /* 0x228 */
1015#define CURLY_B_max_tb_p8 553 /* 0x229 */
1016#define CURLY_B_max_t8_pb 554 /* 0x22a */
1017#define CURLY_B_max_t8_p8 555 /* 0x22b */
1018
1019#define CURLY_B_max_fail 139 /* 0x8b state for CURLY */
1020#define CURLY_B_max_fail_tb_pb 556 /* 0x22c */
1021#define CURLY_B_max_fail_tb_p8 557 /* 0x22d */
1022#define CURLY_B_max_fail_t8_pb 558 /* 0x22e */
1023#define CURLY_B_max_fail_t8_p8 559 /* 0x22f */
1024
1025#define COMMIT_next 140 /* 0x8c state for COMMIT */
1026#define COMMIT_next_tb_pb 560 /* 0x230 */
1027#define COMMIT_next_tb_p8 561 /* 0x231 */
1028#define COMMIT_next_t8_pb 562 /* 0x232 */
1029#define COMMIT_next_t8_p8 563 /* 0x233 */
1030
1031#define COMMIT_next_fail 141 /* 0x8d state for COMMIT */
1032#define COMMIT_next_fail_tb_pb 564 /* 0x234 */
1033#define COMMIT_next_fail_tb_p8 565 /* 0x235 */
1034#define COMMIT_next_fail_t8_pb 566 /* 0x236 */
1035#define COMMIT_next_fail_t8_p8 567 /* 0x237 */
1036
1037#define MARKPOINT_next 142 /* 0x8e state for MARKPOINT */
1038#define MARKPOINT_next_tb_pb 568 /* 0x238 */
1039#define MARKPOINT_next_tb_p8 569 /* 0x239 */
1040#define MARKPOINT_next_t8_pb 570 /* 0x23a */
1041#define MARKPOINT_next_t8_p8 571 /* 0x23b */
1042
1043#define MARKPOINT_next_fail 143 /* 0x8f state for MARKPOINT */
1044#define MARKPOINT_next_fail_tb_pb 572 /* 0x23c */
1045#define MARKPOINT_next_fail_tb_p8 573 /* 0x23d */
1046#define MARKPOINT_next_fail_t8_pb 574 /* 0x23e */
1047#define MARKPOINT_next_fail_t8_p8 575 /* 0x23f */
1048
1049#define SKIP_next 144 /* 0x90 state for SKIP */
1050#define SKIP_next_tb_pb 576 /* 0x240 */
1051#define SKIP_next_tb_p8 577 /* 0x241 */
1052#define SKIP_next_t8_pb 578 /* 0x242 */
1053#define SKIP_next_t8_p8 579 /* 0x243 */
1054
1055#define SKIP_next_fail 145 /* 0x91 state for SKIP */
1056#define SKIP_next_fail_tb_pb 580 /* 0x244 */
1057#define SKIP_next_fail_tb_p8 581 /* 0x245 */
1058#define SKIP_next_fail_t8_pb 582 /* 0x246 */
1059#define SKIP_next_fail_t8_p8 583 /* 0x247 */
1060
1061#define CUTGROUP_next 146 /* 0x92 state for CUTGROUP */
1062#define CUTGROUP_next_tb_pb 584 /* 0x248 */
1063#define CUTGROUP_next_tb_p8 585 /* 0x249 */
1064#define CUTGROUP_next_t8_pb 586 /* 0x24a */
1065#define CUTGROUP_next_t8_p8 587 /* 0x24b */
1066
1067#define CUTGROUP_next_fail 147 /* 0x93 state for CUTGROUP */
1068#define CUTGROUP_next_fail_tb_pb 588 /* 0x24c */
1069#define CUTGROUP_next_fail_tb_p8 589 /* 0x24d */
1070#define CUTGROUP_next_fail_t8_pb 590 /* 0x24e */
1071#define CUTGROUP_next_fail_t8_p8 591 /* 0x24f */
1072
1073#define KEEPS_next 148 /* 0x94 state for KEEPS */
1074#define KEEPS_next_tb_pb 592 /* 0x250 */
1075#define KEEPS_next_tb_p8 593 /* 0x251 */
1076#define KEEPS_next_t8_pb 594 /* 0x252 */
1077#define KEEPS_next_t8_p8 595 /* 0x253 */
1078
1079#define KEEPS_next_fail 149 /* 0x95 state for KEEPS */
1080#define KEEPS_next_fail_tb_pb 596 /* 0x254 */
1081#define KEEPS_next_fail_tb_p8 597 /* 0x255 */
1082#define KEEPS_next_fail_t8_pb 598 /* 0x256 */
1083#define KEEPS_next_fail_t8_p8 599 /* 0x257 */
1084
03363afd 1085
6bda09f9 1086/* PL_regkind[] What type of regop or state is this. */
d09b2d29
IZ
1087
1088#ifndef DOINIT
22c35a8c 1089EXTCONST U8 PL_regkind[];
d09b2d29 1090#else
22c35a8c 1091EXTCONST U8 PL_regkind[] = {
e2e6a0f1
YO
1092 END, /* END */
1093 END, /* SUCCEED */
e2e6a0f1 1094 BOL, /* SBOL */
d3d47aac 1095 BOL, /* MBOL */
e2e6a0f1 1096 EOL, /* SEOL */
d3d47aac
YO
1097 EOL, /* MEOL */
1098 EOL, /* EOS */
1099 GPOS, /* GPOS */
e2e6a0f1
YO
1100 BOUND, /* BOUND */
1101 BOUND, /* BOUNDL */
1e355c70 1102 BOUND, /* BOUNDU */
0c6e81eb 1103 BOUND, /* BOUNDA */
e2e6a0f1
YO
1104 NBOUND, /* NBOUND */
1105 NBOUND, /* NBOUNDL */
1e355c70 1106 NBOUND, /* NBOUNDU */
0c6e81eb 1107 NBOUND, /* NBOUNDA */
e2e6a0f1
YO
1108 REG_ANY, /* REG_ANY */
1109 REG_ANY, /* SANY */
e2e6a0f1 1110 ANYOF, /* ANYOF */
ac44c12e 1111 ANYOF, /* ANYOFD */
a4525e78 1112 ANYOF, /* ANYOFL */
3edce4f5 1113 ANYOF, /* ANYOFPOSIXL */
c316b824 1114 ANYOF, /* ANYOFH */
6966a05b 1115 ANYOF, /* ANYOFHb */
3146c00a 1116 ANYOF, /* ANYOFHr */
34924db0 1117 ANYOF, /* ANYOFHs */
13fcf652 1118 ANYOFR, /* ANYOFR */
2d5613be 1119 ANYOFR, /* ANYOFRb */
67a1b5f9 1120 ANYOFM, /* ANYOFM */
3db0bccc 1121 ANYOFM, /* NANYOFM */
3615ea58
KW
1122 POSIXD, /* POSIXD */
1123 POSIXD, /* POSIXL */
1124 POSIXD, /* POSIXU */
1125 POSIXD, /* POSIXA */
9e84774b
KW
1126 NPOSIXD, /* NPOSIXD */
1127 NPOSIXD, /* NPOSIXL */
1128 NPOSIXD, /* NPOSIXU */
1129 NPOSIXD, /* NPOSIXA */
e2e6a0f1
YO
1130 CLUMP, /* CLUMP */
1131 BRANCH, /* BRANCH */
e2e6a0f1 1132 EXACT, /* EXACT */
ae06e581 1133 EXACT, /* LEXACT */
a4525e78 1134 EXACT, /* EXACTL */
e2e6a0f1
YO
1135 EXACT, /* EXACTF */
1136 EXACT, /* EXACTFL */
01f98ec2 1137 EXACT, /* EXACTFU */
89829bb5 1138 EXACT, /* EXACTFAA */
f97d9711 1139 EXACT, /* EXACTFAA_NO_TRIE */
627a7895 1140 EXACT, /* EXACTFUP */
a4525e78 1141 EXACT, /* EXACTFLU8 */
3f2416ae
KW
1142 EXACT, /* EXACT_REQ8 */
1143 EXACT, /* LEXACT_REQ8 */
1144 EXACT, /* EXACTFU_REQ8 */
95fb0a6e 1145 EXACT, /* EXACTFU_S_EDGE */
7af55186
KW
1146 LNBREAK, /* LNBREAK */
1147 TRIE, /* TRIE */
1148 TRIE, /* TRIEC */
1149 TRIE, /* AHOCORASICK */
1150 TRIE, /* AHOCORASICKC */
e2e6a0f1
YO
1151 NOTHING, /* NOTHING */
1152 NOTHING, /* TAIL */
1153 STAR, /* STAR */
1154 PLUS, /* PLUS */
1155 CURLY, /* CURLY */
1156 CURLY, /* CURLYN */
1157 CURLY, /* CURLYM */
1158 CURLY, /* CURLYX */
1159 WHILEM, /* WHILEM */
1160 OPEN, /* OPEN */
1161 CLOSE, /* CLOSE */
07093db4
KW
1162 SROPEN, /* SROPEN */
1163 SRCLOSE, /* SRCLOSE */
e2e6a0f1
YO
1164 REF, /* REF */
1165 REF, /* REFF */
1166 REF, /* REFFL */
01f98ec2 1167 REF, /* REFFU */
781aab5c 1168 REF, /* REFFA */
016b7209
KW
1169 REF, /* REFN */
1170 REF, /* REFFN */
1171 REF, /* REFFLN */
1172 REF, /* REFFUN */
1173 REF, /* REFFAN */
d3d47aac
YO
1174 LONGJMP, /* LONGJMP */
1175 BRANCHJ, /* BRANCHJ */
e2e6a0f1
YO
1176 BRANCHJ, /* IFMATCH */
1177 BRANCHJ, /* UNLESSM */
1178 BRANCHJ, /* SUSPEND */
1179 BRANCHJ, /* IFTHEN */
1180 GROUPP, /* GROUPP */
e2e6a0f1
YO
1181 EVAL, /* EVAL */
1182 MINMOD, /* MINMOD */
1183 LOGICAL, /* LOGICAL */
1184 BRANCHJ, /* RENUM */
e2e6a0f1 1185 GOSUB, /* GOSUB */
016b7209 1186 GROUPPN, /* GROUPPN */
e2e6a0f1
YO
1187 INSUBP, /* INSUBP */
1188 DEFINEP, /* DEFINEP */
1189 ENDLIKE, /* ENDLIKE */
1190 ENDLIKE, /* OPFAIL */
1191 ENDLIKE, /* ACCEPT */
1192 VERB, /* VERB */
5d458dd8 1193 VERB, /* PRUNE */
e2e6a0f1 1194 VERB, /* MARKPOINT */
5d458dd8 1195 VERB, /* SKIP */
e2e6a0f1 1196 VERB, /* COMMIT */
5d458dd8 1197 VERB, /* CUTGROUP */
ee9b8eae 1198 KEEPS, /* KEEPS */
e2e6a0f1
YO
1199 NOTHING, /* OPTIMIZED */
1200 PSEUDO, /* PSEUDO */
86451f01 1201 REGEX_SET, /* REGEX_SET */
03363afd 1202 /* ------------ States ------------- */
e2e6a0f1
YO
1203 TRIE, /* TRIE_next */
1204 TRIE, /* TRIE_next_fail */
4ee16520
DM
1205 EVAL, /* EVAL_B */
1206 EVAL, /* EVAL_B_fail */
1207 EVAL, /* EVAL_postponed_AB */
1208 EVAL, /* EVAL_postponed_AB_fail */
e2e6a0f1
YO
1209 CURLYX, /* CURLYX_end */
1210 CURLYX, /* CURLYX_end_fail */
1211 WHILEM, /* WHILEM_A_pre */
1212 WHILEM, /* WHILEM_A_pre_fail */
1213 WHILEM, /* WHILEM_A_min */
1214 WHILEM, /* WHILEM_A_min_fail */
1215 WHILEM, /* WHILEM_A_max */
1216 WHILEM, /* WHILEM_A_max_fail */
1217 WHILEM, /* WHILEM_B_min */
1218 WHILEM, /* WHILEM_B_min_fail */
1219 WHILEM, /* WHILEM_B_max */
1220 WHILEM, /* WHILEM_B_max_fail */
1221 BRANCH, /* BRANCH_next */
1222 BRANCH, /* BRANCH_next_fail */
1223 CURLYM, /* CURLYM_A */
1224 CURLYM, /* CURLYM_A_fail */
1225 CURLYM, /* CURLYM_B */
1226 CURLYM, /* CURLYM_B_fail */
1227 IFMATCH, /* IFMATCH_A */
1228 IFMATCH, /* IFMATCH_A_fail */
e2e6a0f1
YO
1229 CURLY, /* CURLY_B_min */
1230 CURLY, /* CURLY_B_min_fail */
1231 CURLY, /* CURLY_B_max */
1232 CURLY, /* CURLY_B_max_fail */
1233 COMMIT, /* COMMIT_next */
1234 COMMIT, /* COMMIT_next_fail */
1235 MARKPOINT, /* MARKPOINT_next */
1236 MARKPOINT, /* MARKPOINT_next_fail */
5d458dd8
YO
1237 SKIP, /* SKIP_next */
1238 SKIP, /* SKIP_next_fail */
1239 CUTGROUP, /* CUTGROUP_next */
1240 CUTGROUP, /* CUTGROUP_next_fail */
ee9b8eae
YO
1241 KEEPS, /* KEEPS_next */
1242 KEEPS, /* KEEPS_next_fail */
d09b2d29
IZ
1243};
1244#endif
1245
f83e001e
YO
1246#ifdef REG_COMP_C
1247
6bda09f9 1248/* regarglen[] - How large is the argument part of the node (in regnodes) */
d09b2d29 1249
29de9391 1250static const U8 regarglen[] = {
03363afd
YO
1251 0, /* END */
1252 0, /* SUCCEED */
03363afd 1253 0, /* SBOL */
d3d47aac 1254 0, /* MBOL */
03363afd 1255 0, /* SEOL */
d3d47aac
YO
1256 0, /* MEOL */
1257 0, /* EOS */
1258 0, /* GPOS */
03363afd
YO
1259 0, /* BOUND */
1260 0, /* BOUNDL */
1e355c70 1261 0, /* BOUNDU */
0c6e81eb 1262 0, /* BOUNDA */
03363afd
YO
1263 0, /* NBOUND */
1264 0, /* NBOUNDL */
1e355c70 1265 0, /* NBOUNDU */
0c6e81eb 1266 0, /* NBOUNDA */
03363afd
YO
1267 0, /* REG_ANY */
1268 0, /* SANY */
46fc0c43
KW
1269 EXTRA_SIZE(struct regnode_charclass), /* ANYOF */
1270 EXTRA_SIZE(struct regnode_charclass), /* ANYOFD */
1271 EXTRA_SIZE(struct regnode_charclass), /* ANYOFL */
1272 EXTRA_SIZE(struct regnode_charclass_posixl), /* ANYOFPOSIXL */
c316b824 1273 EXTRA_SIZE(struct regnode_1), /* ANYOFH */
6966a05b 1274 EXTRA_SIZE(struct regnode_1), /* ANYOFHb */
3146c00a 1275 EXTRA_SIZE(struct regnode_1), /* ANYOFHr */
53d42e43 1276 EXTRA_SIZE(struct regnode_1), /* ANYOFHs */
13fcf652 1277 EXTRA_SIZE(struct regnode_1), /* ANYOFR */
2d5613be 1278 EXTRA_SIZE(struct regnode_1), /* ANYOFRb */
67a1b5f9 1279 EXTRA_SIZE(struct regnode_1), /* ANYOFM */
3db0bccc 1280 EXTRA_SIZE(struct regnode_1), /* NANYOFM */
3615ea58
KW
1281 0, /* POSIXD */
1282 0, /* POSIXL */
1283 0, /* POSIXU */
1284 0, /* POSIXA */
1285 0, /* NPOSIXD */
1286 0, /* NPOSIXL */
1287 0, /* NPOSIXU */
1288 0, /* NPOSIXA */
03363afd
YO
1289 0, /* CLUMP */
1290 0, /* BRANCH */
03363afd 1291 0, /* EXACT */
ae06e581 1292 EXTRA_SIZE(struct regnode_1), /* LEXACT */
a4525e78 1293 0, /* EXACTL */
03363afd
YO
1294 0, /* EXACTF */
1295 0, /* EXACTFL */
01f98ec2 1296 0, /* EXACTFU */
89829bb5 1297 0, /* EXACTFAA */
f97d9711 1298 0, /* EXACTFAA_NO_TRIE */
627a7895 1299 0, /* EXACTFUP */
a4525e78 1300 0, /* EXACTFLU8 */
3f2416ae
KW
1301 0, /* EXACT_REQ8 */
1302 EXTRA_SIZE(struct regnode_1), /* LEXACT_REQ8 */
1303 0, /* EXACTFU_REQ8 */
95fb0a6e 1304 0, /* EXACTFU_S_EDGE */
7af55186
KW
1305 0, /* LNBREAK */
1306 EXTRA_SIZE(struct regnode_1), /* TRIE */
1307 EXTRA_SIZE(struct regnode_charclass), /* TRIEC */
1308 EXTRA_SIZE(struct regnode_1), /* AHOCORASICK */
1309 EXTRA_SIZE(struct regnode_charclass), /* AHOCORASICKC */
03363afd
YO
1310 0, /* NOTHING */
1311 0, /* TAIL */
1312 0, /* STAR */
1313 0, /* PLUS */
1314 EXTRA_SIZE(struct regnode_2), /* CURLY */
1315 EXTRA_SIZE(struct regnode_2), /* CURLYN */
1316 EXTRA_SIZE(struct regnode_2), /* CURLYM */
1317 EXTRA_SIZE(struct regnode_2), /* CURLYX */
1318 0, /* WHILEM */
1319 EXTRA_SIZE(struct regnode_1), /* OPEN */
1320 EXTRA_SIZE(struct regnode_1), /* CLOSE */
07093db4
KW
1321 0, /* SROPEN */
1322 0, /* SRCLOSE */
03363afd
YO
1323 EXTRA_SIZE(struct regnode_1), /* REF */
1324 EXTRA_SIZE(struct regnode_1), /* REFF */
1325 EXTRA_SIZE(struct regnode_1), /* REFFL */
01f98ec2 1326 EXTRA_SIZE(struct regnode_1), /* REFFU */
781aab5c 1327 EXTRA_SIZE(struct regnode_1), /* REFFA */
016b7209
KW
1328 EXTRA_SIZE(struct regnode_1), /* REFN */
1329 EXTRA_SIZE(struct regnode_1), /* REFFN */
1330 EXTRA_SIZE(struct regnode_1), /* REFFLN */
1331 EXTRA_SIZE(struct regnode_1), /* REFFUN */
1332 EXTRA_SIZE(struct regnode_1), /* REFFAN */
d3d47aac
YO
1333 EXTRA_SIZE(struct regnode_1), /* LONGJMP */
1334 EXTRA_SIZE(struct regnode_1), /* BRANCHJ */
03363afd
YO
1335 EXTRA_SIZE(struct regnode_1), /* IFMATCH */
1336 EXTRA_SIZE(struct regnode_1), /* UNLESSM */
1337 EXTRA_SIZE(struct regnode_1), /* SUSPEND */
1338 EXTRA_SIZE(struct regnode_1), /* IFTHEN */
1339 EXTRA_SIZE(struct regnode_1), /* GROUPP */
13f27704 1340 EXTRA_SIZE(struct regnode_2L), /* EVAL */
03363afd
YO
1341 0, /* MINMOD */
1342 0, /* LOGICAL */
1343 EXTRA_SIZE(struct regnode_1), /* RENUM */
1a147d38 1344 EXTRA_SIZE(struct regnode_2L), /* GOSUB */
016b7209 1345 EXTRA_SIZE(struct regnode_1), /* GROUPPN */
1a147d38 1346 EXTRA_SIZE(struct regnode_1), /* INSUBP */
0a4db386 1347 EXTRA_SIZE(struct regnode_1), /* DEFINEP */
e2e6a0f1 1348 0, /* ENDLIKE */
fee50582
YO
1349 EXTRA_SIZE(struct regnode_1), /* OPFAIL */
1350 EXTRA_SIZE(struct regnode_2L), /* ACCEPT */
20832bc5 1351 EXTRA_SIZE(struct regnode_1), /* VERB */
5d458dd8 1352 EXTRA_SIZE(struct regnode_1), /* PRUNE */
e2e6a0f1 1353 EXTRA_SIZE(struct regnode_1), /* MARKPOINT */
5d458dd8 1354 EXTRA_SIZE(struct regnode_1), /* SKIP */
e2e6a0f1 1355 EXTRA_SIZE(struct regnode_1), /* COMMIT */
5d458dd8 1356 EXTRA_SIZE(struct regnode_1), /* CUTGROUP */
ee9b8eae 1357 0, /* KEEPS */
03363afd
YO
1358 0, /* OPTIMIZED */
1359 0, /* PSEUDO */
86451f01 1360 EXTRA_SIZE(struct regnode_p), /* REGEX_SET */
d09b2d29
IZ
1361};
1362
6bda09f9
YO
1363/* reg_off_by_arg[] - Which argument holds the offset to the next node */
1364
29de9391 1365static const char reg_off_by_arg[] = {
03363afd
YO
1366 0, /* END */
1367 0, /* SUCCEED */
03363afd 1368 0, /* SBOL */
d3d47aac 1369 0, /* MBOL */
03363afd 1370 0, /* SEOL */
d3d47aac
YO
1371 0, /* MEOL */
1372 0, /* EOS */
1373 0, /* GPOS */
03363afd
YO
1374 0, /* BOUND */
1375 0, /* BOUNDL */
1e355c70 1376 0, /* BOUNDU */
0c6e81eb 1377 0, /* BOUNDA */
03363afd
YO
1378 0, /* NBOUND */
1379 0, /* NBOUNDL */
1e355c70 1380 0, /* NBOUNDU */
0c6e81eb 1381 0, /* NBOUNDA */
03363afd
YO
1382 0, /* REG_ANY */
1383 0, /* SANY */
03363afd 1384 0, /* ANYOF */
ac44c12e 1385 0, /* ANYOFD */
a4525e78 1386 0, /* ANYOFL */
3edce4f5 1387 0, /* ANYOFPOSIXL */
c316b824 1388 0, /* ANYOFH */
6966a05b 1389 0, /* ANYOFHb */
3146c00a 1390 0, /* ANYOFHr */
34924db0 1391 0, /* ANYOFHs */
13fcf652 1392 0, /* ANYOFR */
2d5613be 1393 0, /* ANYOFRb */
67a1b5f9 1394 0, /* ANYOFM */
3db0bccc 1395 0, /* NANYOFM */
3615ea58
KW
1396 0, /* POSIXD */
1397 0, /* POSIXL */
1398 0, /* POSIXU */
1399 0, /* POSIXA */
1400 0, /* NPOSIXD */
1401 0, /* NPOSIXL */
1402 0, /* NPOSIXU */
1403 0, /* NPOSIXA */
03363afd
YO
1404 0, /* CLUMP */
1405 0, /* BRANCH */
03363afd 1406 0, /* EXACT */
ae06e581 1407 0, /* LEXACT */
a4525e78 1408 0, /* EXACTL */
03363afd
YO
1409 0, /* EXACTF */
1410 0, /* EXACTFL */
01f98ec2 1411 0, /* EXACTFU */
89829bb5 1412 0, /* EXACTFAA */
f97d9711 1413 0, /* EXACTFAA_NO_TRIE */
627a7895 1414 0, /* EXACTFUP */
a4525e78 1415 0, /* EXACTFLU8 */
3f2416ae
KW
1416 0, /* EXACT_REQ8 */
1417 0, /* LEXACT_REQ8 */
1418 0, /* EXACTFU_REQ8 */
95fb0a6e 1419 0, /* EXACTFU_S_EDGE */
7af55186
KW
1420 0, /* LNBREAK */
1421 0, /* TRIE */
1422 0, /* TRIEC */
1423 0, /* AHOCORASICK */
1424 0, /* AHOCORASICKC */
03363afd
YO
1425 0, /* NOTHING */
1426 0, /* TAIL */
1427 0, /* STAR */
1428 0, /* PLUS */
1429 0, /* CURLY */
1430 0, /* CURLYN */
1431 0, /* CURLYM */
1432 0, /* CURLYX */
1433 0, /* WHILEM */
1434 0, /* OPEN */
1435 0, /* CLOSE */
07093db4
KW
1436 0, /* SROPEN */
1437 0, /* SRCLOSE */
03363afd
YO
1438 0, /* REF */
1439 0, /* REFF */
1440 0, /* REFFL */
01f98ec2 1441 0, /* REFFU */
781aab5c 1442 0, /* REFFA */
016b7209
KW
1443 0, /* REFN */
1444 0, /* REFFN */
1445 0, /* REFFLN */
1446 0, /* REFFUN */
1447 0, /* REFFAN */
d3d47aac
YO
1448 1, /* LONGJMP */
1449 1, /* BRANCHJ */
46167d76
KW
1450 1, /* IFMATCH */
1451 1, /* UNLESSM */
03363afd
YO
1452 1, /* SUSPEND */
1453 1, /* IFTHEN */
1454 0, /* GROUPP */
03363afd
YO
1455 0, /* EVAL */
1456 0, /* MINMOD */
1457 0, /* LOGICAL */
1458 1, /* RENUM */
1a147d38 1459 0, /* GOSUB */
016b7209 1460 0, /* GROUPPN */
1a147d38 1461 0, /* INSUBP */
0a4db386 1462 0, /* DEFINEP */
e2e6a0f1 1463 0, /* ENDLIKE */
7f69552c 1464 0, /* OPFAIL */
e2e6a0f1
YO
1465 0, /* ACCEPT */
1466 0, /* VERB */
5d458dd8 1467 0, /* PRUNE */
e2e6a0f1 1468 0, /* MARKPOINT */
5d458dd8 1469 0, /* SKIP */
e2e6a0f1 1470 0, /* COMMIT */
5d458dd8 1471 0, /* CUTGROUP */
ee9b8eae 1472 0, /* KEEPS */
03363afd
YO
1473 0, /* OPTIMIZED */
1474 0, /* PSEUDO */
86451f01 1475 0, /* REGEX_SET */
d09b2d29 1476};
885f9e59 1477
13d6edb4
NC
1478#endif /* REG_COMP_C */
1479
f83e001e 1480
6bda09f9
YO
1481/* reg_name[] - Opcode/state names in string form, for debugging */
1482
22429478 1483#ifndef DOINIT
13d6edb4 1484EXTCONST char * PL_reg_name[];
22429478 1485#else
4764e399 1486EXTCONST char * const PL_reg_name[] = {
03363afd
YO
1487 "END", /* 0000 */
1488 "SUCCEED", /* 0x01 */
d3d47aac 1489 "SBOL", /* 0x02 */
03363afd 1490 "MBOL", /* 0x03 */
d3d47aac
YO
1491 "SEOL", /* 0x04 */
1492 "MEOL", /* 0x05 */
1493 "EOS", /* 0x06 */
1494 "GPOS", /* 0x07 */
1495 "BOUND", /* 0x08 */
1496 "BOUNDL", /* 0x09 */
1497 "BOUNDU", /* 0x0a */
1498 "BOUNDA", /* 0x0b */
1499 "NBOUND", /* 0x0c */
1500 "NBOUNDL", /* 0x0d */
1501 "NBOUNDU", /* 0x0e */
1502 "NBOUNDA", /* 0x0f */
1503 "REG_ANY", /* 0x10 */
1504 "SANY", /* 0x11 */
33c28ab2 1505 "ANYOF", /* 0x12 */
ac44c12e
KW
1506 "ANYOFD", /* 0x13 */
1507 "ANYOFL", /* 0x14 */
3edce4f5 1508 "ANYOFPOSIXL", /* 0x15 */
c316b824 1509 "ANYOFH", /* 0x16 */
6966a05b 1510 "ANYOFHb", /* 0x17 */
3146c00a 1511 "ANYOFHr", /* 0x18 */
34924db0
KW
1512 "ANYOFHs", /* 0x19 */
1513 "ANYOFR", /* 0x1a */
1514 "ANYOFRb", /* 0x1b */
1515 "ANYOFM", /* 0x1c */
1516 "NANYOFM", /* 0x1d */
1517 "POSIXD", /* 0x1e */
1518 "POSIXL", /* 0x1f */
1519 "POSIXU", /* 0x20 */
1520 "POSIXA", /* 0x21 */
1521 "NPOSIXD", /* 0x22 */
1522 "NPOSIXL", /* 0x23 */
1523 "NPOSIXU", /* 0x24 */
1524 "NPOSIXA", /* 0x25 */
1525 "CLUMP", /* 0x26 */
1526 "BRANCH", /* 0x27 */
1527 "EXACT", /* 0x28 */
1528 "LEXACT", /* 0x29 */
1529 "EXACTL", /* 0x2a */
1530 "EXACTF", /* 0x2b */
1531 "EXACTFL", /* 0x2c */
1532 "EXACTFU", /* 0x2d */
1533 "EXACTFAA", /* 0x2e */
f97d9711
KW
1534 "EXACTFAA_NO_TRIE", /* 0x2f */
1535 "EXACTFUP", /* 0x30 */
1536 "EXACTFLU8", /* 0x31 */
34924db0
KW
1537 "EXACT_REQ8", /* 0x32 */
1538 "LEXACT_REQ8", /* 0x33 */
1539 "EXACTFU_REQ8", /* 0x34 */
1540 "EXACTFU_S_EDGE", /* 0x35 */
7af55186
KW
1541 "LNBREAK", /* 0x36 */
1542 "TRIE", /* 0x37 */
1543 "TRIEC", /* 0x38 */
1544 "AHOCORASICK", /* 0x39 */
1545 "AHOCORASICKC", /* 0x3a */
1546 "NOTHING", /* 0x3b */
1547 "TAIL", /* 0x3c */
1548 "STAR", /* 0x3d */
1549 "PLUS", /* 0x3e */
1550 "CURLY", /* 0x3f */
1551 "CURLYN", /* 0x40 */
1552 "CURLYM", /* 0x41 */
1553 "CURLYX", /* 0x42 */
1554 "WHILEM", /* 0x43 */
1555 "OPEN", /* 0x44 */
1556 "CLOSE", /* 0x45 */
1557 "SROPEN", /* 0x46 */
1558 "SRCLOSE", /* 0x47 */
1559 "REF", /* 0x48 */
1560 "REFF", /* 0x49 */
1561 "REFFL", /* 0x4a */
1562 "REFFU", /* 0x4b */
1563 "REFFA", /* 0x4c */
1564 "REFN", /* 0x4d */
1565 "REFFN", /* 0x4e */
1566 "REFFLN", /* 0x4f */
1567 "REFFUN", /* 0x50 */
1568 "REFFAN", /* 0x51 */
1569 "LONGJMP", /* 0x52 */
1570 "BRANCHJ", /* 0x53 */
1571 "IFMATCH", /* 0x54 */
1572 "UNLESSM", /* 0x55 */
1573 "SUSPEND", /* 0x56 */
1574 "IFTHEN", /* 0x57 */
1575 "GROUPP", /* 0x58 */
1576 "EVAL", /* 0x59 */
1577 "MINMOD", /* 0x5a */
1578 "LOGICAL", /* 0x5b */
1579 "RENUM", /* 0x5c */
1580 "GOSUB", /* 0x5d */
1581 "GROUPPN", /* 0x5e */
1582 "INSUBP", /* 0x5f */
1583 "DEFINEP", /* 0x60 */
1584 "ENDLIKE", /* 0x61 */
1585 "OPFAIL", /* 0x62 */
1586 "ACCEPT", /* 0x63 */
1587 "VERB", /* 0x64 */
1588 "PRUNE", /* 0x65 */
1589 "MARKPOINT", /* 0x66 */
1590 "SKIP", /* 0x67 */
1591 "COMMIT", /* 0x68 */
1592 "CUTGROUP", /* 0x69 */
1593 "KEEPS", /* 0x6a */
34924db0
KW
1594 "OPTIMIZED", /* 0x6b */
1595 "PSEUDO", /* 0x6c */
86451f01 1596 "REGEX_SET", /* 0x6d */
03363afd 1597 /* ------------ States ------------- */
24b23f37
YO
1598 "TRIE_next", /* REGNODE_MAX +0x01 */
1599 "TRIE_next_fail", /* REGNODE_MAX +0x02 */
4ee16520
DM
1600 "EVAL_B", /* REGNODE_MAX +0x03 */
1601 "EVAL_B_fail", /* REGNODE_MAX +0x04 */
1602 "EVAL_postponed_AB", /* REGNODE_MAX +0x05 */
1603 "EVAL_postponed_AB_fail", /* REGNODE_MAX +0x06 */
1604 "CURLYX_end", /* REGNODE_MAX +0x07 */
1605 "CURLYX_end_fail", /* REGNODE_MAX +0x08 */
1606 "WHILEM_A_pre", /* REGNODE_MAX +0x09 */
1607 "WHILEM_A_pre_fail", /* REGNODE_MAX +0x0a */
1608 "WHILEM_A_min", /* REGNODE_MAX +0x0b */
1609 "WHILEM_A_min_fail", /* REGNODE_MAX +0x0c */
1610 "WHILEM_A_max", /* REGNODE_MAX +0x0d */
1611 "WHILEM_A_max_fail", /* REGNODE_MAX +0x0e */
1612 "WHILEM_B_min", /* REGNODE_MAX +0x0f */
1613 "WHILEM_B_min_fail", /* REGNODE_MAX +0x10 */
1614 "WHILEM_B_max", /* REGNODE_MAX +0x11 */
1615 "WHILEM_B_max_fail", /* REGNODE_MAX +0x12 */
1616 "BRANCH_next", /* REGNODE_MAX +0x13 */
1617 "BRANCH_next_fail", /* REGNODE_MAX +0x14 */
1618 "CURLYM_A", /* REGNODE_MAX +0x15 */
1619 "CURLYM_A_fail", /* REGNODE_MAX +0x16 */
1620 "CURLYM_B", /* REGNODE_MAX +0x17 */
1621 "CURLYM_B_fail", /* REGNODE_MAX +0x18 */
1622 "IFMATCH_A", /* REGNODE_MAX +0x19 */
1623 "IFMATCH_A_fail", /* REGNODE_MAX +0x1a */
21cbe009
DM
1624 "CURLY_B_min", /* REGNODE_MAX +0x1b */
1625 "CURLY_B_min_fail", /* REGNODE_MAX +0x1c */
1626 "CURLY_B_max", /* REGNODE_MAX +0x1d */
1627 "CURLY_B_max_fail", /* REGNODE_MAX +0x1e */
1628 "COMMIT_next", /* REGNODE_MAX +0x1f */
1629 "COMMIT_next_fail", /* REGNODE_MAX +0x20 */
1630 "MARKPOINT_next", /* REGNODE_MAX +0x21 */
1631 "MARKPOINT_next_fail", /* REGNODE_MAX +0x22 */
1632 "SKIP_next", /* REGNODE_MAX +0x23 */
1633 "SKIP_next_fail", /* REGNODE_MAX +0x24 */
1634 "CUTGROUP_next", /* REGNODE_MAX +0x25 */
1635 "CUTGROUP_next_fail", /* REGNODE_MAX +0x26 */
1636 "KEEPS_next", /* REGNODE_MAX +0x27 */
1637 "KEEPS_next_fail", /* REGNODE_MAX +0x28 */
885f9e59 1638};
22429478 1639#endif /* DOINIT */
d09b2d29 1640
f7819f85
A
1641/* PL_reg_extflags_name[] - Opcode/state names in string form, for debugging */
1642
1643#ifndef DOINIT
1644EXTCONST char * PL_reg_extflags_name[];
1645#else
1646EXTCONST char * const PL_reg_extflags_name[] = {
d262c0c7 1647 /* Bits in extflags defined: 11111111111111110000111111111111 */
52d81aa8
NC
1648 "MULTILINE", /* 0x00000001 */
1649 "SINGLELINE", /* 0x00000002 */
1650 "FOLD", /* 0x00000004 */
1651 "EXTENDED", /* 0x00000008 */
334afb3e 1652 "EXTENDED_MORE", /* 0x00000010 */
e3b64d84
KW
1653 "NOCAPTURE", /* 0x00000020 */
1654 "KEEPCOPY", /* 0x00000040 */
1655 "CHARSET0", /* 0x00000080 : "CHARSET" - 0x00000380 */
1656 "CHARSET1", /* 0x00000100 : "CHARSET" - 0x00000380 */
1657 "CHARSET2", /* 0x00000200 : "CHARSET" - 0x00000380 */
d262c0c7
KW
1658 "STRICT", /* 0x00000400 */
1659 "SPLIT", /* 0x00000800 */
1d32d911
KW
1660 "UNUSED_BIT_12", /* 0x00001000 */
1661 "UNUSED_BIT_13", /* 0x00002000 */
1662 "UNUSED_BIT_14", /* 0x00004000 */
a3b51d37
KW
1663 "UNUSED_BIT_15", /* 0x00008000 */
1664 "NO_INPLACE_SUBST", /* 0x00010000 */
1665 "EVAL_SEEN", /* 0x00020000 */
ee273784 1666 "UNBOUNDED_QUANTIFIER_SEEN",/* 0x00040000 */
e795e964 1667 "CHECK_ALL", /* 0x00080000 */
52d81aa8
NC
1668 "MATCH_UTF8", /* 0x00100000 */
1669 "USE_INTUIT_NOML", /* 0x00200000 */
1670 "USE_INTUIT_ML", /* 0x00400000 */
1671 "INTUIT_TAIL", /* 0x00800000 */
a3b51d37 1672 "IS_ANCHORED", /* 0x01000000 */
52d81aa8
NC
1673 "COPY_DONE", /* 0x02000000 */
1674 "TAINTED_SEEN", /* 0x04000000 */
1675 "TAINTED", /* 0x08000000 */
1676 "START_ONLY", /* 0x10000000 */
dbc200c5 1677 "SKIPWHITE", /* 0x20000000 */
52d81aa8
NC
1678 "WHITE", /* 0x40000000 */
1679 "NULL", /* 0x80000000 */
f7819f85
A
1680};
1681#endif /* DOINIT */
1682
adc2d0c9
JH
1683#ifdef DEBUGGING
1684# define REG_EXTFLAGS_NAME_SIZE 32
1685#endif
1686
337ff307
YO
1687/* PL_reg_intflags_name[] - Opcode/state names in string form, for debugging */
1688
1689#ifndef DOINIT
1690EXTCONST char * PL_reg_intflags_name[];
1691#else
1692EXTCONST char * const PL_reg_intflags_name[] = {
b8f6efdd
YO
1693 "SKIP", /* 0x00000001 - PREGf_SKIP */
1694 "IMPLICIT", /* 0x00000002 - PREGf_IMPLICIT - Converted .* to ^.* */
1695 "NAUGHTY", /* 0x00000004 - PREGf_NAUGHTY - how exponential is this pattern? */
1696 "VERBARG_SEEN", /* 0x00000008 - PREGf_VERBARG_SEEN */
1697 "CUTGROUP_SEEN", /* 0x00000010 - PREGf_CUTGROUP_SEEN */
1698 "USE_RE_EVAL", /* 0x00000020 - PREGf_USE_RE_EVAL - compiled with "use re 'eval'" */
58430ea8 1699 "NOSCAN", /* 0x00000040 - PREGf_NOSCAN */
58430ea8
YO
1700 "GPOS_SEEN", /* 0x00000100 - PREGf_GPOS_SEEN */
1701 "GPOS_FLOAT", /* 0x00000200 - PREGf_GPOS_FLOAT */
d3d47aac
YO
1702 "ANCH_MBOL", /* 0x00000400 - PREGf_ANCH_MBOL */
1703 "ANCH_SBOL", /* 0x00000800 - PREGf_ANCH_SBOL */
1704 "ANCH_GPOS", /* 0x00001000 - PREGf_ANCH_GPOS */
d5a00e4a 1705 "RECURSE_SEEN", /* 0x00002000 - PREGf_RECURSE_SEEN */
337ff307
YO
1706};
1707#endif /* DOINIT */
1708
adc2d0c9 1709#ifdef DEBUGGING
d5a00e4a 1710# define REG_INTFLAGS_NAME_SIZE 13
adc2d0c9
JH
1711#endif
1712
f9ef50a7 1713/* The following have no fixed length. U8 so we can do strchr() on it. */
ded4dd2a 1714#define REGNODE_VARIES(node) (PL_varies_bitmask[(node) >> 3] & (1 << ((node) & 7)))
e52fc539 1715
f9ef50a7 1716#ifndef DOINIT
ded4dd2a 1717EXTCONST U8 PL_varies[] __attribute__deprecated__;
f9ef50a7 1718#else
ded4dd2a 1719EXTCONST U8 PL_varies[] __attribute__deprecated__ = {
62e6ef33 1720 CLUMP, BRANCH, STAR, PLUS, CURLY, CURLYN, CURLYM, CURLYX, WHILEM, REF,
016b7209 1721 REFF, REFFL, REFFU, REFFA, REFN, REFFN, REFFLN, REFFUN, REFFAN,
d3d47aac 1722 BRANCHJ, SUSPEND, IFTHEN,
f9ef50a7
NC
1723 0
1724};
1725#endif /* DOINIT */
1726
ded4dd2a
NC
1727#ifndef DOINIT
1728EXTCONST U8 PL_varies_bitmask[];
1729#else
1730EXTCONST U8 PL_varies_bitmask[] = {
7af55186 1731 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE0, 0x0F, 0xFF, 0xCB, 0x00, 0x00, 0x00
ded4dd2a
NC
1732};
1733#endif /* DOINIT */
1734
f9ef50a7
NC
1735/* The following always have a length of 1. U8 we can do strchr() on it. */
1736/* (Note that length 1 means "one character" under UTF8, not "one octet".) */
ded4dd2a 1737#define REGNODE_SIMPLE(node) (PL_simple_bitmask[(node) >> 3] & (1 << ((node) & 7)))
e52fc539 1738
f9ef50a7 1739#ifndef DOINIT
ded4dd2a 1740EXTCONST U8 PL_simple[] __attribute__deprecated__;
f9ef50a7 1741#else
ded4dd2a 1742EXTCONST U8 PL_simple[] __attribute__deprecated__ = {
6966a05b 1743 REG_ANY, SANY, ANYOF, ANYOFD, ANYOFL, ANYOFPOSIXL, ANYOFH, ANYOFHb,
34924db0 1744 ANYOFHr, ANYOFHs, ANYOFR, ANYOFRb, ANYOFM, NANYOFM, POSIXD, POSIXL,
86451f01 1745 POSIXU, POSIXA, NPOSIXD, NPOSIXL, NPOSIXU, NPOSIXA, REGEX_SET,
f9ef50a7
NC
1746 0
1747};
1748#endif /* DOINIT */
1749
ded4dd2a
NC
1750#ifndef DOINIT
1751EXTCONST U8 PL_simple_bitmask[];
1752#else
1753EXTCONST U8 PL_simple_bitmask[] = {
86451f01 1754 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20
ded4dd2a
NC
1755};
1756#endif /* DOINIT */
1757
938090ac
KW
1758/* Is 'op', known to be of type EXACT, folding? */
1759#define isEXACTFish(op) (__ASSERT_(PL_regkind[op] == EXACT) (PL_EXACTFish_bitmask & (1U << (op - EXACT))))
1760
1761/* Do only UTF-8 target strings match 'op', known to be of type EXACT? */
1762#define isEXACT_REQ8(op) (__ASSERT_(PL_regkind[op] == EXACT) (PL_EXACT_REQ8_bitmask & (1U << (op - EXACT))))
1763
1764#ifndef DOINIT
1765EXTCONST U32 PL_EXACTFish_bitmask;
1766EXTCONST U32 PL_EXACT_REQ8_bitmask;
1767#else
1768EXTCONST U32 PL_EXACTFish_bitmask = 0x33F8;
1769EXTCONST U32 PL_EXACT_REQ8_bitmask = 0x1E00;
1770#endif /* DOINIT */
1771
33b57041
KW
1772#endif /* defined(PERL_CORE) || defined(PERL_EXT_RE_BUILD) */
1773
37442d52 1774/* ex: set ro: */