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