source: for-distributions/trunk/bin/windows/perl/lib/CORE/regnodes.h@ 14489

Last change on this file since 14489 was 14489, checked in by oranfry, 17 years ago

upgrading to perl 5.8

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