3 static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
11 #define yyclearin (yychar = YYEMPTY)
12 #define yyerrok (yyerrflag = 0)
13 #define YYRECOVERING() (yyerrflag != 0)
20 /* Copyright (c) 1990 The Regents of the University of California. */
21 /* All rights reserved. */
23 /* This code is derived from software contributed to Berkeley by */
26 /* The United States Government has rights in this work pursuant */
27 /* to contract no. DE-AC03-76SF00098 between the United States */
28 /* Department of Energy and the University of California. */
30 /* This file is part of flex. */
32 /* Redistribution and use in source and binary forms, with or without */
33 /* modification, are permitted provided that the following conditions */
36 /* 1. Redistributions of source code must retain the above copyright */
37 /* notice, this list of conditions and the following disclaimer. */
38 /* 2. Redistributions in binary form must reproduce the above copyright */
39 /* notice, this list of conditions and the following disclaimer in the */
40 /* documentation and/or other materials provided with the distribution. */
42 /* Neither the name of the University nor the names of its contributors */
43 /* may be used to endorse or promote products derived from this software */
44 /* without specific prior written permission. */
46 /* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
47 /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
48 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
54 int pat, scnum, eps, headcnt, trailcnt, lastchar, i, rulelen;
55 int trlcontxt, xcluflg, currccl, cclsorted, varlength, variable_trail_rule;
60 static int madeany = false; /* whether we've made the '.' character class */
61 static int ccldot, cclany;
62 int previous_continued_action; /* whether the previous rule's action was '|' */
64 #define format_warn3(fmt, a1, a2) \
66 char fw3_msg[MAXLINE];\
67 snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
71 /* Expand a POSIX character class expression. */
72 #define CCL_EXPR(func) \
75 for ( c = 0; c < csize; ++c ) \
76 if ( isascii(c) && func(c) ) \
77 ccladd( currccl, c ); \
81 #define CCL_NEG_EXPR(func) \
84 for ( c = 0; c < csize; ++c ) \
86 ccladd( currccl, c ); \
89 /* While POSIX defines isblank(), it's not ANSI C. */
90 #define IS_BLANK(c) ((c) == ' ' || (c) == '\t')
92 /* On some over-ambitious machines, such as DEC Alpha's, the default
93 * token type is "long" instead of "int"; this leads to problems with
94 * declaring yylval in flexdef.h. But so far, all the yacc's I've seen
95 * wrap their definitions of YYSTYPE with "#ifndef YYSTYPE"'s, so the
96 * following should ensure that the default token type is "int".
106 /* compatibility with bison */
108 /* compatibility with FreeBSD */
109 # ifdef YYPARSE_PARAM_TYPE
110 # define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
112 # define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
115 # define YYPARSE_DECL() yyparse(void)
118 /* Parameters sent to lex. */
120 # define YYLEX_DECL() yylex(void *YYLEX_PARAM)
121 # define YYLEX yylex(YYLEX_PARAM)
123 # define YYLEX_DECL() yylex(void)
124 # define YYLEX yylex()
127 /* Parameters sent to yyerror. */
129 #define YYERROR_DECL() yyerror(const char *s)
132 #define YYERROR_CALL(msg) yyerror(msg)
135 extern int YYPARSE_DECL();
145 #define OPTION_OP 265
146 #define OPT_OUTFILE 266
147 #define OPT_PREFIX 267
148 #define OPT_YYCLASS 268
149 #define OPT_HEADER 269
150 #define OPT_EXTRA_TYPE 270
151 #define OPT_TABLES 271
152 #define CCE_ALNUM 272
153 #define CCE_ALPHA 273
154 #define CCE_BLANK 274
155 #define CCE_CNTRL 275
156 #define CCE_DIGIT 276
157 #define CCE_GRAPH 277
158 #define CCE_LOWER 278
159 #define CCE_PRINT 279
160 #define CCE_PUNCT 280
161 #define CCE_SPACE 281
162 #define CCE_UPPER 282
163 #define CCE_XDIGIT 283
164 #define CCE_NEG_ALNUM 284
165 #define CCE_NEG_ALPHA 285
166 #define CCE_NEG_BLANK 286
167 #define CCE_NEG_CNTRL 287
168 #define CCE_NEG_DIGIT 288
169 #define CCE_NEG_GRAPH 289
170 #define CCE_NEG_LOWER 290
171 #define CCE_NEG_PRINT 291
172 #define CCE_NEG_PUNCT 292
173 #define CCE_NEG_SPACE 293
174 #define CCE_NEG_UPPER 294
175 #define CCE_NEG_XDIGIT 295
176 #define CCL_OP_DIFF 296
177 #define CCL_OP_UNION 297
178 #define BEGIN_REPEAT_POSIX 298
179 #define END_REPEAT_POSIX 299
180 #define BEGIN_REPEAT_FLEX 300
181 #define END_REPEAT_FLEX 301
182 #define YYERRCODE 256
183 static const short yylhs[] = { -1,
184 0, 1, 2, 2, 2, 2, 3, 6, 6, 7,
185 7, 7, 8, 9, 9, 10, 10, 10, 10, 10,
186 10, 4, 4, 4, 5, 12, 12, 12, 12, 14,
187 11, 11, 11, 15, 15, 15, 16, 13, 13, 13,
188 13, 18, 18, 17, 19, 19, 19, 19, 19, 20,
189 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
190 20, 21, 21, 21, 23, 23, 24, 24, 24, 24,
191 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
192 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
193 25, 25, 25, 25, 22, 22,
195 static const short yylen[] = { 2,
196 5, 0, 3, 2, 0, 1, 1, 1, 1, 2,
197 1, 1, 2, 2, 0, 3, 3, 3, 3, 3,
198 3, 5, 5, 0, 0, 2, 1, 1, 1, 0,
199 4, 3, 0, 3, 1, 1, 1, 2, 3, 2,
200 1, 3, 1, 2, 2, 1, 6, 5, 4, 2,
201 2, 2, 6, 5, 4, 1, 1, 1, 3, 3,
202 1, 3, 3, 1, 3, 4, 4, 2, 2, 0,
203 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
204 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
207 static const short yydefred[] = { 2,
208 0, 0, 6, 0, 7, 8, 9, 15, 24, 0,
209 4, 0, 0, 12, 11, 0, 0, 0, 0, 0,
210 0, 0, 14, 0, 1, 0, 10, 0, 0, 0,
211 0, 0, 0, 0, 0, 24, 0, 16, 18, 19,
212 20, 17, 21, 32, 36, 37, 0, 35, 0, 29,
213 61, 58, 28, 0, 56, 96, 0, 0, 0, 27,
214 0, 0, 0, 0, 0, 64, 31, 0, 23, 26,
215 0, 0, 70, 0, 22, 0, 40, 0, 44, 0,
216 0, 0, 50, 51, 52, 0, 0, 34, 95, 59,
217 60, 0, 0, 71, 72, 73, 74, 75, 76, 77,
218 78, 79, 80, 82, 81, 83, 84, 85, 86, 87,
219 88, 93, 89, 90, 91, 94, 92, 65, 69, 39,
220 0, 0, 0, 62, 63, 66, 0, 49, 0, 55,
221 0, 67, 0, 48, 0, 54, 47, 53,
223 static const short yydgoto[] = { 1,
224 2, 4, 9, 13, 25, 10, 16, 11, 12, 23,
225 26, 59, 60, 35, 47, 48, 61, 62, 63, 64,
228 static const short yysindex[] = { 0,
229 0, -222, 0, -155, 0, 0, 0, 0, 0, -215,
230 0, -123, 6, 0, 0, -193, 10, 21, 26, 31,
231 35, 37, 0, 59, 0, -44, 0, -147, -145, -140,
232 -133, -132, -129, 75, -214, 0, -19, 0, 0, 0,
233 0, 0, 0, 0, 0, 0, 23, 0, -48, 0,
234 0, 0, 0, -17, 0, 0, -17, 27, 128, 0,
235 -17, -1, -30, -41, -189, 0, 0, -121, 0, 0,
236 -31, -34, 0, -87, 0, -25, 0, -17, 0, -109,
237 -41, -108, 0, 0, 0, 60, 60, 0, 0, 0,
238 0, 46, 107, 0, 0, 0, 0, 0, 0, 0,
239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
241 -30, -36, -39, 0, 0, 0, -104, 0, -219, 0,
242 -238, 0, -144, 0, -143, 0, 0, 0,
244 static const short yyrindex[] = { 0,
245 0, -141, 0, 0, 0, 0, 0, 0, 0, 0,
246 0, -134, 9, 0, 0, -125, 0, 0, 0, 0,
247 0, 0, 0, -178, 0, 22, 0, 0, 0, 0,
248 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
249 0, 0, 0, 0, 0, 0, 0, 0, -21, 0,
250 0, 0, 0, 0, 0, 0, 0, 85, 0, 0,
251 0, 144, 47, 4, -10, 0, 0, 0, 0, 0,
252 0, 0, 0, 0, 0, 146, 0, 0, 0, 0,
253 18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
254 0, 0, 124, 0, 0, 0, 0, 0, 0, 0,
255 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
256 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
257 50, 0, 0, 0, 0, 0, 0, 0, 0, 0,
258 0, 0, 0, 0, 0, 0, 0, 0,
260 static const short yygindex[] = { 0,
261 0, 0, 0, 121, 133, 0, 0, 0, 0, 0,
262 0, 0, 106, 0, 0, 93, 0, 32, 84, -45,
265 #define YYTABLESIZE 419
266 static const short yytable[] = { 57,
267 83, 84, 90, 56, 131, 118, 91, 129, 25, 57,
268 120, 24, 33, 46, 56, 55, 56, 81, 33, 135,
269 57, 85, 57, 57, 33, 57, 55, 45, 55, 57,
270 57, 57, 57, 3, 77, 57, 57, 46, 133, 46,
271 14, 45, 33, 46, 46, 79, 15, 46, 33, 46,
272 46, 45, 57, 45, 33, 25, 43, 45, 45, 42,
273 58, 25, 136, 45, 45, 24, 68, 25, 27, 33,
274 28, 58, 33, 58, 54, 81, 69, 30, 36, 134,
275 57, 29, 43, 30, 67, 42, 30, 43, 72, 78,
276 42, 31, 76, 43, 46, 32, 42, 33, 78, 33,
277 34, 33, 33, 5, 6, 7, 86, 87, 45, 8,
278 124, 125, 25, 57, 38, 25, 39, 5, 5, 5,
279 73, 40, 78, 5, 13, 13, 13, 46, 41, 42,
280 13, 33, 43, 3, 3, 3, 44, 75, 126, 3,
281 46, 45, 17, 18, 19, 20, 21, 22, 122, 123,
282 58, 127, 132, 41, 137, 38, 49, 138, 37, 70,
283 88, 121, 92, 0, 0, 0, 0, 0, 0, 93,
284 43, 0, 0, 42, 0, 0, 0, 70, 0, 0,
285 0, 0, 0, 0, 94, 95, 96, 97, 98, 99,
286 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
287 110, 111, 112, 113, 114, 115, 116, 117, 0, 0,
288 0, 0, 0, 0, 0, 0, 68, 0, 0, 0,
289 0, 0, 0, 0, 0, 89, 51, 0, 0, 0,
290 0, 0, 52, 0, 33, 33, 50, 51, 0, 51,
291 0, 33, 33, 52, 53, 52, 57, 0, 0, 0,
292 0, 0, 57, 0, 0, 0, 0, 0, 82, 0,
293 46, 130, 128, 0, 33, 33, 46, 80, 0, 0,
294 0, 33, 33, 0, 45, 0, 0, 25, 25, 0,
295 45, 0, 0, 0, 25, 25, 0, 57, 0, 57,
296 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
297 0, 46, 93, 0, 0, 0, 0, 0, 0, 0,
298 0, 0, 0, 0, 0, 45, 0, 94, 95, 96,
299 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
300 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
301 117, 70, 0, 0, 0, 0, 0, 0, 0, 0,
302 0, 0, 0, 0, 0, 0, 70, 70, 70, 70,
303 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
304 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
305 68, 0, 0, 0, 0, 0, 0, 0, 0, 0,
306 0, 0, 0, 0, 0, 68, 68, 68, 68, 68,
307 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
308 68, 68, 68, 68, 68, 68, 68, 68, 68,
310 static const short yycheck[] = { 10,
311 42, 43, 34, 34, 44, 93, 41, 44, 0, 40,
312 36, 60, 34, 10, 34, 46, 34, 63, 40, 258,
313 40, 63, 40, 34, 46, 36, 46, 10, 46, 40,
314 41, 42, 43, 256, 36, 46, 47, 34, 258, 36,
315 256, 256, 34, 40, 41, 47, 262, 262, 40, 46,
316 47, 34, 63, 36, 46, 34, 10, 40, 41, 10,
317 91, 40, 301, 46, 47, 60, 44, 46, 262, 91,
318 61, 91, 94, 91, 94, 121, 125, 256, 123, 299,
319 91, 61, 36, 262, 62, 36, 61, 41, 57, 124,
320 41, 61, 61, 47, 91, 61, 47, 61, 124, 91,
321 42, 123, 94, 259, 260, 261, 296, 297, 91, 265,
322 86, 87, 91, 124, 262, 94, 262, 259, 260, 261,
323 94, 262, 124, 265, 259, 260, 261, 124, 262, 262,
324 265, 123, 262, 259, 260, 261, 62, 10, 93, 265,
325 262, 124, 266, 267, 268, 269, 270, 271, 258, 258,
326 91, 45, 257, 10, 299, 10, 36, 301, 26, 54,
327 68, 78, 73, -1, -1, -1, -1, -1, -1, 257,
328 124, -1, -1, 124, -1, -1, -1, 93, -1, -1,
329 -1, -1, -1, -1, 272, 273, 274, 275, 276, 277,
330 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
331 288, 289, 290, 291, 292, 293, 294, 295, -1, -1,
332 -1, -1, -1, -1, -1, -1, 93, -1, -1, -1,
333 -1, -1, -1, -1, -1, 257, 257, -1, -1, -1,
334 -1, -1, 263, -1, 256, 257, 256, 257, -1, 257,
335 -1, 263, 264, 263, 264, 263, 257, -1, -1, -1,
336 -1, -1, 263, -1, -1, -1, -1, -1, 300, -1,
337 257, 301, 299, -1, 256, 257, 263, 298, -1, -1,
338 -1, 263, 264, -1, 257, -1, -1, 256, 257, -1,
339 263, -1, -1, -1, 263, 264, -1, 298, -1, 300,
340 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
341 -1, 298, 257, -1, -1, -1, -1, -1, -1, -1,
342 -1, -1, -1, -1, -1, 298, -1, 272, 273, 274,
343 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
344 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
345 295, 257, -1, -1, -1, -1, -1, -1, -1, -1,
346 -1, -1, -1, -1, -1, -1, 272, 273, 274, 275,
347 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
348 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
349 257, -1, -1, -1, -1, -1, -1, -1, -1, -1,
350 -1, -1, -1, -1, -1, 272, 273, 274, 275, 276,
351 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
352 287, 288, 289, 290, 291, 292, 293, 294, 295,
358 #define YYMAXTOKEN 301
360 static const char *yyname[] = {
362 "end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
363 0,0,0,"'\"'",0,"'$'",0,0,0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,
364 0,0,0,0,0,0,0,0,0,0,"'<'","'='","'>'","'?'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
365 0,0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
366 0,0,0,0,0,0,0,"'{'","'|'","'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
367 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
368 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
369 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"CHAR","NUMBER","SECTEND",
370 "SCDECL","XSCDECL","NAME","PREVCCL","EOF_OP","OPTION_OP","OPT_OUTFILE",
371 "OPT_PREFIX","OPT_YYCLASS","OPT_HEADER","OPT_EXTRA_TYPE","OPT_TABLES",
372 "CCE_ALNUM","CCE_ALPHA","CCE_BLANK","CCE_CNTRL","CCE_DIGIT","CCE_GRAPH",
373 "CCE_LOWER","CCE_PRINT","CCE_PUNCT","CCE_SPACE","CCE_UPPER","CCE_XDIGIT",
374 "CCE_NEG_ALNUM","CCE_NEG_ALPHA","CCE_NEG_BLANK","CCE_NEG_CNTRL","CCE_NEG_DIGIT",
375 "CCE_NEG_GRAPH","CCE_NEG_LOWER","CCE_NEG_PRINT","CCE_NEG_PUNCT","CCE_NEG_SPACE",
376 "CCE_NEG_UPPER","CCE_NEG_XDIGIT","CCL_OP_DIFF","CCL_OP_UNION",
377 "BEGIN_REPEAT_POSIX","END_REPEAT_POSIX","BEGIN_REPEAT_FLEX","END_REPEAT_FLEX",
379 static const char *yyrule[] = {
381 "goal : initlex sect1 sect1end sect2 initforrule",
383 "sect1 : sect1 startconddecl namelist1",
384 "sect1 : sect1 options",
387 "sect1end : SECTEND",
388 "startconddecl : SCDECL",
389 "startconddecl : XSCDECL",
390 "namelist1 : namelist1 NAME",
393 "options : OPTION_OP optionlist",
394 "optionlist : optionlist option",
396 "option : OPT_OUTFILE '=' NAME",
397 "option : OPT_EXTRA_TYPE '=' NAME",
398 "option : OPT_PREFIX '=' NAME",
399 "option : OPT_YYCLASS '=' NAME",
400 "option : OPT_HEADER '=' NAME",
401 "option : OPT_TABLES '=' NAME",
402 "sect2 : sect2 scon initforrule flexrule '\\n'",
403 "sect2 : sect2 scon '{' sect2 '}'",
406 "flexrule : '^' rule",
411 "scon : '<' scon_stk_ptr namelist2 '>'",
412 "scon : '<' '*' '>'",
414 "namelist2 : namelist2 ',' sconname",
415 "namelist2 : sconname",
422 "re : re '|' series",
425 "series : series singleton",
426 "series : singleton",
427 "series : series BEGIN_REPEAT_POSIX NUMBER ',' NUMBER END_REPEAT_POSIX",
428 "series : series BEGIN_REPEAT_POSIX NUMBER ',' END_REPEAT_POSIX",
429 "series : series BEGIN_REPEAT_POSIX NUMBER END_REPEAT_POSIX",
430 "singleton : singleton '*'",
431 "singleton : singleton '+'",
432 "singleton : singleton '?'",
433 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' NUMBER END_REPEAT_FLEX",
434 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' END_REPEAT_FLEX",
435 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER END_REPEAT_FLEX",
437 "singleton : fullccl",
438 "singleton : PREVCCL",
439 "singleton : '\"' string '\"'",
440 "singleton : '(' re ')'",
442 "fullccl : fullccl CCL_OP_DIFF braceccl",
443 "fullccl : fullccl CCL_OP_UNION braceccl",
444 "fullccl : braceccl",
445 "braceccl : '[' ccl ']'",
446 "braceccl : '[' '^' ccl ']'",
447 "ccl : ccl CHAR '-' CHAR",
449 "ccl : ccl ccl_expr",
451 "ccl_expr : CCE_ALNUM",
452 "ccl_expr : CCE_ALPHA",
453 "ccl_expr : CCE_BLANK",
454 "ccl_expr : CCE_CNTRL",
455 "ccl_expr : CCE_DIGIT",
456 "ccl_expr : CCE_GRAPH",
457 "ccl_expr : CCE_LOWER",
458 "ccl_expr : CCE_PRINT",
459 "ccl_expr : CCE_PUNCT",
460 "ccl_expr : CCE_SPACE",
461 "ccl_expr : CCE_XDIGIT",
462 "ccl_expr : CCE_UPPER",
463 "ccl_expr : CCE_NEG_ALNUM",
464 "ccl_expr : CCE_NEG_ALPHA",
465 "ccl_expr : CCE_NEG_BLANK",
466 "ccl_expr : CCE_NEG_CNTRL",
467 "ccl_expr : CCE_NEG_DIGIT",
468 "ccl_expr : CCE_NEG_GRAPH",
469 "ccl_expr : CCE_NEG_PRINT",
470 "ccl_expr : CCE_NEG_PUNCT",
471 "ccl_expr : CCE_NEG_SPACE",
472 "ccl_expr : CCE_NEG_XDIGIT",
473 "ccl_expr : CCE_NEG_LOWER",
474 "ccl_expr : CCE_NEG_UPPER",
475 "string : string CHAR",
489 /* define the initial stack-sizes */
492 #define YYMAXDEPTH YYSTACKSIZE
495 #define YYSTACKSIZE YYMAXDEPTH
497 #define YYSTACKSIZE 500
498 #define YYMAXDEPTH 500
502 #define YYINITSTACKSIZE 500
512 /* variables for the parser stack */
513 static YYSTACKDATA yystack;
517 /* build_eof_action - build the "<<EOF>>" action for the active start
521 void build_eof_action()
524 char action_text[MAXLINE];
526 for ( i = 1; i <= scon_stk_ptr; ++i )
528 if ( sceof[scon_stk[i]] )
529 format_pinpoint_message(
530 "multiple <<EOF>> rules for start condition %s",
531 scname[scon_stk[i]] );
535 sceof[scon_stk[i]] = true;
537 if (previous_continued_action /* && previous action was regular */)
538 add_action("YY_RULE_SETUP\n");
540 snprintf( action_text, sizeof(action_text), "case YY_STATE_EOF(%s):\n",
541 scname[scon_stk[i]] );
542 add_action( action_text );
546 line_directive_out( (FILE *) 0, 1 );
548 /* This isn't a normal rule after all - don't count it as
549 * such, so we don't have any holes in the rule numbering
550 * (which make generating "rule can never match" warnings
558 /* format_synerr - write out formatted syntax error */
560 void format_synerr( msg, arg )
561 const char *msg, arg[];
563 char errmsg[MAXLINE];
565 (void) snprintf( errmsg, sizeof(errmsg), msg, arg );
570 /* synerr - report a syntax error */
576 pinpoint_message( str );
580 /* format_warn - write out formatted warning */
582 void format_warn( msg, arg )
583 const char *msg, arg[];
585 char warn_msg[MAXLINE];
587 snprintf( warn_msg, sizeof(warn_msg), msg, arg );
592 /* warn - report a warning, unless -w was given */
597 line_warning( str, linenum );
600 /* format_pinpoint_message - write out a message formatted with one string,
601 * pinpointing its location
604 void format_pinpoint_message( msg, arg )
605 const char *msg, arg[];
607 char errmsg[MAXLINE];
609 snprintf( errmsg, sizeof(errmsg), msg, arg );
610 pinpoint_message( errmsg );
614 /* pinpoint_message - write out a message, pinpointing its location */
616 void pinpoint_message( str )
619 line_pinpoint( str, linenum );
623 /* line_warning - report a warning at a given line, unless -w was given */
625 void line_warning( str, line )
629 char warning[MAXLINE];
633 snprintf( warning, sizeof(warning), "warning, %s", str );
634 line_pinpoint( warning, line );
639 /* line_pinpoint - write out a message, pinpointing it at the given line */
641 void line_pinpoint( str, line )
645 fprintf( stderr, "%s:%d: %s\n", infilename, line, str );
649 /* yyerror - eat up an error message from the parser;
650 * currently, messages are ignore
660 #include <stdio.h> /* needed for printf */
663 #include <stdlib.h> /* needed for malloc, etc */
664 #include <string.h> /* needed for memset */
666 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
667 static int yygrowstack(YYSTACKDATA *data)
674 if ((newsize = data->stacksize) == 0)
675 newsize = YYINITSTACKSIZE;
676 else if (newsize >= YYMAXDEPTH)
678 else if ((newsize *= 2) > YYMAXDEPTH)
679 newsize = YYMAXDEPTH;
681 i = data->s_mark - data->s_base;
682 newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
686 data->s_base = newss;
687 data->s_mark = newss + i;
689 newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
693 data->l_base = newvs;
694 data->l_mark = newvs + i;
696 data->stacksize = newsize;
697 data->s_last = data->s_base + newsize - 1;
701 #if YYPURE || defined(YY_NO_LEAKS)
702 static void yyfreestack(YYSTACKDATA *data)
706 memset(data, 0, sizeof(*data));
709 #define yyfreestack(data) /* nothing */
712 #define YYABORT goto yyabort
713 #define YYREJECT goto yyabort
714 #define YYACCEPT goto yyaccept
715 #define YYERROR goto yyerrlab
720 int yym, yyn, yystate;
724 if ((yys = getenv("YYDEBUG")) != 0)
727 if (yyn >= '0' && yyn <= '9')
738 memset(&yystack, 0, sizeof(yystack));
741 if (yystack.s_base == NULL && yygrowstack(&yystack)) goto yyoverflow;
742 yystack.s_mark = yystack.s_base;
743 yystack.l_mark = yystack.l_base;
748 if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
751 if ((yychar = YYLEX) < 0) yychar = 0;
756 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
757 if (!yys) yys = "illegal-symbol";
758 printf("%sdebug: state %d, reading %d (%s)\n",
759 YYPREFIX, yystate, yychar, yys);
763 if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
764 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
768 printf("%sdebug: state %d, shifting to state %d\n",
769 YYPREFIX, yystate, yytable[yyn]);
771 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
775 yystate = yytable[yyn];
776 *++yystack.s_mark = yytable[yyn];
777 *++yystack.l_mark = yylval;
779 if (yyerrflag > 0) --yyerrflag;
782 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
783 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
788 if (yyerrflag) goto yyinrecovery;
790 yyerror("syntax error");
803 if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 &&
804 yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
808 printf("%sdebug: state %d, error recovery shifting\
809 to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
811 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
815 yystate = yytable[yyn];
816 *++yystack.s_mark = yytable[yyn];
817 *++yystack.l_mark = yylval;
824 printf("%sdebug: error recovery discarding state %d\n",
825 YYPREFIX, *yystack.s_mark);
827 if (yystack.s_mark <= yystack.s_base) goto yyabort;
835 if (yychar == 0) goto yyabort;
840 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
841 if (!yys) yys = "illegal-symbol";
842 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
843 YYPREFIX, yystate, yychar, yys);
853 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
854 YYPREFIX, yystate, yyn, yyrule[yyn]);
858 yyval = yystack.l_mark[1-yym];
860 memset(&yyval, 0, sizeof yyval);
865 { /* add default rule */
871 def_rule = mkstate( -pat );
873 /* Remember the number of the default rule so we
874 * don't generate "can't match" warnings for it.
876 default_rule = num_rules;
878 finish_rule( def_rule, false, 0, 0, 0);
880 for ( i = 1; i <= lastsc; ++i )
881 scset[i] = mkbranch( scset[i], def_rule );
885 "YY_FATAL_ERROR( \"flex scanner jammed\" )" );
887 add_action( "ECHO" );
889 add_action( ";\n\tYY_BREAK\n" );
894 { /* initialize for processing rules */
896 /* Create default DFA start condition. */
897 scinstal( "INITIAL", false );
902 { synerr( _("unknown error processing section 1") ); }
908 scon_stk = allocate_integer_array( lastsc + 1 );
922 { scinstal( nmstr, xcluflg ); }
926 { scinstal( nmstr, xcluflg ); }
930 { synerr( _("bad start condition list") ); }
935 outfilename = copy_string( nmstr );
941 { extra_type = copy_string( nmstr ); }
945 { prefix = copy_string( nmstr ); }
949 { yyclass = copy_string( nmstr ); }
953 { headerfilename = copy_string( nmstr ); }
957 { tablesext = true; tablesfilename = copy_string( nmstr ); }
961 { scon_stk_ptr = yystack.l_mark[-3]; }
965 { scon_stk_ptr = yystack.l_mark[-3]; }
970 /* Initialize for a parse of one rule. */
971 trlcontxt = variable_trail_rule = varlength = false;
972 trailcnt = headcnt = rulelen = 0;
973 current_state_type = STATE_NORMAL;
974 previous_continued_action = continued_action;
983 pat = yystack.l_mark[0];
984 finish_rule( pat, variable_trail_rule,
985 headcnt, trailcnt , previous_continued_action);
987 if ( scon_stk_ptr > 0 )
989 for ( i = 1; i <= scon_stk_ptr; ++i )
991 mkbranch( scbol[scon_stk[i]],
997 /* Add to all non-exclusive start conditions,
998 * including the default (0) start condition.
1001 for ( i = 1; i <= lastsc; ++i )
1003 scbol[i] = mkbranch( scbol[i],
1011 if ( performance_report > 1 )
1013 "'^' operator results in sub-optimal performance" );
1020 pat = yystack.l_mark[0];
1021 finish_rule( pat, variable_trail_rule,
1022 headcnt, trailcnt , previous_continued_action);
1024 if ( scon_stk_ptr > 0 )
1026 for ( i = 1; i <= scon_stk_ptr; ++i )
1027 scset[scon_stk[i]] =
1028 mkbranch( scset[scon_stk[i]],
1034 for ( i = 1; i <= lastsc; ++i )
1045 if ( scon_stk_ptr > 0 )
1050 /* This EOF applies to all start conditions
1051 * which don't already have EOF actions.
1053 for ( i = 1; i <= lastsc; ++i )
1055 scon_stk[++scon_stk_ptr] = i;
1057 if ( scon_stk_ptr == 0 )
1059 "all start conditions already have <<EOF>> rules" );
1068 { synerr( _("unrecognized rule") ); }
1072 { yyval = scon_stk_ptr; }
1076 { yyval = yystack.l_mark[-2]; }
1081 yyval = scon_stk_ptr;
1083 for ( i = 1; i <= lastsc; ++i )
1087 for ( j = 1; j <= scon_stk_ptr; ++j )
1088 if ( scon_stk[j] == i )
1091 if ( j > scon_stk_ptr )
1092 scon_stk[++scon_stk_ptr] = i;
1098 { yyval = scon_stk_ptr; }
1102 { synerr( _("bad start condition list") ); }
1107 if ( (scnum = sclookup( nmstr )) == 0 )
1108 format_pinpoint_message(
1109 "undeclared start condition %s",
1113 for ( i = 1; i <= scon_stk_ptr; ++i )
1114 if ( scon_stk[i] == scnum )
1117 "<%s> specified twice",
1122 if ( i > scon_stk_ptr )
1123 scon_stk[++scon_stk_ptr] = scnum;
1130 if ( transchar[lastst[yystack.l_mark[0]]] != SYM_EPSILON )
1131 /* Provide final transition \now/ so it
1132 * will be marked as a trailing context
1135 yystack.l_mark[0] = link_machines( yystack.l_mark[0],
1136 mkstate( SYM_EPSILON ) );
1138 mark_beginning_as_normal( yystack.l_mark[0] );
1139 current_state_type = STATE_NORMAL;
1141 if ( previous_continued_action )
1143 /* We need to treat this as variable trailing
1144 * context so that the backup does not happen
1145 * in the action but before the action switch
1146 * statement. If the backup happens in the
1147 * action, then the rules "falling into" this
1148 * one's action will *also* do the backup,
1151 if ( ! varlength || headcnt != 0 )
1153 "trailing context made variable due to preceding '|' action" );
1155 /* Mark as variable. */
1161 if ( lex_compat || (varlength && headcnt == 0) )
1162 { /* variable trailing context rule */
1163 /* Mark the first part of the rule as the
1164 * accepting "head" part of a trailing
1167 * By the way, we didn't do this at the
1168 * beginning of this production because back
1169 * then current_state_type was set up for a
1170 * trail rule, and add_accept() can create
1173 add_accept( yystack.l_mark[-1],
1174 num_rules | YY_TRAILING_HEAD_MASK );
1175 variable_trail_rule = true;
1181 yyval = link_machines( yystack.l_mark[-1], yystack.l_mark[0] );
1186 { synerr( _("trailing context used twice") ); }
1196 current_state_type = STATE_TRAILING_CONTEXT;
1200 synerr( _("trailing context used twice") );
1201 yyval = mkstate( SYM_EPSILON );
1204 else if ( previous_continued_action )
1206 /* See the comment in the rule for "re2 re"
1210 "trailing context made variable due to preceding '|' action" );
1215 if ( lex_compat || varlength )
1217 /* Again, see the comment in the rule for
1220 add_accept( yystack.l_mark[-1],
1221 num_rules | YY_TRAILING_HEAD_MASK );
1222 variable_trail_rule = true;
1227 eps = mkstate( SYM_EPSILON );
1228 yyval = link_machines( yystack.l_mark[-1],
1229 link_machines( eps, mkstate( '\n' ) ) );
1235 yyval = yystack.l_mark[0];
1239 if ( lex_compat || (varlength && headcnt == 0) )
1240 /* Both head and trail are
1243 variable_trail_rule = true;
1253 yyval = mkor( yystack.l_mark[-2], yystack.l_mark[0] );
1258 { yyval = yystack.l_mark[0]; }
1263 /* This rule is written separately so the
1264 * reduction will occur before the trailing
1269 synerr( _("trailing context used twice") );
1274 /* We hope the trailing context is
1283 current_state_type = STATE_TRAILING_CONTEXT;
1284 yyval = yystack.l_mark[-1];
1290 /* This is where concatenation of adjacent patterns
1293 yyval = link_machines( yystack.l_mark[-1], yystack.l_mark[0] );
1298 { yyval = yystack.l_mark[0]; }
1305 if ( yystack.l_mark[-3] > yystack.l_mark[-1] || yystack.l_mark[-3] < 0 )
1307 synerr( _("bad iteration values") );
1308 yyval = yystack.l_mark[-5];
1312 if ( yystack.l_mark[-3] == 0 )
1314 if ( yystack.l_mark[-1] <= 0 )
1317 _("bad iteration values") );
1318 yyval = yystack.l_mark[-5];
1322 mkrep( yystack.l_mark[-5], 1, yystack.l_mark[-1] ) );
1325 yyval = mkrep( yystack.l_mark[-5], yystack.l_mark[-3], yystack.l_mark[-1] );
1334 if ( yystack.l_mark[-2] <= 0 )
1336 synerr( _("iteration value must be positive") );
1337 yyval = yystack.l_mark[-4];
1341 yyval = mkrep( yystack.l_mark[-4], yystack.l_mark[-2], INFINITE_REPEAT );
1347 /* The series could be something like "(foo)",
1348 * in which case we have no idea what its length
1349 * is, so we punt here.
1353 if ( yystack.l_mark[-1] <= 0 )
1355 synerr( _("iteration value must be positive")
1357 yyval = yystack.l_mark[-3];
1361 yyval = link_machines( yystack.l_mark[-3],
1362 copysingl( yystack.l_mark[-3], yystack.l_mark[-1] - 1 ) );
1370 yyval = mkclos( yystack.l_mark[-1] );
1377 yyval = mkposcl( yystack.l_mark[-1] );
1384 yyval = mkopt( yystack.l_mark[-1] );
1392 if ( yystack.l_mark[-3] > yystack.l_mark[-1] || yystack.l_mark[-3] < 0 )
1394 synerr( _("bad iteration values") );
1395 yyval = yystack.l_mark[-5];
1399 if ( yystack.l_mark[-3] == 0 )
1401 if ( yystack.l_mark[-1] <= 0 )
1404 _("bad iteration values") );
1405 yyval = yystack.l_mark[-5];
1409 mkrep( yystack.l_mark[-5], 1, yystack.l_mark[-1] ) );
1412 yyval = mkrep( yystack.l_mark[-5], yystack.l_mark[-3], yystack.l_mark[-1] );
1421 if ( yystack.l_mark[-2] <= 0 )
1423 synerr( _("iteration value must be positive") );
1424 yyval = yystack.l_mark[-4];
1428 yyval = mkrep( yystack.l_mark[-4], yystack.l_mark[-2], INFINITE_REPEAT );
1434 /* The singleton could be something like "(foo)",
1435 * in which case we have no idea what its length
1436 * is, so we punt here.
1440 if ( yystack.l_mark[-1] <= 0 )
1442 synerr( _("iteration value must be positive") );
1443 yyval = yystack.l_mark[-3];
1447 yyval = link_machines( yystack.l_mark[-3],
1448 copysingl( yystack.l_mark[-3], yystack.l_mark[-1] - 1 ) );
1456 /* Create the '.' character class. */
1458 ccladd( ccldot, '\n' );
1459 cclnegate( ccldot );
1462 mkeccl( ccltbl + cclmap[ccldot],
1463 ccllen[ccldot], nextecm,
1464 ecgroup, csize, csize );
1466 /* Create the (?s:'.') character class. */
1468 cclnegate( cclany );
1471 mkeccl( ccltbl + cclmap[cclany],
1472 ccllen[cclany], nextecm,
1473 ecgroup, csize, csize );
1481 yyval = mkstate( -cclany );
1483 yyval = mkstate( -ccldot );
1489 /* Sort characters for fast searching.
1491 qsort( ccltbl + cclmap[yystack.l_mark[0]], ccllen[yystack.l_mark[0]], sizeof (*ccltbl), cclcmp );
1494 mkeccl( ccltbl + cclmap[yystack.l_mark[0]], ccllen[yystack.l_mark[0]],
1495 nextecm, ecgroup, csize, csize );
1499 if (ccl_has_nl[yystack.l_mark[0]])
1500 rule_has_nl[num_rules] = true;
1502 yyval = mkstate( -yystack.l_mark[0] );
1510 if (ccl_has_nl[yystack.l_mark[0]])
1511 rule_has_nl[num_rules] = true;
1513 yyval = mkstate( -yystack.l_mark[0] );
1518 { yyval = yystack.l_mark[-1]; }
1522 { yyval = yystack.l_mark[-1]; }
1529 if (yystack.l_mark[0] == nlch)
1530 rule_has_nl[num_rules] = true;
1532 if (sf_case_ins() && has_case(yystack.l_mark[0]))
1533 /* create an alternation, as in (a|A) */
1534 yyval = mkor (mkstate(yystack.l_mark[0]), mkstate(reverse_case(yystack.l_mark[0])));
1536 yyval = mkstate( yystack.l_mark[0] );
1541 { yyval = ccl_set_diff (yystack.l_mark[-2], yystack.l_mark[0]); }
1545 { yyval = ccl_set_union (yystack.l_mark[-2], yystack.l_mark[0]); }
1549 { yyval = yystack.l_mark[-1]; }
1554 cclnegate( yystack.l_mark[-1] );
1555 yyval = yystack.l_mark[-1];
1565 /* If one end of the range has case and the other
1566 * does not, or the cases are different, then we're not
1567 * sure what range the user is trying to express.
1568 * Examples: [@-z] or [S-t]
1570 if (has_case (yystack.l_mark[-2]) != has_case (yystack.l_mark[0])
1571 || (has_case (yystack.l_mark[-2]) && (b_islower (yystack.l_mark[-2]) != b_islower (yystack.l_mark[0])))
1572 || (has_case (yystack.l_mark[-2]) && (b_isupper (yystack.l_mark[-2]) != b_isupper (yystack.l_mark[0]))))
1574 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
1575 yystack.l_mark[-2], yystack.l_mark[0]);
1577 /* If the range spans uppercase characters but not
1578 * lowercase (or vice-versa), then should we automatically
1579 * include lowercase characters in the range?
1580 * Example: [@-_] spans [a-z] but not [A-Z]
1582 else if (!has_case (yystack.l_mark[-2]) && !has_case (yystack.l_mark[0]) && !range_covers_case (yystack.l_mark[-2], yystack.l_mark[0]))
1584 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
1585 yystack.l_mark[-2], yystack.l_mark[0]);
1588 if ( yystack.l_mark[-2] > yystack.l_mark[0] )
1589 synerr( _("negative range in character class") );
1593 for ( i = yystack.l_mark[-2]; i <= yystack.l_mark[0]; ++i )
1594 ccladd( yystack.l_mark[-3], i );
1596 /* Keep track if this ccl is staying in
1597 * alphabetical order.
1599 cclsorted = cclsorted && (yystack.l_mark[-2] > lastchar);
1600 lastchar = yystack.l_mark[0];
1602 /* Do it again for upper/lowercase */
1603 if (sf_case_ins() && has_case(yystack.l_mark[-2]) && has_case(yystack.l_mark[0])){
1604 yystack.l_mark[-2] = reverse_case (yystack.l_mark[-2]);
1605 yystack.l_mark[0] = reverse_case (yystack.l_mark[0]);
1607 for ( i = yystack.l_mark[-2]; i <= yystack.l_mark[0]; ++i )
1608 ccladd( yystack.l_mark[-3], i );
1610 cclsorted = cclsorted && (yystack.l_mark[-2] > lastchar);
1611 lastchar = yystack.l_mark[0];
1616 yyval = yystack.l_mark[-3];
1622 ccladd( yystack.l_mark[-1], yystack.l_mark[0] );
1623 cclsorted = cclsorted && (yystack.l_mark[0] > lastchar);
1624 lastchar = yystack.l_mark[0];
1626 /* Do it again for upper/lowercase */
1627 if (sf_case_ins() && has_case(yystack.l_mark[0])){
1628 yystack.l_mark[0] = reverse_case (yystack.l_mark[0]);
1629 ccladd (yystack.l_mark[-1], yystack.l_mark[0]);
1631 cclsorted = cclsorted && (yystack.l_mark[0] > lastchar);
1632 lastchar = yystack.l_mark[0];
1635 yyval = yystack.l_mark[-1];
1641 /* Too hard to properly maintain cclsorted. */
1643 yyval = yystack.l_mark[-1];
1651 currccl = yyval = cclinit();
1656 { CCL_EXPR(isalnum); }
1660 { CCL_EXPR(isalpha); }
1664 { CCL_EXPR(IS_BLANK); }
1668 { CCL_EXPR(iscntrl); }
1672 { CCL_EXPR(isdigit); }
1676 { CCL_EXPR(isgraph); }
1688 { CCL_EXPR(isprint); }
1692 { CCL_EXPR(ispunct); }
1696 { CCL_EXPR(isspace); }
1700 { CCL_EXPR(isxdigit); }
1712 { CCL_NEG_EXPR(isalnum); }
1716 { CCL_NEG_EXPR(isalpha); }
1720 { CCL_NEG_EXPR(IS_BLANK); }
1724 { CCL_NEG_EXPR(iscntrl); }
1728 { CCL_NEG_EXPR(isdigit); }
1732 { CCL_NEG_EXPR(isgraph); }
1736 { CCL_NEG_EXPR(isprint); }
1740 { CCL_NEG_EXPR(ispunct); }
1744 { CCL_NEG_EXPR(isspace); }
1748 { CCL_NEG_EXPR(isxdigit); }
1753 if ( sf_case_ins() )
1754 warn(_("[:^lower:] is ambiguous in case insensitive scanner"));
1756 CCL_NEG_EXPR(islower);
1762 if ( sf_case_ins() )
1763 warn(_("[:^upper:] ambiguous in case insensitive scanner"));
1765 CCL_NEG_EXPR(isupper);
1771 if ( yystack.l_mark[0] == nlch )
1772 rule_has_nl[num_rules] = true;
1776 if (sf_case_ins() && has_case(yystack.l_mark[0]))
1777 yyval = mkor (mkstate(yystack.l_mark[0]), mkstate(reverse_case(yystack.l_mark[0])));
1779 yyval = mkstate (yystack.l_mark[0]);
1781 yyval = link_machines( yystack.l_mark[-1], yyval);
1786 { yyval = mkstate( SYM_EPSILON ); }
1788 #line 1787 "parse.c"
1790 yystack.s_mark -= yym;
1791 yystate = *yystack.s_mark;
1792 yystack.l_mark -= yym;
1794 if (yystate == 0 && yym == 0)
1798 printf("%sdebug: after reduction, shifting from state 0 to\
1799 state %d\n", YYPREFIX, YYFINAL);
1802 *++yystack.s_mark = YYFINAL;
1803 *++yystack.l_mark = yyval;
1806 if ((yychar = YYLEX) < 0) yychar = 0;
1811 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
1812 if (!yys) yys = "illegal-symbol";
1813 printf("%sdebug: state %d, reading %d (%s)\n",
1814 YYPREFIX, YYFINAL, yychar, yys);
1818 if (yychar == 0) goto yyaccept;
1821 if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
1822 yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
1823 yystate = yytable[yyn];
1825 yystate = yydgoto[yym];
1828 printf("%sdebug: after reduction, shifting from state %d \
1829 to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
1831 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
1835 *++yystack.s_mark = (short) yystate;
1836 *++yystack.l_mark = yyval;
1840 yyerror("yacc stack overflow");
1843 yyfreestack(&yystack);
1847 yyfreestack(&yystack);