This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
run/exit.t busted on windows
[perl5.git] / regnodes.h
1 /* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
2    This file is built by regcomp.pl from regcomp.sym.
3    Any changes made here will be lost!
4 */
5
6 #define END     0       /*    0 End of program. */
7 #define SUCCEED 1       /*  0x1 Return from a subroutine, basically. */
8 #define BOL     2       /*  0x2 Match "" at beginning of line. */
9 #define MBOL    3       /*  0x3 Same, assuming multiline. */
10 #define SBOL    4       /*  0x4 Same, assuming singleline. */
11 #define EOS     5       /*  0x5 Match "" at end of string. */
12 #define EOL     6       /*  0x6 Match "" at end of line. */
13 #define MEOL    7       /*  0x7 Same, assuming multiline. */
14 #define SEOL    8       /*  0x8 Same, assuming singleline. */
15 #define BOUND   9       /*  0x9 Match "" at any word boundary */
16 #define BOUNDL  10      /*  0xa Match "" at any word boundary */
17 #define NBOUND  11      /*  0xb Match "" at any word non-boundary */
18 #define NBOUNDL 12      /*  0xc Match "" at any word non-boundary */
19 #define GPOS    13      /*  0xd Matches where last m//g left off. */
20 #define REG_ANY 14      /*  0xe Match any one character (except newline). */
21 #define SANY    15      /*  0xf Match any one character. */
22 #define ANYOF   16      /* 0x10 Match character in (or not in) this class. */
23 #define ALNUM   17      /* 0x11 Match any alphanumeric character */
24 #define ALNUML  18      /* 0x12 Match any alphanumeric char in locale */
25 #define NALNUM  19      /* 0x13 Match any non-alphanumeric character */
26 #define NALNUML 20      /* 0x14 Match any non-alphanumeric char in locale */
27 #define SPACE   21      /* 0x15 Match any whitespace character */
28 #define SPACEL  22      /* 0x16 Match any whitespace char in locale */
29 #define NSPACE  23      /* 0x17 Match any non-whitespace character */
30 #define NSPACEL 24      /* 0x18 Match any non-whitespace char in locale */
31 #define DIGIT   25      /* 0x19 Match any numeric character */
32 #define DIGITL  26      /* 0x1a Match any numeric character in locale */
33 #define NDIGIT  27      /* 0x1b Match any non-numeric character */
34 #define NDIGITL 28      /* 0x1c Match any non-numeric character in locale */
35 #define CLUMP   29      /* 0x1d Match any combining character sequence */
36 #define BRANCH  30      /* 0x1e Match this alternative, or the next... */
37 #define BACK    31      /* 0x1f Match "", "next" ptr points backward. */
38 #define EXACT   32      /* 0x20 Match this string (preceded by length). */
39 #define EXACTF  33      /* 0x21 Match this string, folded (prec. by length). */
40 #define EXACTFL 34      /* 0x22 Match this string, folded in locale (w/len). */
41 #define NOTHING 35      /* 0x23 Match empty string. */
42 #define TAIL    36      /* 0x24 Match empty string. Can jump here from outside. */
43 #define STAR    37      /* 0x25 Match this (simple) thing 0 or more times. */
44 #define PLUS    38      /* 0x26 Match this (simple) thing 1 or more times. */
45 #define CURLY   39      /* 0x27 Match this simple thing {n,m} times. */
46 #define CURLYN  40      /* 0x28 Match next-after-this simple thing  */
47 #define CURLYM  41      /* 0x29 Match this medium-complex thing {n,m} times. */
48 #define CURLYX  42      /* 0x2a Match this complex thing {n,m} times. */
49 #define WHILEM  43      /* 0x2b Do curly processing and see if rest matches. */
50 #define OPEN    44      /* 0x2c Mark this point in input as start of #n. */
51 #define CLOSE   45      /* 0x2d Analogous to OPEN. */
52 #define REF     46      /* 0x2e Match some already matched string */
53 #define REFF    47      /* 0x2f Match already matched string, folded */
54 #define REFFL   48      /* 0x30 Match already matched string, folded in loc. */
55 #define IFMATCH 49      /* 0x31 Succeeds if the following matches. */
56 #define UNLESSM 50      /* 0x32 Fails if the following matches. */
57 #define SUSPEND 51      /* 0x33 "Independent" sub-RE. */
58 #define IFTHEN  52      /* 0x34 Switch, should be preceeded by switcher . */
59 #define GROUPP  53      /* 0x35 Whether the group matched. */
60 #define LONGJMP 54      /* 0x36 Jump far away. */
61 #define BRANCHJ 55      /* 0x37 BRANCH with long offset. */
62 #define EVAL    56      /* 0x38 Execute some Perl code. */
63 #define MINMOD  57      /* 0x39 Next operator is not greedy. */
64 #define LOGICAL 58      /* 0x3a Next opcode should set the flag only. */
65 #define RENUM   59      /* 0x3b Group with independently numbered parens. */
66 #define OPTIMIZED       60      /* 0x3c Placeholder for dump. */
67
68 #ifndef DOINIT
69 EXTCONST U8 PL_regkind[];
70 #else
71 EXTCONST U8 PL_regkind[] = {
72         END,            /* END */
73         END,            /* SUCCEED */
74         BOL,            /* BOL */
75         BOL,            /* MBOL */
76         BOL,            /* SBOL */
77         EOL,            /* EOS */
78         EOL,            /* EOL */
79         EOL,            /* MEOL */
80         EOL,            /* SEOL */
81         BOUND,          /* BOUND */
82         BOUND,          /* BOUNDL */
83         NBOUND,         /* NBOUND */
84         NBOUND,         /* NBOUNDL */
85         GPOS,           /* GPOS */
86         REG_ANY,                /* REG_ANY */
87         REG_ANY,                /* SANY */
88         ANYOF,          /* ANYOF */
89         ALNUM,          /* ALNUM */
90         ALNUM,          /* ALNUML */
91         NALNUM,         /* NALNUM */
92         NALNUM,         /* NALNUML */
93         SPACE,          /* SPACE */
94         SPACE,          /* SPACEL */
95         NSPACE,         /* NSPACE */
96         NSPACE,         /* NSPACEL */
97         DIGIT,          /* DIGIT */
98         DIGIT,          /* DIGITL */
99         NDIGIT,         /* NDIGIT */
100         NDIGIT,         /* NDIGITL */
101         CLUMP,          /* CLUMP */
102         BRANCH,         /* BRANCH */
103         BACK,           /* BACK */
104         EXACT,          /* EXACT */
105         EXACT,          /* EXACTF */
106         EXACT,          /* EXACTFL */
107         NOTHING,                /* NOTHING */
108         NOTHING,                /* TAIL */
109         STAR,           /* STAR */
110         PLUS,           /* PLUS */
111         CURLY,          /* CURLY */
112         CURLY,          /* CURLYN */
113         CURLY,          /* CURLYM */
114         CURLY,          /* CURLYX */
115         WHILEM,         /* WHILEM */
116         OPEN,           /* OPEN */
117         CLOSE,          /* CLOSE */
118         REF,            /* REF */
119         REF,            /* REFF */
120         REF,            /* REFFL */
121         BRANCHJ,                /* IFMATCH */
122         BRANCHJ,                /* UNLESSM */
123         BRANCHJ,                /* SUSPEND */
124         BRANCHJ,                /* IFTHEN */
125         GROUPP,         /* GROUPP */
126         LONGJMP,                /* LONGJMP */
127         BRANCHJ,                /* BRANCHJ */
128         EVAL,           /* EVAL */
129         MINMOD,         /* MINMOD */
130         LOGICAL,                /* LOGICAL */
131         BRANCHJ,                /* RENUM */
132         NOTHING,                /* OPTIMIZED */
133 };
134 #endif
135
136
137 #ifdef REG_COMP_C
138 static const U8 regarglen[] = {
139         0,              /* END */
140         0,              /* SUCCEED */
141         0,              /* BOL */
142         0,              /* MBOL */
143         0,              /* SBOL */
144         0,              /* EOS */
145         0,              /* EOL */
146         0,              /* MEOL */
147         0,              /* SEOL */
148         0,              /* BOUND */
149         0,              /* BOUNDL */
150         0,              /* NBOUND */
151         0,              /* NBOUNDL */
152         0,              /* GPOS */
153         0,              /* REG_ANY */
154         0,              /* SANY */
155         0,              /* ANYOF */
156         0,              /* ALNUM */
157         0,              /* ALNUML */
158         0,              /* NALNUM */
159         0,              /* NALNUML */
160         0,              /* SPACE */
161         0,              /* SPACEL */
162         0,              /* NSPACE */
163         0,              /* NSPACEL */
164         0,              /* DIGIT */
165         0,              /* DIGITL */
166         0,              /* NDIGIT */
167         0,              /* NDIGITL */
168         0,              /* CLUMP */
169         0,              /* BRANCH */
170         0,              /* BACK */
171         0,              /* EXACT */
172         0,              /* EXACTF */
173         0,              /* EXACTFL */
174         0,              /* NOTHING */
175         0,              /* TAIL */
176         0,              /* STAR */
177         0,              /* PLUS */
178         EXTRA_SIZE(struct regnode_2),           /* CURLY */
179         EXTRA_SIZE(struct regnode_2),           /* CURLYN */
180         EXTRA_SIZE(struct regnode_2),           /* CURLYM */
181         EXTRA_SIZE(struct regnode_2),           /* CURLYX */
182         0,              /* WHILEM */
183         EXTRA_SIZE(struct regnode_1),           /* OPEN */
184         EXTRA_SIZE(struct regnode_1),           /* CLOSE */
185         EXTRA_SIZE(struct regnode_1),           /* REF */
186         EXTRA_SIZE(struct regnode_1),           /* REFF */
187         EXTRA_SIZE(struct regnode_1),           /* REFFL */
188         EXTRA_SIZE(struct regnode_1),           /* IFMATCH */
189         EXTRA_SIZE(struct regnode_1),           /* UNLESSM */
190         EXTRA_SIZE(struct regnode_1),           /* SUSPEND */
191         EXTRA_SIZE(struct regnode_1),           /* IFTHEN */
192         EXTRA_SIZE(struct regnode_1),           /* GROUPP */
193         EXTRA_SIZE(struct regnode_1),           /* LONGJMP */
194         EXTRA_SIZE(struct regnode_1),           /* BRANCHJ */
195         EXTRA_SIZE(struct regnode_1),           /* EVAL */
196         0,              /* MINMOD */
197         0,              /* LOGICAL */
198         EXTRA_SIZE(struct regnode_1),           /* RENUM */
199         0,              /* OPTIMIZED */
200 };
201
202 static const char reg_off_by_arg[] = {
203         0,              /* END */
204         0,              /* SUCCEED */
205         0,              /* BOL */
206         0,              /* MBOL */
207         0,              /* SBOL */
208         0,              /* EOS */
209         0,              /* EOL */
210         0,              /* MEOL */
211         0,              /* SEOL */
212         0,              /* BOUND */
213         0,              /* BOUNDL */
214         0,              /* NBOUND */
215         0,              /* NBOUNDL */
216         0,              /* GPOS */
217         0,              /* REG_ANY */
218         0,              /* SANY */
219         0,              /* ANYOF */
220         0,              /* ALNUM */
221         0,              /* ALNUML */
222         0,              /* NALNUM */
223         0,              /* NALNUML */
224         0,              /* SPACE */
225         0,              /* SPACEL */
226         0,              /* NSPACE */
227         0,              /* NSPACEL */
228         0,              /* DIGIT */
229         0,              /* DIGITL */
230         0,              /* NDIGIT */
231         0,              /* NDIGITL */
232         0,              /* CLUMP */
233         0,              /* BRANCH */
234         0,              /* BACK */
235         0,              /* EXACT */
236         0,              /* EXACTF */
237         0,              /* EXACTFL */
238         0,              /* NOTHING */
239         0,              /* TAIL */
240         0,              /* STAR */
241         0,              /* PLUS */
242         0,              /* CURLY */
243         0,              /* CURLYN */
244         0,              /* CURLYM */
245         0,              /* CURLYX */
246         0,              /* WHILEM */
247         0,              /* OPEN */
248         0,              /* CLOSE */
249         0,              /* REF */
250         0,              /* REFF */
251         0,              /* REFFL */
252         2,              /* IFMATCH */
253         2,              /* UNLESSM */
254         1,              /* SUSPEND */
255         1,              /* IFTHEN */
256         0,              /* GROUPP */
257         1,              /* LONGJMP */
258         1,              /* BRANCHJ */
259         0,              /* EVAL */
260         0,              /* MINMOD */
261         0,              /* LOGICAL */
262         1,              /* RENUM */
263         0,              /* OPTIMIZED */
264 };
265
266 #ifdef DEBUGGING
267 static const char * const reg_name[] = {
268         "END",          /*    0 */
269         "SUCCEED",              /*  0x1 */
270         "BOL",          /*  0x2 */
271         "MBOL",         /*  0x3 */
272         "SBOL",         /*  0x4 */
273         "EOS",          /*  0x5 */
274         "EOL",          /*  0x6 */
275         "MEOL",         /*  0x7 */
276         "SEOL",         /*  0x8 */
277         "BOUND",                /*  0x9 */
278         "BOUNDL",               /*  0xa */
279         "NBOUND",               /*  0xb */
280         "NBOUNDL",              /*  0xc */
281         "GPOS",         /*  0xd */
282         "REG_ANY",              /*  0xe */
283         "SANY",         /*  0xf */
284         "ANYOF",                /* 0x10 */
285         "ALNUM",                /* 0x11 */
286         "ALNUML",               /* 0x12 */
287         "NALNUM",               /* 0x13 */
288         "NALNUML",              /* 0x14 */
289         "SPACE",                /* 0x15 */
290         "SPACEL",               /* 0x16 */
291         "NSPACE",               /* 0x17 */
292         "NSPACEL",              /* 0x18 */
293         "DIGIT",                /* 0x19 */
294         "DIGITL",               /* 0x1a */
295         "NDIGIT",               /* 0x1b */
296         "NDIGITL",              /* 0x1c */
297         "CLUMP",                /* 0x1d */
298         "BRANCH",               /* 0x1e */
299         "BACK",         /* 0x1f */
300         "EXACT",                /* 0x20 */
301         "EXACTF",               /* 0x21 */
302         "EXACTFL",              /* 0x22 */
303         "NOTHING",              /* 0x23 */
304         "TAIL",         /* 0x24 */
305         "STAR",         /* 0x25 */
306         "PLUS",         /* 0x26 */
307         "CURLY",                /* 0x27 */
308         "CURLYN",               /* 0x28 */
309         "CURLYM",               /* 0x29 */
310         "CURLYX",               /* 0x2a */
311         "WHILEM",               /* 0x2b */
312         "OPEN",         /* 0x2c */
313         "CLOSE",                /* 0x2d */
314         "REF",          /* 0x2e */
315         "REFF",         /* 0x2f */
316         "REFFL",                /* 0x30 */
317         "IFMATCH",              /* 0x31 */
318         "UNLESSM",              /* 0x32 */
319         "SUSPEND",              /* 0x33 */
320         "IFTHEN",               /* 0x34 */
321         "GROUPP",               /* 0x35 */
322         "LONGJMP",              /* 0x36 */
323         "BRANCHJ",              /* 0x37 */
324         "EVAL",         /* 0x38 */
325         "MINMOD",               /* 0x39 */
326         "LOGICAL",              /* 0x3a */
327         "RENUM",                /* 0x3b */
328         "OPTIMIZED",            /* 0x3c */
329 };
330
331 static const int reg_num = 61;
332
333 #endif /* DEBUGGING */
334 #endif /* REG_COMP_C */
335