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