Remove building with NOCRYPTO option
[minix3.git] / external / bsd / byacc / dist / btyaccpar.c
blobd0780531e14fab76a6af82fe893f30cb7a3bb005
1 /* $NetBSD: btyaccpar.c,v 1.2 2015/01/04 01:34:20 christos Exp $ */
3 /* This file generated automatically using
4 * @Id: skel2c,v 1.3 2014/04/06 19:48:04 tom Exp @
5 */
7 /* @Id: btyaccpar.skel,v 1.1 2014/04/02 22:44:41 tom Exp @ */
9 #include "defs.h"
11 /* If the skeleton is changed, the banner should be changed so that */
12 /* the altered version can be easily distinguished from the original. */
13 /* */
14 /* The #defines included with the banner are there because they are */
15 /* useful in subsequent code. The macros #defined in the header or */
16 /* the body either are not useful outside of semantic actions or */
17 /* are conditional. */
19 const char *const banner[] =
21 "/* original parser id follows */",
22 "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */",
23 "/* (use YYMAJOR/YYMINOR for ifdefs dependent of parser version) */",
24 "",
25 "#define YYBYACC 1",
26 CONCAT1("#define YYMAJOR ", YYMAJOR),
27 CONCAT1("#define YYMINOR ", YYMINOR),
28 #ifdef YYPATCH
29 CONCAT1("#define YYPATCH ", YYPATCH),
30 #endif
31 "",
32 "#define YYEMPTY (-1)",
33 "#define yyclearin (yychar = YYEMPTY)",
34 "#define yyerrok (yyerrflag = 0)",
35 "#define YYRECOVERING() (yyerrflag != 0)",
36 "#define YYENOMEM (-2)",
37 "#define YYEOF 0",
41 const char *const xdecls[] =
43 "",
44 "extern int YYPARSE_DECL();",
48 const char *const tables[] =
50 "extern const YYINT yylhs[];",
51 "extern const YYINT yylen[];",
52 "extern const YYINT yydefred[];",
53 "extern const YYINT yystos[];",
54 "extern const YYINT yydgoto[];",
55 "extern const YYINT yysindex[];",
56 "extern const YYINT yyrindex[];",
57 #if defined(YYBTYACC)
58 "#if YYBTYACC",
59 "extern const YYINT yycindex[];",
60 "#endif /* YYBTYACC */",
61 #endif /* defined(YYBTYACC) */
62 "extern const YYINT yygindex[];",
63 "extern const YYINT yytable[];",
64 "extern const YYINT yycheck[];",
65 #if defined(YYBTYACC)
66 "#if YYBTYACC",
67 "extern const YYINT yyctable[];",
68 "#endif /* YYBTYACC */",
69 #endif /* defined(YYBTYACC) */
70 "",
71 "#if YYDEBUG",
72 "extern const char *const yyname[];",
73 "extern const char *const yyrule[];",
74 "#endif",
78 const char *const global_vars[] =
80 "",
81 "int yydebug;",
82 "int yynerrs;",
86 const char *const impure_vars[] =
88 "",
89 "int yyerrflag;",
90 "int yychar;",
91 "YYSTYPE yyval;",
92 "YYSTYPE yylval;",
93 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
94 "YYLTYPE yyloc; /* position returned by actions */",
95 "YYLTYPE yylloc; /* position from the lexer */",
96 "#endif",
100 const char *const hdr_defs[] =
103 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
104 "#ifndef YYLLOC_DEFAULT",
105 "#define YYLLOC_DEFAULT(loc, rhs, n) \\",
106 "do \\",
107 "{ \\",
108 " if (n == 0) \\",
109 " { \\",
110 " (loc).first_line = ((rhs)[-1]).last_line; \\",
111 " (loc).first_column = ((rhs)[-1]).last_column; \\",
112 " (loc).last_line = ((rhs)[-1]).last_line; \\",
113 " (loc).last_column = ((rhs)[-1]).last_column; \\",
114 " } \\",
115 " else \\",
116 " { \\",
117 " (loc).first_line = ((rhs)[ 0 ]).first_line; \\",
118 " (loc).first_column = ((rhs)[ 0 ]).first_column; \\",
119 " (loc).last_line = ((rhs)[n-1]).last_line; \\",
120 " (loc).last_column = ((rhs)[n-1]).last_column; \\",
121 " } \\",
122 "} while (0)",
123 "#endif /* YYLLOC_DEFAULT */",
124 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */",
125 #if defined(YYBTYACC)
126 "#if YYBTYACC",
128 "#ifndef YYLVQUEUEGROWTH",
129 "#define YYLVQUEUEGROWTH 32",
130 "#endif",
131 "#endif /* YYBTYACC */",
132 #endif /* defined(YYBTYACC) */
134 "/* define the initial stack-sizes */",
135 "#ifdef YYSTACKSIZE",
136 "#undef YYMAXDEPTH",
137 "#define YYMAXDEPTH YYSTACKSIZE",
138 "#else",
139 "#ifdef YYMAXDEPTH",
140 "#define YYSTACKSIZE YYMAXDEPTH",
141 "#else",
142 "#define YYSTACKSIZE 10000",
143 "#define YYMAXDEPTH 10000",
144 "#endif",
145 "#endif",
147 "#ifndef YYINITSTACKSIZE",
148 "#define YYINITSTACKSIZE 200",
149 "#endif",
151 "typedef struct {",
152 " unsigned stacksize;",
153 " short *s_base;",
154 " short *s_mark;",
155 " short *s_last;",
156 " YYSTYPE *l_base;",
157 " YYSTYPE *l_mark;",
158 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
159 " YYLTYPE *p_base;",
160 " YYLTYPE *p_mark;",
161 "#endif",
162 "} YYSTACKDATA;",
163 #if defined(YYBTYACC)
164 "#if YYBTYACC",
166 "struct YYParseState_s",
167 "{",
168 " struct YYParseState_s *save; /* Previously saved parser state */",
169 " YYSTACKDATA yystack; /* saved parser stack */",
170 " int state; /* saved parser state */",
171 " int errflag; /* saved error recovery status */",
172 " int lexeme; /* saved index of the conflict lexeme in the lexical queue */",
173 " YYINT ctry; /* saved index in yyctable[] for this conflict */",
174 "};",
175 "typedef struct YYParseState_s YYParseState;",
176 "#endif /* YYBTYACC */",
177 #endif /* defined(YYBTYACC) */
181 const char *const hdr_vars[] =
183 "/* variables for the parser stack */",
184 "static YYSTACKDATA yystack;",
185 #if defined(YYBTYACC)
186 "#if YYBTYACC",
188 "/* Current parser state */",
189 "static YYParseState *yyps = 0;",
191 "/* yypath != NULL: do the full parse, starting at *yypath parser state. */",
192 "static YYParseState *yypath = 0;",
194 "/* Base of the lexical value queue */",
195 "static YYSTYPE *yylvals = 0;",
197 "/* Current position at lexical value queue */",
198 "static YYSTYPE *yylvp = 0;",
200 "/* End position of lexical value queue */",
201 "static YYSTYPE *yylve = 0;",
203 "/* The last allocated position at the lexical value queue */",
204 "static YYSTYPE *yylvlim = 0;",
206 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
207 "/* Base of the lexical position queue */",
208 "static YYLTYPE *yylpsns = 0;",
210 "/* Current position at lexical position queue */",
211 "static YYLTYPE *yylpp = 0;",
213 "/* End position of lexical position queue */",
214 "static YYLTYPE *yylpe = 0;",
216 "/* The last allocated position at the lexical position queue */",
217 "static YYLTYPE *yylplim = 0;",
218 "#endif",
220 "/* Current position at lexical token queue */",
221 "static short *yylexp = 0;",
223 "static short *yylexemes = 0;",
224 "#endif /* YYBTYACC */",
225 #endif /* defined(YYBTYACC) */
229 const char *const body_vars[] =
231 " int yyerrflag;",
232 " int yychar;",
233 " YYSTYPE yyval;",
234 " YYSTYPE yylval;",
235 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
236 " YYLTYPE yyloc; /* position returned by actions */",
237 " YYLTYPE yylloc; /* position from the lexer */",
238 "#endif",
240 " /* variables for the parser stack */",
241 " YYSTACKDATA yystack;",
242 #if defined(YYBTYACC)
243 "#if YYBTYACC",
245 " /* Current parser state */",
246 " static YYParseState *yyps = 0;",
248 " /* yypath != NULL: do the full parse, starting at *yypath parser state. */",
249 " static YYParseState *yypath = 0;",
251 " /* Base of the lexical value queue */",
252 " static YYSTYPE *yylvals = 0;",
254 " /* Current position at lexical value queue */",
255 " static YYSTYPE *yylvp = 0;",
257 " /* End position of lexical value queue */",
258 " static YYSTYPE *yylve = 0;",
260 " /* The last allocated position at the lexical value queue */",
261 " static YYSTYPE *yylvlim = 0;",
263 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
264 " /* Base of the lexical position queue */",
265 " static YYLTYPE *yylpsns = 0;",
267 " /* Current position at lexical position queue */",
268 " static YYLTYPE *yylpp = 0;",
270 " /* End position of lexical position queue */",
271 " static YYLTYPE *yylpe = 0;",
273 " /* The last allocated position at the lexical position queue */",
274 " static YYLTYPE *yylplim = 0;",
275 "#endif",
277 " /* Current position at lexical token queue */",
278 " static short *yylexp = 0;",
280 " static short *yylexemes = 0;",
281 "#endif /* YYBTYACC */",
282 #endif /* defined(YYBTYACC) */
286 const char *const body_1[] =
289 "/* For use in generated program */",
290 "#define yydepth (int)(yystack.s_mark - yystack.s_base)",
291 #if defined(YYBTYACC)
292 "#if YYBTYACC",
293 "#define yytrial (yyps->save)",
294 "#endif /* YYBTYACC */",
295 #endif /* defined(YYBTYACC) */
297 "#if YYDEBUG",
298 "#include <stdio.h> /* needed for printf */",
299 "#endif",
301 "#include <stdlib.h> /* needed for malloc, etc */",
302 "#include <string.h> /* needed for memset */",
304 "/* allocate initial stack or double stack size, up to YYMAXDEPTH */",
305 "static int yygrowstack(YYSTACKDATA *data)",
306 "{",
307 " int i;",
308 " unsigned newsize;",
309 " short *newss;",
310 " YYSTYPE *newvs;",
311 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
312 " YYLTYPE *newps;",
313 "#endif",
315 " if ((newsize = data->stacksize) == 0)",
316 " newsize = YYINITSTACKSIZE;",
317 " else if (newsize >= YYMAXDEPTH)",
318 " return YYENOMEM;",
319 " else if ((newsize *= 2) > YYMAXDEPTH)",
320 " newsize = YYMAXDEPTH;",
322 " i = (int) (data->s_mark - data->s_base);",
323 " newss = (short *)realloc(data->s_base, newsize * sizeof(*newss));",
324 " if (newss == 0)",
325 " return YYENOMEM;",
327 " data->s_base = newss;",
328 " data->s_mark = newss + i;",
330 " newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));",
331 " if (newvs == 0)",
332 " return YYENOMEM;",
334 " data->l_base = newvs;",
335 " data->l_mark = newvs + i;",
337 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
338 " newps = (YYLTYPE *)realloc(data->p_base, newsize * sizeof(*newps));",
339 " if (newps == 0)",
340 " return YYENOMEM;",
342 " data->p_base = newps;",
343 " data->p_mark = newps + i;",
344 "#endif",
346 " data->stacksize = newsize;",
347 " data->s_last = data->s_base + newsize - 1;",
349 "#if YYDEBUG",
350 " if (yydebug)",
351 " fprintf(stderr, \"%sdebug: stack size increased to %d\\n\", YYPREFIX, newsize);",
352 "#endif",
353 " return 0;",
354 "}",
356 "#if YYPURE || defined(YY_NO_LEAKS)",
357 "static void yyfreestack(YYSTACKDATA *data)",
358 "{",
359 " free(data->s_base);",
360 " free(data->l_base);",
361 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
362 " free(data->p_base);",
363 "#endif",
364 " memset(data, 0, sizeof(*data));",
365 "}",
366 "#else",
367 "#define yyfreestack(data) /* nothing */",
368 "#endif /* YYPURE || defined(YY_NO_LEAKS) */",
369 #if defined(YYBTYACC)
370 "#if YYBTYACC",
372 "static YYParseState *",
373 "yyNewState(unsigned size)",
374 "{",
375 " YYParseState *p = (YYParseState *) malloc(sizeof(YYParseState));",
376 " if (p == NULL) return NULL;",
378 " p->yystack.stacksize = size;",
379 " if (size == 0)",
380 " {",
381 " p->yystack.s_base = NULL;",
382 " p->yystack.l_base = NULL;",
383 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
384 " p->yystack.p_base = NULL;",
385 "#endif",
386 " return p;",
387 " }",
388 " p->yystack.s_base = (short *) malloc(size * sizeof(short));",
389 " if (p->yystack.s_base == NULL) return NULL;",
390 " p->yystack.l_base = (YYSTYPE *) malloc(size * sizeof(YYSTYPE));",
391 " if (p->yystack.l_base == NULL) return NULL;",
392 " memset(p->yystack.l_base, 0, size * sizeof(YYSTYPE));",
393 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
394 " p->yystack.p_base = (YYLTYPE *) malloc(size * sizeof(YYLTYPE));",
395 " if (p->yystack.p_base == NULL) return NULL;",
396 " memset(p->yystack.p_base, 0, size * sizeof(YYLTYPE));",
397 "#endif",
399 " return p;",
400 "}",
402 "static void",
403 "yyFreeState(YYParseState *p)",
404 "{",
405 " yyfreestack(&p->yystack);",
406 " free(p);",
407 "}",
408 "#endif /* YYBTYACC */",
409 #endif /* defined(YYBTYACC) */
411 "#define YYABORT goto yyabort",
412 "#define YYREJECT goto yyabort",
413 "#define YYACCEPT goto yyaccept",
414 "#define YYERROR goto yyerrlab",
415 #if defined(YYBTYACC)
416 "#if YYBTYACC",
417 "#define YYVALID do { if (yyps->save) goto yyvalid; } while(0)",
418 "#define YYVALID_NESTED do { if (yyps->save && \\",
419 " yyps->save->save == 0) goto yyvalid; } while(0)",
420 "#endif /* YYBTYACC */",
421 #endif /* defined(YYBTYACC) */
423 "int",
424 "YYPARSE_DECL()",
425 "{",
429 const char *const body_2[] =
431 " int yym, yyn, yystate, yyresult;",
432 #if defined(YYBTYACC)
433 "#if YYBTYACC",
434 " int yynewerrflag;",
435 " YYParseState *yyerrctx = NULL;",
436 "#endif /* YYBTYACC */",
437 #endif /* defined(YYBTYACC) */
438 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
439 " YYLTYPE yyerror_loc_range[2]; /* position of error start & end */",
440 "#endif",
441 "#if YYDEBUG",
442 " const char *yys;",
444 " if ((yys = getenv(\"YYDEBUG\")) != 0)",
445 " {",
446 " yyn = *yys;",
447 " if (yyn >= '0' && yyn <= '9')",
448 " yydebug = yyn - '0';",
449 " }",
450 " if (yydebug)",
451 " fprintf(stderr, \"%sdebug[<# of symbols on state stack>]\\n\", YYPREFIX);",
452 "#endif",
457 const char *const body_3[] = {
458 #if defined(YYBTYACC)
459 "#if YYBTYACC",
460 " yyps = yyNewState(0); if (yyps == 0) goto yyenomem;",
461 " yyps->save = 0;",
462 "#endif /* YYBTYACC */",
463 #endif /* defined(YYBTYACC) */
464 " yynerrs = 0;",
465 " yyerrflag = 0;",
466 " yychar = YYEMPTY;",
467 " yystate = 0;",
469 "#if YYPURE",
470 " memset(&yystack, 0, sizeof(yystack));",
471 "#endif",
473 " if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;",
474 " yystack.s_mark = yystack.s_base;",
475 " yystack.l_mark = yystack.l_base;",
476 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
477 " yystack.p_mark = yystack.p_base;",
478 "#endif",
479 " yystate = 0;",
480 " *yystack.s_mark = 0;",
482 "yyloop:",
483 " if ((yyn = yydefred[yystate]) != 0) goto yyreduce;",
484 " if (yychar < 0)",
485 " {",
486 #if defined(YYBTYACC)
487 "#if YYBTYACC",
488 " do {",
489 " if (yylvp < yylve)",
490 " {",
491 " /* we're currently re-reading tokens */",
492 " yylval = *yylvp++;",
493 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
494 " yylloc = *yylpp++;",
495 "#endif",
496 " yychar = *yylexp++;",
497 " break;",
498 " }",
499 " if (yyps->save)",
500 " {",
501 " /* in trial mode; save scanner results for future parse attempts */",
502 " if (yylvp == yylvlim)",
503 " { /* Enlarge lexical value queue */",
504 " size_t p = (size_t) (yylvp - yylvals);",
505 " size_t s = (size_t) (yylvlim - yylvals);",
507 " s += YYLVQUEUEGROWTH;",
508 " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;",
509 " if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;",
510 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
511 " if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;",
512 "#endif",
513 " yylvp = yylve = yylvals + p;",
514 " yylvlim = yylvals + s;",
515 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
516 " yylpp = yylpe = yylpsns + p;",
517 " yylplim = yylpsns + s;",
518 "#endif",
519 " yylexp = yylexemes + p;",
520 " }",
521 " *yylexp = (short) YYLEX;",
522 " *yylvp++ = yylval;",
523 " yylve++;",
524 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
525 " *yylpp++ = yylloc;",
526 " yylpe++;",
527 "#endif",
528 " yychar = *yylexp++;",
529 " break;",
530 " }",
531 " /* normal operation, no conflict encountered */",
532 "#endif /* YYBTYACC */",
533 #endif /* defined(YYBTYACC) */
534 " yychar = YYLEX;",
535 #if defined(YYBTYACC)
536 "#if YYBTYACC",
537 " } while (0);",
538 "#endif /* YYBTYACC */",
539 #endif /* defined(YYBTYACC) */
540 " if (yychar < 0) yychar = YYEOF;",
541 " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */",
542 "#if YYDEBUG",
543 " if (yydebug)",
544 " {",
545 " yys = yyname[YYTRANSLATE(yychar)];",
546 " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\",",
547 " YYDEBUGSTR, yydepth, yystate, yychar, yys);",
548 "#ifdef YYSTYPE_TOSTRING",
549 #if defined(YYBTYACC)
550 "#if YYBTYACC",
551 " if (!yytrial)",
552 "#endif /* YYBTYACC */",
553 #endif /* defined(YYBTYACC) */
554 " fprintf(stderr, \" <%s>\", YYSTYPE_TOSTRING(yychar, yylval));",
555 "#endif",
556 " fputc('\\n', stderr);",
557 " }",
558 "#endif",
559 " }",
560 #if defined(YYBTYACC)
561 "#if YYBTYACC",
563 " /* Do we have a conflict? */",
564 " if (((yyn = yycindex[yystate]) != 0) && (yyn += yychar) >= 0 &&",
565 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)",
566 " {",
567 " YYINT ctry;",
569 " if (yypath)",
570 " {",
571 " YYParseState *save;",
572 "#if YYDEBUG",
573 " if (yydebug)",
574 " fprintf(stderr, \"%s[%d]: CONFLICT in state %d: following successful trial parse\\n\",",
575 " YYDEBUGSTR, yydepth, yystate);",
576 "#endif",
577 " /* Switch to the next conflict context */",
578 " save = yypath;",
579 " yypath = save->save;",
580 " save->save = NULL;",
581 " ctry = save->ctry;",
582 " if (save->state != yystate) YYABORT;",
583 " yyFreeState(save);",
585 " }",
586 " else",
587 " {",
589 " /* Unresolved conflict - start/continue trial parse */",
590 " YYParseState *save;",
591 "#if YYDEBUG",
592 " if (yydebug)",
593 " {",
594 " fprintf(stderr, \"%s[%d]: CONFLICT in state %d. \", YYDEBUGSTR, yydepth, yystate);",
595 " if (yyps->save)",
596 " fputs(\"ALREADY in conflict, continuing trial parse.\\n\", stderr);",
597 " else",
598 " fputs(\"Starting trial parse.\\n\", stderr);",
599 " }",
600 "#endif",
601 " save = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));",
602 " if (save == NULL) goto yyenomem;",
603 " save->save = yyps->save;",
604 " save->state = yystate;",
605 " save->errflag = yyerrflag;",
606 " save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);",
607 " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));",
608 " save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);",
609 " memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));",
610 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
611 " save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base);",
612 " memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));",
613 "#endif",
614 " ctry = yytable[yyn];",
615 " if (yyctable[ctry] == -1)",
616 " {",
617 "#if YYDEBUG",
618 " if (yydebug && yychar >= YYEOF)",
619 " fprintf(stderr, \"%s[%d]: backtracking 1 token\\n\", YYDEBUGSTR, yydepth);",
620 "#endif",
621 " ctry++;",
622 " }",
623 " save->ctry = ctry;",
624 " if (yyps->save == NULL)",
625 " {",
626 " /* If this is a first conflict in the stack, start saving lexemes */",
627 " if (!yylexemes)",
628 " {",
629 " yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));",
630 " if (yylexemes == NULL) goto yyenomem;",
631 " yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));",
632 " if (yylvals == NULL) goto yyenomem;",
633 " yylvlim = yylvals + YYLVQUEUEGROWTH;",
634 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
635 " yylpsns = (YYLTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYLTYPE));",
636 " if (yylpsns == NULL) goto yyenomem;",
637 " yylplim = yylpsns + YYLVQUEUEGROWTH;",
638 "#endif",
639 " }",
640 " if (yylvp == yylve)",
641 " {",
642 " yylvp = yylve = yylvals;",
643 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
644 " yylpp = yylpe = yylpsns;",
645 "#endif",
646 " yylexp = yylexemes;",
647 " if (yychar >= YYEOF)",
648 " {",
649 " *yylve++ = yylval;",
650 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
651 " *yylpe++ = yylloc;",
652 "#endif",
653 " *yylexp = (short) yychar;",
654 " yychar = YYEMPTY;",
655 " }",
656 " }",
657 " }",
658 " if (yychar >= YYEOF)",
659 " {",
660 " yylvp--;",
661 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
662 " yylpp--;",
663 "#endif",
664 " yylexp--;",
665 " yychar = YYEMPTY;",
666 " }",
667 " save->lexeme = (int) (yylvp - yylvals);",
668 " yyps->save = save;",
669 " }",
670 " if (yytable[yyn] == ctry)",
671 " {",
672 "#if YYDEBUG",
673 " if (yydebug)",
674 " fprintf(stderr, \"%s[%d]: state %d, shifting to state %d\\n\",",
675 " YYDEBUGSTR, yydepth, yystate, yyctable[ctry]);",
676 "#endif",
677 " if (yychar < 0)",
678 " {",
679 " yylvp++;",
680 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
681 " yylpp++;",
682 "#endif",
683 " yylexp++;",
684 " }",
685 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)",
686 " goto yyoverflow;",
687 " yystate = yyctable[ctry];",
688 " *++yystack.s_mark = (short) yystate;",
689 " *++yystack.l_mark = yylval;",
690 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
691 " *++yystack.p_mark = yylloc;",
692 "#endif",
693 " yychar = YYEMPTY;",
694 " if (yyerrflag > 0) --yyerrflag;",
695 " goto yyloop;",
696 " }",
697 " else",
698 " {",
699 " yyn = yyctable[ctry];",
700 " goto yyreduce;",
701 " }",
702 " } /* End of code dealing with conflicts */",
703 "#endif /* YYBTYACC */",
704 #endif /* defined(YYBTYACC) */
705 " if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&",
706 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)",
707 " {",
708 "#if YYDEBUG",
709 " if (yydebug)",
710 " fprintf(stderr, \"%s[%d]: state %d, shifting to state %d\\n\",",
711 " YYDEBUGSTR, yydepth, yystate, yytable[yyn]);",
712 "#endif",
713 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;",
714 " yystate = yytable[yyn];",
715 " *++yystack.s_mark = yytable[yyn];",
716 " *++yystack.l_mark = yylval;",
717 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
718 " *++yystack.p_mark = yylloc;",
719 "#endif",
720 " yychar = YYEMPTY;",
721 " if (yyerrflag > 0) --yyerrflag;",
722 " goto yyloop;",
723 " }",
724 " if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&",
725 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)",
726 " {",
727 " yyn = yytable[yyn];",
728 " goto yyreduce;",
729 " }",
730 " if (yyerrflag != 0) goto yyinrecovery;",
731 #if defined(YYBTYACC)
732 "#if YYBTYACC",
734 " yynewerrflag = 1;",
735 " goto yyerrhandler;",
736 " goto yyerrlab;",
738 "yyerrlab:",
739 " yynewerrflag = 0;",
740 "yyerrhandler:",
741 " while (yyps->save)",
742 " {",
743 " int ctry;",
744 " YYParseState *save = yyps->save;",
745 "#if YYDEBUG",
746 " if (yydebug)",
747 " fprintf(stderr, \"%s[%d]: ERROR in state %d, CONFLICT BACKTRACKING to state %d, %d tokens\\n\",",
748 " YYDEBUGSTR, yydepth, yystate, yyps->save->state,",
749 " (int)(yylvp - yylvals - yyps->save->lexeme));",
750 "#endif",
751 " /* Memorize most forward-looking error state in case it's really an error. */",
752 " if (yyerrctx == NULL || yyerrctx->lexeme < yylvp - yylvals)",
753 " {",
754 " /* Free old saved error context state */",
755 " if (yyerrctx) yyFreeState(yyerrctx);",
756 " /* Create and fill out new saved error context state */",
757 " yyerrctx = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));",
758 " if (yyerrctx == NULL) goto yyenomem;",
759 " yyerrctx->save = yyps->save;",
760 " yyerrctx->state = yystate;",
761 " yyerrctx->errflag = yyerrflag;",
762 " yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);",
763 " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));",
764 " yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);",
765 " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));",
766 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
767 " yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);",
768 " memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));",
769 "#endif",
770 " yyerrctx->lexeme = (int) (yylvp - yylvals);",
771 " }",
772 " yylvp = yylvals + save->lexeme;",
773 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
774 " yylpp = yylpsns + save->lexeme;",
775 "#endif",
776 " yylexp = yylexemes + save->lexeme;",
777 " yychar = YYEMPTY;",
778 " yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);",
779 " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));",
780 " yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);",
781 " memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));",
782 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
783 " yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);",
784 " memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));",
785 "#endif",
786 " ctry = ++save->ctry;",
787 " yystate = save->state;",
788 " /* We tried shift, try reduce now */",
789 " if ((yyn = yyctable[ctry]) >= 0) goto yyreduce;",
790 " yyps->save = save->save;",
791 " save->save = NULL;",
792 " yyFreeState(save);",
794 " /* Nothing left on the stack -- error */",
795 " if (!yyps->save)",
796 " {",
797 "#if YYDEBUG",
798 " if (yydebug)",
799 " fprintf(stderr, \"%sdebug[%d,trial]: trial parse FAILED, entering ERROR mode\\n\",",
800 " YYPREFIX, yydepth);",
801 "#endif",
802 " /* Restore state as it was in the most forward-advanced error */",
803 " yylvp = yylvals + yyerrctx->lexeme;",
804 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
805 " yylpp = yylpsns + yyerrctx->lexeme;",
806 "#endif",
807 " yylexp = yylexemes + yyerrctx->lexeme;",
808 " yychar = yylexp[-1];",
809 " yylval = yylvp[-1];",
810 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
811 " yylloc = yylpp[-1];",
812 "#endif",
813 " yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);",
814 " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));",
815 " yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);",
816 " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));",
817 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
818 " yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);",
819 " memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));",
820 "#endif",
821 " yystate = yyerrctx->state;",
822 " yyFreeState(yyerrctx);",
823 " yyerrctx = NULL;",
824 " }",
825 " yynewerrflag = 1;",
826 " }",
827 " if (yynewerrflag == 0) goto yyinrecovery;",
828 "#endif /* YYBTYACC */",
829 #endif /* defined(YYBTYACC) */
831 " YYERROR_CALL(\"syntax error\");",
832 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
833 " yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */",
834 "#endif",
836 "#if !YYBTYACC",
837 " goto yyerrlab;",
838 "yyerrlab:",
839 "#endif",
840 " ++yynerrs;",
842 "yyinrecovery:",
843 " if (yyerrflag < 3)",
844 " {",
845 " yyerrflag = 3;",
846 " for (;;)",
847 " {",
848 " if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&",
849 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)",
850 " {",
851 "#if YYDEBUG",
852 " if (yydebug)",
853 " fprintf(stderr, \"%s[%d]: state %d, error recovery shifting to state %d\\n\",",
854 " YYDEBUGSTR, yydepth, *yystack.s_mark, yytable[yyn]);",
855 "#endif",
856 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;",
857 " yystate = yytable[yyn];",
858 " *++yystack.s_mark = yytable[yyn];",
859 " *++yystack.l_mark = yylval;",
860 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
861 " /* lookahead position is error end position */",
862 " yyerror_loc_range[1] = yylloc;",
863 " YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */",
864 " *++yystack.p_mark = yyloc;",
865 "#endif",
866 " goto yyloop;",
867 " }",
868 " else",
869 " {",
870 "#if YYDEBUG",
871 " if (yydebug)",
872 " fprintf(stderr, \"%s[%d]: error recovery discarding state %d\\n\",",
873 " YYDEBUGSTR, yydepth, *yystack.s_mark);",
874 "#endif",
875 " if (yystack.s_mark <= yystack.s_base) goto yyabort;",
876 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
877 " /* the current TOS position is the error start position */",
878 " yyerror_loc_range[0] = *yystack.p_mark;",
879 "#endif",
880 "#if defined(YYDESTRUCT_CALL)",
881 #if defined(YYBTYACC)
882 "#if YYBTYACC",
883 " if (!yytrial)",
884 "#endif /* YYBTYACC */",
885 #endif /* defined(YYBTYACC) */
886 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
887 " YYDESTRUCT_CALL(\"error: discarding state\",",
888 " yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);",
889 "#else",
890 " YYDESTRUCT_CALL(\"error: discarding state\",",
891 " yystos[*yystack.s_mark], yystack.l_mark);",
892 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */",
893 "#endif /* defined(YYDESTRUCT_CALL) */",
894 " --yystack.s_mark;",
895 " --yystack.l_mark;",
896 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
897 " --yystack.p_mark;",
898 "#endif",
899 " }",
900 " }",
901 " }",
902 " else",
903 " {",
904 " if (yychar == YYEOF) goto yyabort;",
905 "#if YYDEBUG",
906 " if (yydebug)",
907 " {",
908 " yys = yyname[YYTRANSLATE(yychar)];",
909 " fprintf(stderr, \"%s[%d]: state %d, error recovery discarding token %d (%s)\\n\",",
910 " YYDEBUGSTR, yydepth, yystate, yychar, yys);",
911 " }",
912 "#endif",
913 "#if defined(YYDESTRUCT_CALL)",
914 #if defined(YYBTYACC)
915 "#if YYBTYACC",
916 " if (!yytrial)",
917 "#endif /* YYBTYACC */",
918 #endif /* defined(YYBTYACC) */
919 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
920 " YYDESTRUCT_CALL(\"error: discarding token\", yychar, &yylval, &yylloc);",
921 "#else",
922 " YYDESTRUCT_CALL(\"error: discarding token\", yychar, &yylval);",
923 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */",
924 "#endif /* defined(YYDESTRUCT_CALL) */",
925 " yychar = YYEMPTY;",
926 " goto yyloop;",
927 " }",
929 "yyreduce:",
930 " yym = yylen[yyn];",
931 "#if YYDEBUG",
932 " if (yydebug)",
933 " {",
934 " fprintf(stderr, \"%s[%d]: state %d, reducing by rule %d (%s)\",",
935 " YYDEBUGSTR, yydepth, yystate, yyn, yyrule[yyn]);",
936 "#ifdef YYSTYPE_TOSTRING",
937 #if defined(YYBTYACC)
938 "#if YYBTYACC",
939 " if (!yytrial)",
940 "#endif /* YYBTYACC */",
941 #endif /* defined(YYBTYACC) */
942 " if (yym > 0)",
943 " {",
944 " int i;",
945 " fputc('<', stderr);",
946 " for (i = yym; i > 0; i--)",
947 " {",
948 " if (i != yym) fputs(\", \", stderr);",
949 " fputs(YYSTYPE_TOSTRING(yystos[yystack.s_mark[1-i]],",
950 " yystack.l_mark[1-i]), stderr);",
951 " }",
952 " fputc('>', stderr);",
953 " }",
954 "#endif",
955 " fputc('\\n', stderr);",
956 " }",
957 "#endif",
958 " if (yym > 0)",
959 " yyval = yystack.l_mark[1-yym];",
960 " else",
961 " memset(&yyval, 0, sizeof yyval);",
962 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
964 " /* Perform position reduction */",
965 " memset(&yyloc, 0, sizeof(yyloc));",
966 #if defined(YYBTYACC)
967 "#if YYBTYACC",
968 " if (!yytrial)",
969 "#endif /* YYBTYACC */",
970 #endif /* defined(YYBTYACC) */
971 " {",
972 " YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);",
973 " /* just in case YYERROR is invoked within the action, save",
974 " the start of the rhs as the error start position */",
975 " yyerror_loc_range[0] = yystack.p_mark[1-yym];",
976 " }",
977 "#endif",
979 " switch (yyn)",
980 " {",
984 const char *const trailer[] =
986 " default:",
987 " break;",
988 " }",
989 " yystack.s_mark -= yym;",
990 " yystate = *yystack.s_mark;",
991 " yystack.l_mark -= yym;",
992 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
993 " yystack.p_mark -= yym;",
994 "#endif",
995 " yym = yylhs[yyn];",
996 " if (yystate == 0 && yym == 0)",
997 " {",
998 "#if YYDEBUG",
999 " if (yydebug)",
1000 " {",
1001 " fprintf(stderr, \"%s[%d]: after reduction, \", YYDEBUGSTR, yydepth);",
1002 "#ifdef YYSTYPE_TOSTRING",
1003 #if defined(YYBTYACC)
1004 "#if YYBTYACC",
1005 " if (!yytrial)",
1006 "#endif /* YYBTYACC */",
1007 #endif /* defined(YYBTYACC) */
1008 " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));",
1009 "#endif",
1010 " fprintf(stderr, \"shifting from state 0 to final state %d\\n\", YYFINAL);",
1011 " }",
1012 "#endif",
1013 " yystate = YYFINAL;",
1014 " *++yystack.s_mark = YYFINAL;",
1015 " *++yystack.l_mark = yyval;",
1016 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1017 " *++yystack.p_mark = yyloc;",
1018 "#endif",
1019 " if (yychar < 0)",
1020 " {",
1021 #if defined(YYBTYACC)
1022 "#if YYBTYACC",
1023 " do {",
1024 " if (yylvp < yylve)",
1025 " {",
1026 " /* we're currently re-reading tokens */",
1027 " yylval = *yylvp++;",
1028 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1029 " yylloc = *yylpp++;",
1030 "#endif",
1031 " yychar = *yylexp++;",
1032 " break;",
1033 " }",
1034 " if (yyps->save)",
1035 " {",
1036 " /* in trial mode; save scanner results for future parse attempts */",
1037 " if (yylvp == yylvlim)",
1038 " { /* Enlarge lexical value queue */",
1039 " size_t p = (size_t) (yylvp - yylvals);",
1040 " size_t s = (size_t) (yylvlim - yylvals);",
1042 " s += YYLVQUEUEGROWTH;",
1043 " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)",
1044 " goto yyenomem;",
1045 " if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)",
1046 " goto yyenomem;",
1047 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1048 " if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)",
1049 " goto yyenomem;",
1050 "#endif",
1051 " yylvp = yylve = yylvals + p;",
1052 " yylvlim = yylvals + s;",
1053 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1054 " yylpp = yylpe = yylpsns + p;",
1055 " yylplim = yylpsns + s;",
1056 "#endif",
1057 " yylexp = yylexemes + p;",
1058 " }",
1059 " *yylexp = (short) YYLEX;",
1060 " *yylvp++ = yylval;",
1061 " yylve++;",
1062 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1063 " *yylpp++ = yylloc;",
1064 " yylpe++;",
1065 "#endif",
1066 " yychar = *yylexp++;",
1067 " break;",
1068 " }",
1069 " /* normal operation, no conflict encountered */",
1070 "#endif /* YYBTYACC */",
1071 #endif /* defined(YYBTYACC) */
1072 " yychar = YYLEX;",
1073 #if defined(YYBTYACC)
1074 "#if YYBTYACC",
1075 " } while (0);",
1076 "#endif /* YYBTYACC */",
1077 #endif /* defined(YYBTYACC) */
1078 " if (yychar < 0) yychar = YYEOF;",
1079 " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */",
1080 "#if YYDEBUG",
1081 " if (yydebug)",
1082 " {",
1083 " yys = yyname[YYTRANSLATE(yychar)];",
1084 " fprintf(stderr, \"%s[%d]: state %d, reading %d (%s)\\n\",",
1085 " YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);",
1086 " }",
1087 "#endif",
1088 " }",
1089 " if (yychar == YYEOF) goto yyaccept;",
1090 " goto yyloop;",
1091 " }",
1092 " if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&",
1093 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)",
1094 " yystate = yytable[yyn];",
1095 " else",
1096 " yystate = yydgoto[yym];",
1097 "#if YYDEBUG",
1098 " if (yydebug)",
1099 " {",
1100 " fprintf(stderr, \"%s[%d]: after reduction, \", YYDEBUGSTR, yydepth);",
1101 "#ifdef YYSTYPE_TOSTRING",
1102 #if defined(YYBTYACC)
1103 "#if YYBTYACC",
1104 " if (!yytrial)",
1105 "#endif /* YYBTYACC */",
1106 #endif /* defined(YYBTYACC) */
1107 " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[yystate], yyval));",
1108 "#endif",
1109 " fprintf(stderr, \"shifting from state %d to state %d\\n\", *yystack.s_mark, yystate);",
1110 " }",
1111 "#endif",
1112 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;",
1113 " *++yystack.s_mark = (short) yystate;",
1114 " *++yystack.l_mark = yyval;",
1115 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1116 " *++yystack.p_mark = yyloc;",
1117 "#endif",
1118 " goto yyloop;",
1119 #if defined(YYBTYACC)
1120 "#if YYBTYACC",
1122 " /* Reduction declares that this path is valid. Set yypath and do a full parse */",
1123 "yyvalid:",
1124 " if (yypath) YYABORT;",
1125 " while (yyps->save)",
1126 " {",
1127 " YYParseState *save = yyps->save;",
1128 " yyps->save = save->save;",
1129 " save->save = yypath;",
1130 " yypath = save;",
1131 " }",
1132 "#if YYDEBUG",
1133 " if (yydebug)",
1134 " fprintf(stderr, \"%s[%d]: state %d, CONFLICT trial successful, backtracking to state %d, %d tokens\\n\",",
1135 " YYDEBUGSTR, yydepth, yystate, yypath->state, (int)(yylvp - yylvals - yypath->lexeme));",
1136 "#endif",
1137 " if (yyerrctx)",
1138 " {",
1139 " yyFreeState(yyerrctx);",
1140 " yyerrctx = NULL;",
1141 " }",
1142 " yylvp = yylvals + yypath->lexeme;",
1143 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1144 " yylpp = yylpsns + yypath->lexeme;",
1145 "#endif",
1146 " yylexp = yylexemes + yypath->lexeme;",
1147 " yychar = YYEMPTY;",
1148 " yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);",
1149 " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));",
1150 " yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);",
1151 " memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));",
1152 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1153 " yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);",
1154 " memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));",
1155 "#endif",
1156 " yystate = yypath->state;",
1157 " goto yyloop;",
1158 "#endif /* YYBTYACC */",
1159 #endif /* defined(YYBTYACC) */
1161 "yyoverflow:",
1162 " YYERROR_CALL(\"yacc stack overflow\");",
1163 #if defined(YYBTYACC)
1164 "#if YYBTYACC",
1165 " goto yyabort_nomem;",
1166 "yyenomem:",
1167 " YYERROR_CALL(\"memory exhausted\");",
1168 "yyabort_nomem:",
1169 "#endif /* YYBTYACC */",
1170 #endif /* defined(YYBTYACC) */
1171 " yyresult = 2;",
1172 " goto yyreturn;",
1174 "yyabort:",
1175 " yyresult = 1;",
1176 " goto yyreturn;",
1178 "yyaccept:",
1179 #if defined(YYBTYACC)
1180 "#if YYBTYACC",
1181 " if (yyps->save) goto yyvalid;",
1182 "#endif /* YYBTYACC */",
1183 #endif /* defined(YYBTYACC) */
1184 " yyresult = 0;",
1186 "yyreturn:",
1187 "#if defined(YYDESTRUCT_CALL)",
1188 " if (yychar != YYEOF && yychar != YYEMPTY)",
1189 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1190 " YYDESTRUCT_CALL(\"cleanup: discarding token\", yychar, &yylval, &yylloc);",
1191 "#else",
1192 " YYDESTRUCT_CALL(\"cleanup: discarding token\", yychar, &yylval);",
1193 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */",
1195 " {",
1196 " YYSTYPE *pv;",
1197 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)",
1198 " YYLTYPE *pp;",
1200 " for (pv = yystack.l_base, pp = yystack.p_base; pv <= yystack.l_mark; ++pv, ++pp)",
1201 " YYDESTRUCT_CALL(\"cleanup: discarding state\",",
1202 " yystos[*(yystack.s_base + (pv - yystack.l_base))], pv, pp);",
1203 "#else",
1204 " for (pv = yystack.l_base; pv <= yystack.l_mark; ++pv)",
1205 " YYDESTRUCT_CALL(\"cleanup: discarding state\",",
1206 " yystos[*(yystack.s_base + (pv - yystack.l_base))], pv);",
1207 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */",
1208 " }",
1209 "#endif /* defined(YYDESTRUCT_CALL) */",
1211 #if defined(YYBTYACC)
1212 "#if YYBTYACC",
1213 " if (yyerrctx)",
1214 " {",
1215 " yyFreeState(yyerrctx);",
1216 " yyerrctx = NULL;",
1217 " }",
1218 " while (yyps)",
1219 " {",
1220 " YYParseState *save = yyps;",
1221 " yyps = save->save;",
1222 " save->save = NULL;",
1223 " yyFreeState(save);",
1224 " }",
1225 " while (yypath)",
1226 " {",
1227 " YYParseState *save = yypath;",
1228 " yypath = save->save;",
1229 " save->save = NULL;",
1230 " yyFreeState(save);",
1231 " }",
1232 "#endif /* YYBTYACC */",
1233 #endif /* defined(YYBTYACC) */
1234 " yyfreestack(&yystack);",
1235 " return (yyresult);",
1236 "}",
1240 void
1241 write_section(FILE * fp, const char *const section[])
1243 int i;
1244 const char *s;
1246 for (i = 0; (s = section[i]) != 0; ++i)
1248 if (fp == code_file)
1249 ++outline;
1250 fprintf(fp, "%s\n", s);