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 /* SPDX-License-Identifier: BSD-2-Clause */
22 /* Copyright (c) 1990 The Regents of the University of California. */
23 /* All rights reserved. */
25 /* This code is derived from software contributed to Berkeley by */
28 /* The United States Government has rights in this work pursuant */
29 /* to contract no. DE-AC03-76SF00098 between the United States */
30 /* Department of Energy and the University of California. */
32 /* This file is part of flex. */
34 /* Redistribution and use in source and binary forms, with or without */
35 /* modification, are permitted provided that the following conditions */
38 /* 1. Redistributions of source code must retain the above copyright */
39 /* notice, this list of conditions and the following disclaimer. */
40 /* 2. Redistributions in binary form must reproduce the above copyright */
41 /* notice, this list of conditions and the following disclaimer in the */
42 /* documentation and/or other materials provided with the distribution. */
44 /* Neither the name of the University nor the names of its contributors */
45 /* may be used to endorse or promote products derived from this software */
46 /* without specific prior written permission. */
48 /* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
49 /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
50 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
56 int pat, scnum, eps, headcnt, trailcnt, lastchar, i, rulelen;
57 int trlcontxt, xcluflg, currccl, cclsorted, varlength, variable_trail_rule;
62 static int madeany = false; /* whether we've made the '.' character class */
63 static int ccldot, cclany;
64 int previous_continued_action; /* whether the previous rule's action was '|' */
66 #define format_warn3(fmt, a1, a2) \
68 char fw3_msg[MAXLINE];\
69 snprintf( fw3_msg, MAXLINE,(fmt), (a1), (a2) );\
73 /* Expand a POSIX character class expression. */
74 #define CCL_EXPR(func) \
77 for ( c = 0; c < csize; ++c ) \
78 if ( isascii(c) && func(c) ) \
79 ccladd( currccl, c ); \
83 #define CCL_NEG_EXPR(func) \
86 for ( c = 0; c < csize; ++c ) \
88 ccladd( currccl, c ); \
91 /* While POSIX defines isblank(), it's not ANSI C. */
92 #define IS_BLANK(c) ((c) == ' ' || (c) == '\t')
94 /* On some over-ambitious machines, such as DEC Alpha's, the default
95 * token type is "long" instead of "int"; this leads to problems with
96 * declaring yylval in flexdef.h. But so far, all the yacc's I've seen
97 * wrap their definitions of YYSTYPE with "#ifndef YYSTYPE"'s, so the
98 * following should ensure that the default token type is "int".
108 /* compatibility with bison */
110 /* compatibility with FreeBSD */
111 # ifdef YYPARSE_PARAM_TYPE
112 # define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
114 # define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
117 # define YYPARSE_DECL() yyparse(void)
120 /* Parameters sent to lex. */
122 # define YYLEX_DECL() yylex(void *YYLEX_PARAM)
123 # define YYLEX yylex(YYLEX_PARAM)
125 # define YYLEX_DECL() yylex(void)
126 # define YYLEX yylex()
129 /* Parameters sent to yyerror. */
131 #define YYERROR_DECL() yyerror(const char *s)
134 #define YYERROR_CALL(msg) yyerror(msg)
137 extern int YYPARSE_DECL();
147 #define OPTION_OP 265
148 #define OPT_OUTFILE 266
149 #define OPT_PREFIX 267
150 #define OPT_YYCLASS 268
151 #define OPT_HEADER 269
152 #define OPT_EXTRA_TYPE 270
153 #define OPT_TABLES 271
154 #define CCE_ALNUM 272
155 #define CCE_ALPHA 273
156 #define CCE_BLANK 274
157 #define CCE_CNTRL 275
158 #define CCE_DIGIT 276
159 #define CCE_GRAPH 277
160 #define CCE_LOWER 278
161 #define CCE_PRINT 279
162 #define CCE_PUNCT 280
163 #define CCE_SPACE 281
164 #define CCE_UPPER 282
165 #define CCE_XDIGIT 283
166 #define CCE_NEG_ALNUM 284
167 #define CCE_NEG_ALPHA 285
168 #define CCE_NEG_BLANK 286
169 #define CCE_NEG_CNTRL 287
170 #define CCE_NEG_DIGIT 288
171 #define CCE_NEG_GRAPH 289
172 #define CCE_NEG_LOWER 290
173 #define CCE_NEG_PRINT 291
174 #define CCE_NEG_PUNCT 292
175 #define CCE_NEG_SPACE 293
176 #define CCE_NEG_UPPER 294
177 #define CCE_NEG_XDIGIT 295
178 #define CCL_OP_DIFF 296
179 #define CCL_OP_UNION 297
180 #define BEGIN_REPEAT_POSIX 298
181 #define END_REPEAT_POSIX 299
182 #define BEGIN_REPEAT_FLEX 300
183 #define END_REPEAT_FLEX 301
184 #define YYERRCODE 256
185 static const short yylhs[] = { -1,
186 0, 1, 2, 2, 2, 2, 3, 6, 6, 7,
187 7, 7, 8, 9, 9, 10, 10, 10, 10, 10,
188 10, 4, 4, 4, 5, 12, 12, 12, 12, 14,
189 11, 11, 11, 15, 15, 15, 16, 13, 13, 13,
190 13, 18, 18, 17, 19, 19, 19, 19, 19, 20,
191 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
192 20, 21, 21, 21, 23, 23, 24, 24, 24, 24,
193 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
194 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
195 25, 25, 25, 25, 22, 22,
197 static const short yylen[] = { 2,
198 5, 0, 3, 2, 0, 1, 1, 1, 1, 2,
199 1, 1, 2, 2, 0, 3, 3, 3, 3, 3,
200 3, 5, 5, 0, 0, 2, 1, 1, 1, 0,
201 4, 3, 0, 3, 1, 1, 1, 2, 3, 2,
202 1, 3, 1, 2, 2, 1, 6, 5, 4, 2,
203 2, 2, 6, 5, 4, 1, 1, 1, 3, 3,
204 1, 3, 3, 1, 3, 4, 4, 2, 2, 0,
205 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
206 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
209 static const short yydefred[] = { 2,
210 0, 0, 6, 0, 7, 8, 9, 15, 24, 0,
211 4, 0, 0, 12, 11, 0, 0, 0, 0, 0,
212 0, 0, 14, 0, 1, 0, 10, 0, 0, 0,
213 0, 0, 0, 0, 0, 24, 0, 16, 18, 19,
214 20, 17, 21, 32, 36, 37, 0, 35, 0, 29,
215 61, 58, 28, 0, 56, 96, 0, 0, 0, 27,
216 0, 0, 0, 0, 0, 64, 31, 0, 23, 26,
217 0, 0, 70, 0, 22, 0, 40, 0, 44, 0,
218 0, 0, 50, 51, 52, 0, 0, 34, 95, 59,
219 60, 0, 0, 71, 72, 73, 74, 75, 76, 77,
220 78, 79, 80, 82, 81, 83, 84, 85, 86, 87,
221 88, 93, 89, 90, 91, 94, 92, 65, 69, 39,
222 0, 0, 0, 62, 63, 66, 0, 49, 0, 55,
223 0, 67, 0, 48, 0, 54, 47, 53,
225 static const short yydgoto[] = { 1,
226 2, 4, 9, 13, 25, 10, 16, 11, 12, 23,
227 26, 59, 60, 35, 47, 48, 61, 62, 63, 64,
230 static const short yysindex[] = { 0,
231 0, -222, 0, -155, 0, 0, 0, 0, 0, -215,
232 0, -123, 6, 0, 0, -193, 10, 21, 26, 31,
233 35, 37, 0, 59, 0, -44, 0, -147, -145, -140,
234 -133, -132, -129, 75, -214, 0, -19, 0, 0, 0,
235 0, 0, 0, 0, 0, 0, 23, 0, -48, 0,
236 0, 0, 0, -17, 0, 0, -17, 27, 128, 0,
237 -17, -1, -30, -41, -189, 0, 0, -121, 0, 0,
238 -31, -34, 0, -87, 0, -25, 0, -17, 0, -109,
239 -41, -108, 0, 0, 0, 60, 60, 0, 0, 0,
240 0, 46, 107, 0, 0, 0, 0, 0, 0, 0,
241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
243 -30, -36, -39, 0, 0, 0, -104, 0, -219, 0,
244 -238, 0, -144, 0, -143, 0, 0, 0,
246 static const short yyrindex[] = { 0,
247 0, -141, 0, 0, 0, 0, 0, 0, 0, 0,
248 0, -134, 9, 0, 0, -125, 0, 0, 0, 0,
249 0, 0, 0, -178, 0, 22, 0, 0, 0, 0,
250 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
251 0, 0, 0, 0, 0, 0, 0, 0, -21, 0,
252 0, 0, 0, 0, 0, 0, 0, 85, 0, 0,
253 0, 144, 47, 4, -10, 0, 0, 0, 0, 0,
254 0, 0, 0, 0, 0, 146, 0, 0, 0, 0,
255 18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
256 0, 0, 124, 0, 0, 0, 0, 0, 0, 0,
257 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
258 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
259 50, 0, 0, 0, 0, 0, 0, 0, 0, 0,
260 0, 0, 0, 0, 0, 0, 0, 0,
262 static const short yygindex[] = { 0,
263 0, 0, 0, 121, 133, 0, 0, 0, 0, 0,
264 0, 0, 106, 0, 0, 93, 0, 32, 84, -45,
267 #define YYTABLESIZE 419
268 static const short yytable[] = { 57,
269 83, 84, 90, 56, 131, 118, 91, 129, 25, 57,
270 120, 24, 33, 46, 56, 55, 56, 81, 33, 135,
271 57, 85, 57, 57, 33, 57, 55, 45, 55, 57,
272 57, 57, 57, 3, 77, 57, 57, 46, 133, 46,
273 14, 45, 33, 46, 46, 79, 15, 46, 33, 46,
274 46, 45, 57, 45, 33, 25, 43, 45, 45, 42,
275 58, 25, 136, 45, 45, 24, 68, 25, 27, 33,
276 28, 58, 33, 58, 54, 81, 69, 30, 36, 134,
277 57, 29, 43, 30, 67, 42, 30, 43, 72, 78,
278 42, 31, 76, 43, 46, 32, 42, 33, 78, 33,
279 34, 33, 33, 5, 6, 7, 86, 87, 45, 8,
280 124, 125, 25, 57, 38, 25, 39, 5, 5, 5,
281 73, 40, 78, 5, 13, 13, 13, 46, 41, 42,
282 13, 33, 43, 3, 3, 3, 44, 75, 126, 3,
283 46, 45, 17, 18, 19, 20, 21, 22, 122, 123,
284 58, 127, 132, 41, 137, 38, 49, 138, 37, 70,
285 88, 121, 92, 0, 0, 0, 0, 0, 0, 93,
286 43, 0, 0, 42, 0, 0, 0, 70, 0, 0,
287 0, 0, 0, 0, 94, 95, 96, 97, 98, 99,
288 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
289 110, 111, 112, 113, 114, 115, 116, 117, 0, 0,
290 0, 0, 0, 0, 0, 0, 68, 0, 0, 0,
291 0, 0, 0, 0, 0, 89, 51, 0, 0, 0,
292 0, 0, 52, 0, 33, 33, 50, 51, 0, 51,
293 0, 33, 33, 52, 53, 52, 57, 0, 0, 0,
294 0, 0, 57, 0, 0, 0, 0, 0, 82, 0,
295 46, 130, 128, 0, 33, 33, 46, 80, 0, 0,
296 0, 33, 33, 0, 45, 0, 0, 25, 25, 0,
297 45, 0, 0, 0, 25, 25, 0, 57, 0, 57,
298 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
299 0, 46, 93, 0, 0, 0, 0, 0, 0, 0,
300 0, 0, 0, 0, 0, 45, 0, 94, 95, 96,
301 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
302 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
303 117, 70, 0, 0, 0, 0, 0, 0, 0, 0,
304 0, 0, 0, 0, 0, 0, 70, 70, 70, 70,
305 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
306 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
307 68, 0, 0, 0, 0, 0, 0, 0, 0, 0,
308 0, 0, 0, 0, 0, 68, 68, 68, 68, 68,
309 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
310 68, 68, 68, 68, 68, 68, 68, 68, 68,
312 static const short yycheck[] = { 10,
313 42, 43, 34, 34, 44, 93, 41, 44, 0, 40,
314 36, 60, 34, 10, 34, 46, 34, 63, 40, 258,
315 40, 63, 40, 34, 46, 36, 46, 10, 46, 40,
316 41, 42, 43, 256, 36, 46, 47, 34, 258, 36,
317 256, 256, 34, 40, 41, 47, 262, 262, 40, 46,
318 47, 34, 63, 36, 46, 34, 10, 40, 41, 10,
319 91, 40, 301, 46, 47, 60, 44, 46, 262, 91,
320 61, 91, 94, 91, 94, 121, 125, 256, 123, 299,
321 91, 61, 36, 262, 62, 36, 61, 41, 57, 124,
322 41, 61, 61, 47, 91, 61, 47, 61, 124, 91,
323 42, 123, 94, 259, 260, 261, 296, 297, 91, 265,
324 86, 87, 91, 124, 262, 94, 262, 259, 260, 261,
325 94, 262, 124, 265, 259, 260, 261, 124, 262, 262,
326 265, 123, 262, 259, 260, 261, 62, 10, 93, 265,
327 262, 124, 266, 267, 268, 269, 270, 271, 258, 258,
328 91, 45, 257, 10, 299, 10, 36, 301, 26, 54,
329 68, 78, 73, -1, -1, -1, -1, -1, -1, 257,
330 124, -1, -1, 124, -1, -1, -1, 93, -1, -1,
331 -1, -1, -1, -1, 272, 273, 274, 275, 276, 277,
332 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
333 288, 289, 290, 291, 292, 293, 294, 295, -1, -1,
334 -1, -1, -1, -1, -1, -1, 93, -1, -1, -1,
335 -1, -1, -1, -1, -1, 257, 257, -1, -1, -1,
336 -1, -1, 263, -1, 256, 257, 256, 257, -1, 257,
337 -1, 263, 264, 263, 264, 263, 257, -1, -1, -1,
338 -1, -1, 263, -1, -1, -1, -1, -1, 300, -1,
339 257, 301, 299, -1, 256, 257, 263, 298, -1, -1,
340 -1, 263, 264, -1, 257, -1, -1, 256, 257, -1,
341 263, -1, -1, -1, 263, 264, -1, 298, -1, 300,
342 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
343 -1, 298, 257, -1, -1, -1, -1, -1, -1, -1,
344 -1, -1, -1, -1, -1, 298, -1, 272, 273, 274,
345 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
346 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
347 295, 257, -1, -1, -1, -1, -1, -1, -1, -1,
348 -1, -1, -1, -1, -1, -1, 272, 273, 274, 275,
349 276, 277, 278, 279, 280, 281, 282, 283, 284, 285,
350 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
351 257, -1, -1, -1, -1, -1, -1, -1, -1, -1,
352 -1, -1, -1, -1, -1, 272, 273, 274, 275, 276,
353 277, 278, 279, 280, 281, 282, 283, 284, 285, 286,
354 287, 288, 289, 290, 291, 292, 293, 294, 295,
360 #define YYMAXTOKEN 301
362 static const char *yyname[] = {
364 "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,
365 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,
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,
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,
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,0,0,0,0,0,0,0,0,0,0,0,0,0,
370 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,
371 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",
372 "SCDECL","XSCDECL","NAME","PREVCCL","EOF_OP","OPTION_OP","OPT_OUTFILE",
373 "OPT_PREFIX","OPT_YYCLASS","OPT_HEADER","OPT_EXTRA_TYPE","OPT_TABLES",
374 "CCE_ALNUM","CCE_ALPHA","CCE_BLANK","CCE_CNTRL","CCE_DIGIT","CCE_GRAPH",
375 "CCE_LOWER","CCE_PRINT","CCE_PUNCT","CCE_SPACE","CCE_UPPER","CCE_XDIGIT",
376 "CCE_NEG_ALNUM","CCE_NEG_ALPHA","CCE_NEG_BLANK","CCE_NEG_CNTRL","CCE_NEG_DIGIT",
377 "CCE_NEG_GRAPH","CCE_NEG_LOWER","CCE_NEG_PRINT","CCE_NEG_PUNCT","CCE_NEG_SPACE",
378 "CCE_NEG_UPPER","CCE_NEG_XDIGIT","CCL_OP_DIFF","CCL_OP_UNION",
379 "BEGIN_REPEAT_POSIX","END_REPEAT_POSIX","BEGIN_REPEAT_FLEX","END_REPEAT_FLEX",
381 static const char *yyrule[] = {
383 "goal : initlex sect1 sect1end sect2 initforrule",
385 "sect1 : sect1 startconddecl namelist1",
386 "sect1 : sect1 options",
389 "sect1end : SECTEND",
390 "startconddecl : SCDECL",
391 "startconddecl : XSCDECL",
392 "namelist1 : namelist1 NAME",
395 "options : OPTION_OP optionlist",
396 "optionlist : optionlist option",
398 "option : OPT_OUTFILE '=' NAME",
399 "option : OPT_EXTRA_TYPE '=' NAME",
400 "option : OPT_PREFIX '=' NAME",
401 "option : OPT_YYCLASS '=' NAME",
402 "option : OPT_HEADER '=' NAME",
403 "option : OPT_TABLES '=' NAME",
404 "sect2 : sect2 scon initforrule flexrule '\\n'",
405 "sect2 : sect2 scon '{' sect2 '}'",
408 "flexrule : '^' rule",
413 "scon : '<' scon_stk_ptr namelist2 '>'",
414 "scon : '<' '*' '>'",
416 "namelist2 : namelist2 ',' sconname",
417 "namelist2 : sconname",
424 "re : re '|' series",
427 "series : series singleton",
428 "series : singleton",
429 "series : series BEGIN_REPEAT_POSIX NUMBER ',' NUMBER END_REPEAT_POSIX",
430 "series : series BEGIN_REPEAT_POSIX NUMBER ',' END_REPEAT_POSIX",
431 "series : series BEGIN_REPEAT_POSIX NUMBER END_REPEAT_POSIX",
432 "singleton : singleton '*'",
433 "singleton : singleton '+'",
434 "singleton : singleton '?'",
435 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' NUMBER END_REPEAT_FLEX",
436 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' END_REPEAT_FLEX",
437 "singleton : singleton BEGIN_REPEAT_FLEX NUMBER END_REPEAT_FLEX",
439 "singleton : fullccl",
440 "singleton : PREVCCL",
441 "singleton : '\"' string '\"'",
442 "singleton : '(' re ')'",
444 "fullccl : fullccl CCL_OP_DIFF braceccl",
445 "fullccl : fullccl CCL_OP_UNION braceccl",
446 "fullccl : braceccl",
447 "braceccl : '[' ccl ']'",
448 "braceccl : '[' '^' ccl ']'",
449 "ccl : ccl CHAR '-' CHAR",
451 "ccl : ccl ccl_expr",
453 "ccl_expr : CCE_ALNUM",
454 "ccl_expr : CCE_ALPHA",
455 "ccl_expr : CCE_BLANK",
456 "ccl_expr : CCE_CNTRL",
457 "ccl_expr : CCE_DIGIT",
458 "ccl_expr : CCE_GRAPH",
459 "ccl_expr : CCE_LOWER",
460 "ccl_expr : CCE_PRINT",
461 "ccl_expr : CCE_PUNCT",
462 "ccl_expr : CCE_SPACE",
463 "ccl_expr : CCE_XDIGIT",
464 "ccl_expr : CCE_UPPER",
465 "ccl_expr : CCE_NEG_ALNUM",
466 "ccl_expr : CCE_NEG_ALPHA",
467 "ccl_expr : CCE_NEG_BLANK",
468 "ccl_expr : CCE_NEG_CNTRL",
469 "ccl_expr : CCE_NEG_DIGIT",
470 "ccl_expr : CCE_NEG_GRAPH",
471 "ccl_expr : CCE_NEG_PRINT",
472 "ccl_expr : CCE_NEG_PUNCT",
473 "ccl_expr : CCE_NEG_SPACE",
474 "ccl_expr : CCE_NEG_XDIGIT",
475 "ccl_expr : CCE_NEG_LOWER",
476 "ccl_expr : CCE_NEG_UPPER",
477 "string : string CHAR",
491 /* define the initial stack-sizes */
494 #define YYMAXDEPTH YYSTACKSIZE
497 #define YYSTACKSIZE YYMAXDEPTH
499 #define YYSTACKSIZE 500
500 #define YYMAXDEPTH 500
504 #define YYINITSTACKSIZE 500
514 /* variables for the parser stack */
515 static YYSTACKDATA yystack;
519 /* build_eof_action - build the "<<EOF>>" action for the active start
523 void build_eof_action()
526 char action_text[MAXLINE];
528 for ( i = 1; i <= scon_stk_ptr; ++i )
530 if ( sceof[scon_stk[i]] )
531 format_pinpoint_message(
532 "multiple <<EOF>> rules for start condition %s",
533 scname[scon_stk[i]] );
537 sceof[scon_stk[i]] = true;
539 if (previous_continued_action /* && previous action was regular */)
540 add_action("YY_RULE_SETUP\n");
542 snprintf( action_text, sizeof(action_text), "case YY_STATE_EOF(%s):\n",
543 scname[scon_stk[i]] );
544 add_action( action_text );
548 line_directive_out( (FILE *) 0, 1 );
550 /* This isn't a normal rule after all - don't count it as
551 * such, so we don't have any holes in the rule numbering
552 * (which make generating "rule can never match" warnings
560 /* format_synerr - write out formatted syntax error */
562 void format_synerr( msg, arg )
563 const char *msg, arg[];
565 char errmsg[MAXLINE];
567 (void) snprintf( errmsg, sizeof(errmsg), msg, arg );
572 /* synerr - report a syntax error */
578 pinpoint_message( str );
582 /* format_warn - write out formatted warning */
584 void format_warn( msg, arg )
585 const char *msg, arg[];
587 char warn_msg[MAXLINE];
589 snprintf( warn_msg, sizeof(warn_msg), msg, arg );
594 /* warn - report a warning, unless -w was given */
599 line_warning( str, linenum );
602 /* format_pinpoint_message - write out a message formatted with one string,
603 * pinpointing its location
606 void format_pinpoint_message( msg, arg )
607 const char *msg, arg[];
609 char errmsg[MAXLINE];
611 snprintf( errmsg, sizeof(errmsg), msg, arg );
612 pinpoint_message( errmsg );
616 /* pinpoint_message - write out a message, pinpointing its location */
618 void pinpoint_message( str )
621 line_pinpoint( str, linenum );
625 /* line_warning - report a warning at a given line, unless -w was given */
627 void line_warning( str, line )
631 char warning[MAXLINE];
635 snprintf( warning, sizeof(warning), "warning, %s", str );
636 line_pinpoint( warning, line );
641 /* line_pinpoint - write out a message, pinpointing it at the given line */
643 void line_pinpoint( str, line )
647 fprintf( stderr, "%s:%d: %s\n", infilename, line, str );
651 /* yyerror - eat up an error message from the parser;
652 * currently, messages are ignore
662 #include <stdio.h> /* needed for printf */
665 #include <stdlib.h> /* needed for malloc, etc */
666 #include <string.h> /* needed for memset */
668 /* allocate initial stack or double stack size, up to YYMAXDEPTH */
669 static int yygrowstack(YYSTACKDATA *data)
676 if ((newsize = data->stacksize) == 0)
677 newsize = YYINITSTACKSIZE;
678 else if (newsize >= YYMAXDEPTH)
680 else if ((newsize *= 2) > YYMAXDEPTH)
681 newsize = YYMAXDEPTH;
683 i = data->s_mark - data->s_base;
684 newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));
688 data->s_base = newss;
689 data->s_mark = newss + i;
691 newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
695 data->l_base = newvs;
696 data->l_mark = newvs + i;
698 data->stacksize = newsize;
699 data->s_last = data->s_base + newsize - 1;
703 #if YYPURE || defined(YY_NO_LEAKS)
704 static void yyfreestack(YYSTACKDATA *data)
708 memset(data, 0, sizeof(*data));
711 #define yyfreestack(data) /* nothing */
714 #define YYABORT goto yyabort
715 #define YYREJECT goto yyabort
716 #define YYACCEPT goto yyaccept
717 #define YYERROR goto yyerrlab
722 int yym, yyn, yystate;
726 if ((yys = getenv("YYDEBUG")) != NULL)
729 if (yyn >= '0' && yyn <= '9')
740 memset(&yystack, 0, sizeof(yystack));
743 if (yystack.s_base == NULL && yygrowstack(&yystack)) goto yyoverflow;
744 yystack.s_mark = yystack.s_base;
745 yystack.l_mark = yystack.l_base;
750 if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
753 if ((yychar = YYLEX) < 0) yychar = 0;
758 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
759 if (!yys) yys = "illegal-symbol";
760 printf("%sdebug: state %d, reading %d (%s)\n",
761 YYPREFIX, yystate, yychar, yys);
765 if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
766 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
770 printf("%sdebug: state %d, shifting to state %d\n",
771 YYPREFIX, yystate, yytable[yyn]);
773 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
777 yystate = yytable[yyn];
778 *++yystack.s_mark = yytable[yyn];
779 *++yystack.l_mark = yylval;
781 if (yyerrflag > 0) --yyerrflag;
784 if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
785 yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
790 if (yyerrflag) goto yyinrecovery;
792 yyerror("syntax error");
805 if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 &&
806 yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
810 printf("%sdebug: state %d, error recovery shifting\
811 to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
813 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
817 yystate = yytable[yyn];
818 *++yystack.s_mark = yytable[yyn];
819 *++yystack.l_mark = yylval;
826 printf("%sdebug: error recovery discarding state %d\n",
827 YYPREFIX, *yystack.s_mark);
829 if (yystack.s_mark <= yystack.s_base) goto yyabort;
837 if (yychar == 0) goto yyabort;
842 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
843 if (!yys) yys = "illegal-symbol";
844 printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
845 YYPREFIX, yystate, yychar, yys);
855 printf("%sdebug: state %d, reducing by rule %d (%s)\n",
856 YYPREFIX, yystate, yyn, yyrule[yyn]);
860 yyval = yystack.l_mark[1-yym];
862 memset(&yyval, 0, sizeof yyval);
867 { /* add default rule */
873 def_rule = mkstate( -pat );
875 /* Remember the number of the default rule so we
876 * don't generate "can't match" warnings for it.
878 default_rule = num_rules;
880 finish_rule( def_rule, false, 0, 0, 0);
882 for ( i = 1; i <= lastsc; ++i )
883 scset[i] = mkbranch( scset[i], def_rule );
887 "YY_FATAL_ERROR( \"flex scanner jammed\" )" );
889 add_action( "ECHO" );
891 add_action( ";\n\tYY_BREAK\n" );
896 { /* initialize for processing rules */
898 /* Create default DFA start condition. */
899 scinstal( "INITIAL", false );
904 { synerr( _("unknown error processing section 1") ); }
910 scon_stk = allocate_integer_array( lastsc + 1 );
924 { scinstal( nmstr, xcluflg ); }
928 { scinstal( nmstr, xcluflg ); }
932 { synerr( _("bad start condition list") ); }
937 outfilename = copy_string( nmstr );
943 { extra_type = copy_string( nmstr ); }
947 { prefix = copy_string( nmstr ); }
951 { yyclass = copy_string( nmstr ); }
955 { headerfilename = copy_string( nmstr ); }
959 { tablesext = true; tablesfilename = copy_string( nmstr ); }
963 { scon_stk_ptr = yystack.l_mark[-3]; }
967 { scon_stk_ptr = yystack.l_mark[-3]; }
972 /* Initialize for a parse of one rule. */
973 trlcontxt = variable_trail_rule = varlength = false;
974 trailcnt = headcnt = rulelen = 0;
975 current_state_type = STATE_NORMAL;
976 previous_continued_action = continued_action;
985 pat = yystack.l_mark[0];
986 finish_rule( pat, variable_trail_rule,
987 headcnt, trailcnt , previous_continued_action);
989 if ( scon_stk_ptr > 0 )
991 for ( i = 1; i <= scon_stk_ptr; ++i )
993 mkbranch( scbol[scon_stk[i]],
999 /* Add to all non-exclusive start conditions,
1000 * including the default (0) start condition.
1003 for ( i = 1; i <= lastsc; ++i )
1005 scbol[i] = mkbranch( scbol[i],
1013 if ( performance_report > 1 )
1015 "'^' operator results in sub-optimal performance" );
1022 pat = yystack.l_mark[0];
1023 finish_rule( pat, variable_trail_rule,
1024 headcnt, trailcnt , previous_continued_action);
1026 if ( scon_stk_ptr > 0 )
1028 for ( i = 1; i <= scon_stk_ptr; ++i )
1029 scset[scon_stk[i]] =
1030 mkbranch( scset[scon_stk[i]],
1036 for ( i = 1; i <= lastsc; ++i )
1047 if ( scon_stk_ptr > 0 )
1052 /* This EOF applies to all start conditions
1053 * which don't already have EOF actions.
1055 for ( i = 1; i <= lastsc; ++i )
1057 scon_stk[++scon_stk_ptr] = i;
1059 if ( scon_stk_ptr == 0 )
1061 "all start conditions already have <<EOF>> rules" );
1070 { synerr( _("unrecognized rule") ); }
1074 { yyval = scon_stk_ptr; }
1078 { yyval = yystack.l_mark[-2]; }
1083 yyval = scon_stk_ptr;
1085 for ( i = 1; i <= lastsc; ++i )
1089 for ( j = 1; j <= scon_stk_ptr; ++j )
1090 if ( scon_stk[j] == i )
1093 if ( j > scon_stk_ptr )
1094 scon_stk[++scon_stk_ptr] = i;
1100 { yyval = scon_stk_ptr; }
1104 { synerr( _("bad start condition list") ); }
1109 if ( (scnum = sclookup( nmstr )) == 0 )
1110 format_pinpoint_message(
1111 "undeclared start condition %s",
1115 for ( i = 1; i <= scon_stk_ptr; ++i )
1116 if ( scon_stk[i] == scnum )
1119 "<%s> specified twice",
1124 if ( i > scon_stk_ptr )
1125 scon_stk[++scon_stk_ptr] = scnum;
1132 if ( transchar[lastst[yystack.l_mark[0]]] != SYM_EPSILON )
1133 /* Provide final transition \now/ so it
1134 * will be marked as a trailing context
1137 yystack.l_mark[0] = link_machines( yystack.l_mark[0],
1138 mkstate( SYM_EPSILON ) );
1140 mark_beginning_as_normal( yystack.l_mark[0] );
1141 current_state_type = STATE_NORMAL;
1143 if ( previous_continued_action )
1145 /* We need to treat this as variable trailing
1146 * context so that the backup does not happen
1147 * in the action but before the action switch
1148 * statement. If the backup happens in the
1149 * action, then the rules "falling into" this
1150 * one's action will *also* do the backup,
1153 if ( ! varlength || headcnt != 0 )
1155 "trailing context made variable due to preceding '|' action" );
1157 /* Mark as variable. */
1163 if ( lex_compat || (varlength && headcnt == 0) )
1164 { /* variable trailing context rule */
1165 /* Mark the first part of the rule as the
1166 * accepting "head" part of a trailing
1169 * By the way, we didn't do this at the
1170 * beginning of this production because back
1171 * then current_state_type was set up for a
1172 * trail rule, and add_accept() can create
1175 add_accept( yystack.l_mark[-1],
1176 num_rules | YY_TRAILING_HEAD_MASK );
1177 variable_trail_rule = true;
1183 yyval = link_machines( yystack.l_mark[-1], yystack.l_mark[0] );
1188 { synerr( _("trailing context used twice") ); }
1198 current_state_type = STATE_TRAILING_CONTEXT;
1202 synerr( _("trailing context used twice") );
1203 yyval = mkstate( SYM_EPSILON );
1206 else if ( previous_continued_action )
1208 /* See the comment in the rule for "re2 re"
1212 "trailing context made variable due to preceding '|' action" );
1217 if ( lex_compat || varlength )
1219 /* Again, see the comment in the rule for
1222 add_accept( yystack.l_mark[-1],
1223 num_rules | YY_TRAILING_HEAD_MASK );
1224 variable_trail_rule = true;
1229 eps = mkstate( SYM_EPSILON );
1230 yyval = link_machines( yystack.l_mark[-1],
1231 link_machines( eps, mkstate( '\n' ) ) );
1237 yyval = yystack.l_mark[0];
1241 if ( lex_compat || (varlength && headcnt == 0) )
1242 /* Both head and trail are
1245 variable_trail_rule = true;
1255 yyval = mkor( yystack.l_mark[-2], yystack.l_mark[0] );
1260 { yyval = yystack.l_mark[0]; }
1265 /* This rule is written separately so the
1266 * reduction will occur before the trailing
1271 synerr( _("trailing context used twice") );
1276 /* We hope the trailing context is
1285 current_state_type = STATE_TRAILING_CONTEXT;
1286 yyval = yystack.l_mark[-1];
1292 /* This is where concatenation of adjacent patterns
1295 yyval = link_machines( yystack.l_mark[-1], yystack.l_mark[0] );
1300 { yyval = yystack.l_mark[0]; }
1307 if ( yystack.l_mark[-3] > yystack.l_mark[-1] || yystack.l_mark[-3] < 0 )
1309 synerr( _("bad iteration values") );
1310 yyval = yystack.l_mark[-5];
1314 if ( yystack.l_mark[-3] == 0 )
1316 if ( yystack.l_mark[-1] <= 0 )
1319 _("bad iteration values") );
1320 yyval = yystack.l_mark[-5];
1324 mkrep( yystack.l_mark[-5], 1, yystack.l_mark[-1] ) );
1327 yyval = mkrep( yystack.l_mark[-5], yystack.l_mark[-3], yystack.l_mark[-1] );
1336 if ( yystack.l_mark[-2] <= 0 )
1338 synerr( _("iteration value must be positive") );
1339 yyval = yystack.l_mark[-4];
1343 yyval = mkrep( yystack.l_mark[-4], yystack.l_mark[-2], INFINITE_REPEAT );
1349 /* The series could be something like "(foo)",
1350 * in which case we have no idea what its length
1351 * is, so we punt here.
1355 if ( yystack.l_mark[-1] <= 0 )
1357 synerr( _("iteration value must be positive")
1359 yyval = yystack.l_mark[-3];
1363 yyval = link_machines( yystack.l_mark[-3],
1364 copysingl( yystack.l_mark[-3], yystack.l_mark[-1] - 1 ) );
1372 yyval = mkclos( yystack.l_mark[-1] );
1379 yyval = mkposcl( yystack.l_mark[-1] );
1386 yyval = mkopt( yystack.l_mark[-1] );
1394 if ( yystack.l_mark[-3] > yystack.l_mark[-1] || yystack.l_mark[-3] < 0 )
1396 synerr( _("bad iteration values") );
1397 yyval = yystack.l_mark[-5];
1401 if ( yystack.l_mark[-3] == 0 )
1403 if ( yystack.l_mark[-1] <= 0 )
1406 _("bad iteration values") );
1407 yyval = yystack.l_mark[-5];
1411 mkrep( yystack.l_mark[-5], 1, yystack.l_mark[-1] ) );
1414 yyval = mkrep( yystack.l_mark[-5], yystack.l_mark[-3], yystack.l_mark[-1] );
1423 if ( yystack.l_mark[-2] <= 0 )
1425 synerr( _("iteration value must be positive") );
1426 yyval = yystack.l_mark[-4];
1430 yyval = mkrep( yystack.l_mark[-4], yystack.l_mark[-2], INFINITE_REPEAT );
1436 /* The singleton could be something like "(foo)",
1437 * in which case we have no idea what its length
1438 * is, so we punt here.
1442 if ( yystack.l_mark[-1] <= 0 )
1444 synerr( _("iteration value must be positive") );
1445 yyval = yystack.l_mark[-3];
1449 yyval = link_machines( yystack.l_mark[-3],
1450 copysingl( yystack.l_mark[-3], yystack.l_mark[-1] - 1 ) );
1458 /* Create the '.' character class. */
1460 ccladd( ccldot, '\n' );
1461 cclnegate( ccldot );
1464 mkeccl( ccltbl + cclmap[ccldot],
1465 ccllen[ccldot], nextecm,
1466 ecgroup, csize, csize );
1468 /* Create the (?s:'.') character class. */
1470 cclnegate( cclany );
1473 mkeccl( ccltbl + cclmap[cclany],
1474 ccllen[cclany], nextecm,
1475 ecgroup, csize, csize );
1483 yyval = mkstate( -cclany );
1485 yyval = mkstate( -ccldot );
1491 /* Sort characters for fast searching.
1493 qsort( ccltbl + cclmap[yystack.l_mark[0]], ccllen[yystack.l_mark[0]], sizeof (*ccltbl), cclcmp );
1496 mkeccl( ccltbl + cclmap[yystack.l_mark[0]], ccllen[yystack.l_mark[0]],
1497 nextecm, ecgroup, csize, csize );
1501 if (ccl_has_nl[yystack.l_mark[0]])
1502 rule_has_nl[num_rules] = true;
1504 yyval = mkstate( -yystack.l_mark[0] );
1512 if (ccl_has_nl[yystack.l_mark[0]])
1513 rule_has_nl[num_rules] = true;
1515 yyval = mkstate( -yystack.l_mark[0] );
1520 { yyval = yystack.l_mark[-1]; }
1524 { yyval = yystack.l_mark[-1]; }
1531 if (yystack.l_mark[0] == nlch)
1532 rule_has_nl[num_rules] = true;
1534 if (sf_case_ins() && has_case(yystack.l_mark[0]))
1535 /* create an alternation, as in (a|A) */
1536 yyval = mkor (mkstate(yystack.l_mark[0]), mkstate(reverse_case(yystack.l_mark[0])));
1538 yyval = mkstate( yystack.l_mark[0] );
1543 { yyval = ccl_set_diff (yystack.l_mark[-2], yystack.l_mark[0]); }
1547 { yyval = ccl_set_union (yystack.l_mark[-2], yystack.l_mark[0]); }
1551 { yyval = yystack.l_mark[-1]; }
1556 cclnegate( yystack.l_mark[-1] );
1557 yyval = yystack.l_mark[-1];
1567 /* If one end of the range has case and the other
1568 * does not, or the cases are different, then we're not
1569 * sure what range the user is trying to express.
1570 * Examples: [@-z] or [S-t]
1572 if (has_case (yystack.l_mark[-2]) != has_case (yystack.l_mark[0])
1573 || (has_case (yystack.l_mark[-2]) && (b_islower (yystack.l_mark[-2]) != b_islower (yystack.l_mark[0])))
1574 || (has_case (yystack.l_mark[-2]) && (b_isupper (yystack.l_mark[-2]) != b_isupper (yystack.l_mark[0]))))
1576 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
1577 yystack.l_mark[-2], yystack.l_mark[0]);
1579 /* If the range spans uppercase characters but not
1580 * lowercase (or vice-versa), then should we automatically
1581 * include lowercase characters in the range?
1582 * Example: [@-_] spans [a-z] but not [A-Z]
1584 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]))
1586 _("the character range [%c-%c] is ambiguous in a case-insensitive scanner"),
1587 yystack.l_mark[-2], yystack.l_mark[0]);
1590 if ( yystack.l_mark[-2] > yystack.l_mark[0] )
1591 synerr( _("negative range in character class") );
1595 for ( i = yystack.l_mark[-2]; i <= yystack.l_mark[0]; ++i )
1596 ccladd( yystack.l_mark[-3], i );
1598 /* Keep track if this ccl is staying in
1599 * alphabetical order.
1601 cclsorted = cclsorted && (yystack.l_mark[-2] > lastchar);
1602 lastchar = yystack.l_mark[0];
1604 /* Do it again for upper/lowercase */
1605 if (sf_case_ins() && has_case(yystack.l_mark[-2]) && has_case(yystack.l_mark[0])){
1606 yystack.l_mark[-2] = reverse_case (yystack.l_mark[-2]);
1607 yystack.l_mark[0] = reverse_case (yystack.l_mark[0]);
1609 for ( i = yystack.l_mark[-2]; i <= yystack.l_mark[0]; ++i )
1610 ccladd( yystack.l_mark[-3], i );
1612 cclsorted = cclsorted && (yystack.l_mark[-2] > lastchar);
1613 lastchar = yystack.l_mark[0];
1618 yyval = yystack.l_mark[-3];
1624 ccladd( yystack.l_mark[-1], yystack.l_mark[0] );
1625 cclsorted = cclsorted && (yystack.l_mark[0] > lastchar);
1626 lastchar = yystack.l_mark[0];
1628 /* Do it again for upper/lowercase */
1629 if (sf_case_ins() && has_case(yystack.l_mark[0])){
1630 yystack.l_mark[0] = reverse_case (yystack.l_mark[0]);
1631 ccladd (yystack.l_mark[-1], yystack.l_mark[0]);
1633 cclsorted = cclsorted && (yystack.l_mark[0] > lastchar);
1634 lastchar = yystack.l_mark[0];
1637 yyval = yystack.l_mark[-1];
1643 /* Too hard to properly maintain cclsorted. */
1645 yyval = yystack.l_mark[-1];
1653 currccl = yyval = cclinit();
1658 { CCL_EXPR(isalnum); }
1662 { CCL_EXPR(isalpha); }
1666 { CCL_EXPR(IS_BLANK); }
1670 { CCL_EXPR(iscntrl); }
1674 { CCL_EXPR(isdigit); }
1678 { CCL_EXPR(isgraph); }
1690 { CCL_EXPR(isprint); }
1694 { CCL_EXPR(ispunct); }
1698 { CCL_EXPR(isspace); }
1702 { CCL_EXPR(isxdigit); }
1714 { CCL_NEG_EXPR(isalnum); }
1718 { CCL_NEG_EXPR(isalpha); }
1722 { CCL_NEG_EXPR(IS_BLANK); }
1726 { CCL_NEG_EXPR(iscntrl); }
1730 { CCL_NEG_EXPR(isdigit); }
1734 { CCL_NEG_EXPR(isgraph); }
1738 { CCL_NEG_EXPR(isprint); }
1742 { CCL_NEG_EXPR(ispunct); }
1746 { CCL_NEG_EXPR(isspace); }
1750 { CCL_NEG_EXPR(isxdigit); }
1755 if ( sf_case_ins() )
1756 warn(_("[:^lower:] is ambiguous in case insensitive scanner"));
1758 CCL_NEG_EXPR(islower);
1764 if ( sf_case_ins() )
1765 warn(_("[:^upper:] ambiguous in case insensitive scanner"));
1767 CCL_NEG_EXPR(isupper);
1773 if ( yystack.l_mark[0] == nlch )
1774 rule_has_nl[num_rules] = true;
1778 if (sf_case_ins() && has_case(yystack.l_mark[0]))
1779 yyval = mkor (mkstate(yystack.l_mark[0]), mkstate(reverse_case(yystack.l_mark[0])));
1781 yyval = mkstate (yystack.l_mark[0]);
1783 yyval = link_machines( yystack.l_mark[-1], yyval);
1788 { yyval = mkstate( SYM_EPSILON ); }
1790 #line 1787 "parse.c"
1792 yystack.s_mark -= yym;
1793 yystate = *yystack.s_mark;
1794 yystack.l_mark -= yym;
1796 if (yystate == 0 && yym == 0)
1800 printf("%sdebug: after reduction, shifting from state 0 to\
1801 state %d\n", YYPREFIX, YYFINAL);
1804 *++yystack.s_mark = YYFINAL;
1805 *++yystack.l_mark = yyval;
1808 if ((yychar = YYLEX) < 0) yychar = 0;
1813 if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
1814 if (!yys) yys = "illegal-symbol";
1815 printf("%sdebug: state %d, reading %d (%s)\n",
1816 YYPREFIX, YYFINAL, yychar, yys);
1820 if (yychar == 0) goto yyaccept;
1823 if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
1824 yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
1825 yystate = yytable[yyn];
1827 yystate = yydgoto[yym];
1830 printf("%sdebug: after reduction, shifting from state %d \
1831 to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
1833 if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack))
1837 *++yystack.s_mark = (short) yystate;
1838 *++yystack.l_mark = yyval;
1842 yyerror("yacc stack overflow");
1845 yyfreestack(&yystack);
1849 yyfreestack(&yystack);