1 /* This file generated automatically using 2 * @Id: skel2c,v 1.3 2014/04/06 19:48:04 tom Exp @ 3 */ 4 5 /* @Id: btyaccpar.skel,v 1.3 2016/06/06 23:35:55 Tom.Shields Exp @ */ 6 7 #include "defs.h" 8 9 /* If the skeleton is changed, the banner should be changed so that */ 10 /* the altered version can be easily distinguished from the original. */ 11 /* */ 12 /* The #defines included with the banner are there because they are */ 13 /* useful in subsequent code. The macros #defined in the header or */ 14 /* the body either are not useful outside of semantic actions or */ 15 /* are conditional. */ 16 17 const char *const banner[] = 18 { 19 "/* original parser id follows */", 20 "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */", 21 "/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */", 22 "", 23 "#define YYBYACC 1", 24 CONCAT1("#define YYMAJOR ", YYMAJOR), 25 CONCAT1("#define YYMINOR ", YYMINOR), 26 #ifdef YYPATCH 27 CONCAT1("#define YYPATCH ", YYPATCH), 28 #endif 29 "", 30 "#define YYEMPTY (-1)", 31 "#define yyclearin (yychar = YYEMPTY)", 32 "#define yyerrok (yyerrflag = 0)", 33 "#define YYRECOVERING() (yyerrflag != 0)", 34 "#define YYENOMEM (-2)", 35 "#define YYEOF 0", 36 0 37 }; 38 39 const char *const xdecls[] = 40 { 41 "", 42 "extern int YYPARSE_DECL();", 43 0 44 }; 45 46 const char *const tables[] = 47 { 48 "extern const YYINT yylhs[];", 49 "extern const YYINT yylen[];", 50 "extern const YYINT yydefred[];", 51 "extern const YYINT yystos[];", 52 "extern const YYINT yydgoto[];", 53 "extern const YYINT yysindex[];", 54 "extern const YYINT yyrindex[];", 55 #if defined(YYBTYACC) 56 "#if YYBTYACC", 57 "extern const YYINT yycindex[];", 58 "#endif /* YYBTYACC */", 59 #endif /* defined(YYBTYACC) */ 60 "extern const YYINT yygindex[];", 61 "extern const YYINT yytable[];", 62 "extern const YYINT yycheck[];", 63 #if defined(YYBTYACC) 64 "#if YYBTYACC", 65 "extern const YYINT yyctable[];", 66 "#endif /* YYBTYACC */", 67 #endif /* defined(YYBTYACC) */ 68 "", 69 "#if YYDEBUG || defined(yytname)", 70 "extern const char *const yyname[];", 71 "#endif", 72 "#if YYDEBUG", 73 "extern const char *const yyrule[];", 74 "#endif", 75 0 76 }; 77 78 const char *const global_vars[] = 79 { 80 "", 81 "int yydebug;", 82 "int yynerrs;", 83 0 84 }; 85 86 const char *const impure_vars[] = 87 { 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", 97 0 98 }; 99 100 const char *const hdr_defs[] = 101 { 102 "", 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", 127 "", 128 "#ifndef YYLVQUEUEGROWTH", 129 "#define YYLVQUEUEGROWTH 32", 130 "#endif", 131 "#endif /* YYBTYACC */", 132 #endif /* defined(YYBTYACC) */ 133 "", 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", 146 "", 147 "#ifndef YYINITSTACKSIZE", 148 "#define YYINITSTACKSIZE 200", 149 "#endif", 150 "", 151 "typedef struct {", 152 " unsigned stacksize;", 153 " YYINT *s_base;", 154 " YYINT *s_mark;", 155 " YYINT *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", 165 "", 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) */ 178 0 179 }; 180 181 const char *const hdr_vars[] = 182 { 183 "/* variables for the parser stack */", 184 "static YYSTACKDATA yystack;", 185 #if defined(YYBTYACC) 186 "#if YYBTYACC", 187 "", 188 "/* Current parser state */", 189 "static YYParseState *yyps = 0;", 190 "", 191 "/* yypath != NULL: do the full parse, starting at *yypath parser state. */", 192 "static YYParseState *yypath = 0;", 193 "", 194 "/* Base of the lexical value queue */", 195 "static YYSTYPE *yylvals = 0;", 196 "", 197 "/* Current position at lexical value queue */", 198 "static YYSTYPE *yylvp = 0;", 199 "", 200 "/* End position of lexical value queue */", 201 "static YYSTYPE *yylve = 0;", 202 "", 203 "/* The last allocated position at the lexical value queue */", 204 "static YYSTYPE *yylvlim = 0;", 205 "", 206 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 207 "/* Base of the lexical position queue */", 208 "static YYLTYPE *yylpsns = 0;", 209 "", 210 "/* Current position at lexical position queue */", 211 "static YYLTYPE *yylpp = 0;", 212 "", 213 "/* End position of lexical position queue */", 214 "static YYLTYPE *yylpe = 0;", 215 "", 216 "/* The last allocated position at the lexical position queue */", 217 "static YYLTYPE *yylplim = 0;", 218 "#endif", 219 "", 220 "/* Current position at lexical token queue */", 221 "static short *yylexp = 0;", 222 "", 223 "static short *yylexemes = 0;", 224 "#endif /* YYBTYACC */", 225 #endif /* defined(YYBTYACC) */ 226 0 227 }; 228 229 const char *const body_vars[] = 230 { 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", 239 "", 240 " /* variables for the parser stack */", 241 " YYSTACKDATA yystack;", 242 #if defined(YYBTYACC) 243 "#if YYBTYACC", 244 "", 245 " /* Current parser state */", 246 " static YYParseState *yyps = 0;", 247 "", 248 " /* yypath != NULL: do the full parse, starting at *yypath parser state. */", 249 " static YYParseState *yypath = 0;", 250 "", 251 " /* Base of the lexical value queue */", 252 " static YYSTYPE *yylvals = 0;", 253 "", 254 " /* Current position at lexical value queue */", 255 " static YYSTYPE *yylvp = 0;", 256 "", 257 " /* End position of lexical value queue */", 258 " static YYSTYPE *yylve = 0;", 259 "", 260 " /* The last allocated position at the lexical value queue */", 261 " static YYSTYPE *yylvlim = 0;", 262 "", 263 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 264 " /* Base of the lexical position queue */", 265 " static YYLTYPE *yylpsns = 0;", 266 "", 267 " /* Current position at lexical position queue */", 268 " static YYLTYPE *yylpp = 0;", 269 "", 270 " /* End position of lexical position queue */", 271 " static YYLTYPE *yylpe = 0;", 272 "", 273 " /* The last allocated position at the lexical position queue */", 274 " static YYLTYPE *yylplim = 0;", 275 "#endif", 276 "", 277 " /* Current position at lexical token queue */", 278 " static short *yylexp = 0;", 279 "", 280 " static short *yylexemes = 0;", 281 "#endif /* YYBTYACC */", 282 #endif /* defined(YYBTYACC) */ 283 0 284 }; 285 286 const char *const body_1[] = 287 { 288 "", 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) */ 296 "", 297 "#if YYDEBUG", 298 "#include <stdio.h> /* needed for printf */", 299 "#endif", 300 "", 301 "#include <stdlib.h> /* needed for malloc, etc */", 302 "#include <string.h> /* needed for memset */", 303 "", 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 " YYINT *newss;", 310 " YYSTYPE *newvs;", 311 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 312 " YYLTYPE *newps;", 313 "#endif", 314 "", 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;", 321 "", 322 " i = (int) (data->s_mark - data->s_base);", 323 " newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));", 324 " if (newss == 0)", 325 " return YYENOMEM;", 326 "", 327 " data->s_base = newss;", 328 " data->s_mark = newss + i;", 329 "", 330 " newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));", 331 " if (newvs == 0)", 332 " return YYENOMEM;", 333 "", 334 " data->l_base = newvs;", 335 " data->l_mark = newvs + i;", 336 "", 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;", 341 "", 342 " data->p_base = newps;", 343 " data->p_mark = newps + i;", 344 "#endif", 345 "", 346 " data->stacksize = newsize;", 347 " data->s_last = data->s_base + newsize - 1;", 348 "", 349 "#if YYDEBUG", 350 " if (yydebug)", 351 " fprintf(stderr, \"%sdebug: stack size increased to %d\\n\", YYPREFIX, newsize);", 352 "#endif", 353 " return 0;", 354 "}", 355 "", 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", 371 "", 372 "static YYParseState *", 373 "yyNewState(unsigned size)", 374 "{", 375 " YYParseState *p = (YYParseState *) malloc(sizeof(YYParseState));", 376 " if (p == NULL) return NULL;", 377 "", 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 = (YYINT *) malloc(size * sizeof(YYINT));", 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", 398 "", 399 " return p;", 400 "}", 401 "", 402 "static void", 403 "yyFreeState(YYParseState *p)", 404 "{", 405 " yyfreestack(&p->yystack);", 406 " free(p);", 407 "}", 408 "#endif /* YYBTYACC */", 409 #endif /* defined(YYBTYACC) */ 410 "", 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) */ 422 "", 423 "int", 424 "YYPARSE_DECL()", 425 "{", 426 0 427 }; 428 429 const char *const body_2[] = 430 { 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;", 443 "", 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", 453 "", 454 #if defined(YYBTYACC) 455 "#if YYBTYACC", 456 " yyps = yyNewState(0); if (yyps == 0) goto yyenomem;", 457 " yyps->save = 0;", 458 "#endif /* YYBTYACC */", 459 #endif /* defined(YYBTYACC) */ 460 " yym = 0;", 461 " yyn = 0;", 462 " yynerrs = 0;", 463 " yyerrflag = 0;", 464 " yychar = YYEMPTY;", 465 " yystate = 0;", 466 "", 467 "#if YYPURE", 468 " memset(&yystack, 0, sizeof(yystack));", 469 "#endif", 470 "", 471 " if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;", 472 " yystack.s_mark = yystack.s_base;", 473 " yystack.l_mark = yystack.l_base;", 474 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 475 " yystack.p_mark = yystack.p_base;", 476 "#endif", 477 " yystate = 0;", 478 " *yystack.s_mark = 0;", 479 "", 480 "yyloop:", 481 " if ((yyn = yydefred[yystate]) != 0) goto yyreduce;", 482 " if (yychar < 0)", 483 " {", 484 #if defined(YYBTYACC) 485 "#if YYBTYACC", 486 " do {", 487 " if (yylvp < yylve)", 488 " {", 489 " /* we're currently re-reading tokens */", 490 " yylval = *yylvp++;", 491 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 492 " yylloc = *yylpp++;", 493 "#endif", 494 " yychar = *yylexp++;", 495 " break;", 496 " }", 497 " if (yyps->save)", 498 " {", 499 " /* in trial mode; save scanner results for future parse attempts */", 500 " if (yylvp == yylvlim)", 501 " { /* Enlarge lexical value queue */", 502 " size_t p = (size_t) (yylvp - yylvals);", 503 " size_t s = (size_t) (yylvlim - yylvals);", 504 "", 505 " s += YYLVQUEUEGROWTH;", 506 " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;", 507 " if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL) goto yyenomem;", 508 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 509 " if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL) goto yyenomem;", 510 "#endif", 511 " yylvp = yylve = yylvals + p;", 512 " yylvlim = yylvals + s;", 513 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 514 " yylpp = yylpe = yylpsns + p;", 515 " yylplim = yylpsns + s;", 516 "#endif", 517 " yylexp = yylexemes + p;", 518 " }", 519 " *yylexp = (short) YYLEX;", 520 " *yylvp++ = yylval;", 521 " yylve++;", 522 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 523 " *yylpp++ = yylloc;", 524 " yylpe++;", 525 "#endif", 526 " yychar = *yylexp++;", 527 " break;", 528 " }", 529 " /* normal operation, no conflict encountered */", 530 "#endif /* YYBTYACC */", 531 #endif /* defined(YYBTYACC) */ 532 " yychar = YYLEX;", 533 #if defined(YYBTYACC) 534 "#if YYBTYACC", 535 " } while (0);", 536 "#endif /* YYBTYACC */", 537 #endif /* defined(YYBTYACC) */ 538 " if (yychar < 0) yychar = YYEOF;", 539 "#if YYDEBUG", 540 " if (yydebug)", 541 " {", 542 " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", 543 " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\",", 544 " YYDEBUGSTR, yydepth, yystate, yychar, yys);", 545 "#ifdef YYSTYPE_TOSTRING", 546 #if defined(YYBTYACC) 547 "#if YYBTYACC", 548 " if (!yytrial)", 549 "#endif /* YYBTYACC */", 550 #endif /* defined(YYBTYACC) */ 551 " fprintf(stderr, \" <%s>\", YYSTYPE_TOSTRING(yychar, yylval));", 552 "#endif", 553 " fputc('\\n', stderr);", 554 " }", 555 "#endif", 556 " }", 557 #if defined(YYBTYACC) 558 "#if YYBTYACC", 559 "", 560 " /* Do we have a conflict? */", 561 " if (((yyn = yycindex[yystate]) != 0) && (yyn += yychar) >= 0 &&", 562 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)", 563 " {", 564 " YYINT ctry;", 565 "", 566 " if (yypath)", 567 " {", 568 " YYParseState *save;", 569 "#if YYDEBUG", 570 " if (yydebug)", 571 " fprintf(stderr, \"%s[%d]: CONFLICT in state %d: following successful trial parse\\n\",", 572 " YYDEBUGSTR, yydepth, yystate);", 573 "#endif", 574 " /* Switch to the next conflict context */", 575 " save = yypath;", 576 " yypath = save->save;", 577 " save->save = NULL;", 578 " ctry = save->ctry;", 579 " if (save->state != yystate) YYABORT;", 580 " yyFreeState(save);", 581 "", 582 " }", 583 " else", 584 " {", 585 "", 586 " /* Unresolved conflict - start/continue trial parse */", 587 " YYParseState *save;", 588 "#if YYDEBUG", 589 " if (yydebug)", 590 " {", 591 " fprintf(stderr, \"%s[%d]: CONFLICT in state %d. \", YYDEBUGSTR, yydepth, yystate);", 592 " if (yyps->save)", 593 " fputs(\"ALREADY in conflict, continuing trial parse.\\n\", stderr);", 594 " else", 595 " fputs(\"Starting trial parse.\\n\", stderr);", 596 " }", 597 "#endif", 598 " save = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));", 599 " if (save == NULL) goto yyenomem;", 600 " save->save = yyps->save;", 601 " save->state = yystate;", 602 " save->errflag = yyerrflag;", 603 " save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);", 604 " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", 605 " save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);", 606 " memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", 607 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 608 " save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base);", 609 " memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", 610 "#endif", 611 " ctry = yytable[yyn];", 612 " if (yyctable[ctry] == -1)", 613 " {", 614 "#if YYDEBUG", 615 " if (yydebug && yychar >= YYEOF)", 616 " fprintf(stderr, \"%s[%d]: backtracking 1 token\\n\", YYDEBUGSTR, yydepth);", 617 "#endif", 618 " ctry++;", 619 " }", 620 " save->ctry = ctry;", 621 " if (yyps->save == NULL)", 622 " {", 623 " /* If this is a first conflict in the stack, start saving lexemes */", 624 " if (!yylexemes)", 625 " {", 626 " yylexemes = (short *) malloc((YYLVQUEUEGROWTH) * sizeof(short));", 627 " if (yylexemes == NULL) goto yyenomem;", 628 " yylvals = (YYSTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYSTYPE));", 629 " if (yylvals == NULL) goto yyenomem;", 630 " yylvlim = yylvals + YYLVQUEUEGROWTH;", 631 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 632 " yylpsns = (YYLTYPE *) malloc((YYLVQUEUEGROWTH) * sizeof(YYLTYPE));", 633 " if (yylpsns == NULL) goto yyenomem;", 634 " yylplim = yylpsns + YYLVQUEUEGROWTH;", 635 "#endif", 636 " }", 637 " if (yylvp == yylve)", 638 " {", 639 " yylvp = yylve = yylvals;", 640 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 641 " yylpp = yylpe = yylpsns;", 642 "#endif", 643 " yylexp = yylexemes;", 644 " if (yychar >= YYEOF)", 645 " {", 646 " *yylve++ = yylval;", 647 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 648 " *yylpe++ = yylloc;", 649 "#endif", 650 " *yylexp = (short) yychar;", 651 " yychar = YYEMPTY;", 652 " }", 653 " }", 654 " }", 655 " if (yychar >= YYEOF)", 656 " {", 657 " yylvp--;", 658 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 659 " yylpp--;", 660 "#endif", 661 " yylexp--;", 662 " yychar = YYEMPTY;", 663 " }", 664 " save->lexeme = (int) (yylvp - yylvals);", 665 " yyps->save = save;", 666 " }", 667 " if (yytable[yyn] == ctry)", 668 " {", 669 "#if YYDEBUG", 670 " if (yydebug)", 671 " fprintf(stderr, \"%s[%d]: state %d, shifting to state %d\\n\",", 672 " YYDEBUGSTR, yydepth, yystate, yyctable[ctry]);", 673 "#endif", 674 " if (yychar < 0)", 675 " {", 676 " yylvp++;", 677 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 678 " yylpp++;", 679 "#endif", 680 " yylexp++;", 681 " }", 682 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)", 683 " goto yyoverflow;", 684 " yystate = yyctable[ctry];", 685 " *++yystack.s_mark = (YYINT) yystate;", 686 " *++yystack.l_mark = yylval;", 687 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 688 " *++yystack.p_mark = yylloc;", 689 "#endif", 690 " yychar = YYEMPTY;", 691 " if (yyerrflag > 0) --yyerrflag;", 692 " goto yyloop;", 693 " }", 694 " else", 695 " {", 696 " yyn = yyctable[ctry];", 697 " goto yyreduce;", 698 " }", 699 " } /* End of code dealing with conflicts */", 700 "#endif /* YYBTYACC */", 701 #endif /* defined(YYBTYACC) */ 702 " if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&", 703 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)", 704 " {", 705 "#if YYDEBUG", 706 " if (yydebug)", 707 " fprintf(stderr, \"%s[%d]: state %d, shifting to state %d\\n\",", 708 " YYDEBUGSTR, yydepth, yystate, yytable[yyn]);", 709 "#endif", 710 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;", 711 " yystate = yytable[yyn];", 712 " *++yystack.s_mark = yytable[yyn];", 713 " *++yystack.l_mark = yylval;", 714 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 715 " *++yystack.p_mark = yylloc;", 716 "#endif", 717 " yychar = YYEMPTY;", 718 " if (yyerrflag > 0) --yyerrflag;", 719 " goto yyloop;", 720 " }", 721 " if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&", 722 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)", 723 " {", 724 " yyn = yytable[yyn];", 725 " goto yyreduce;", 726 " }", 727 " if (yyerrflag != 0) goto yyinrecovery;", 728 #if defined(YYBTYACC) 729 "#if YYBTYACC", 730 "", 731 " yynewerrflag = 1;", 732 " goto yyerrhandler;", 733 " goto yyerrlab; /* redundant goto avoids 'unused label' warning */", 734 "", 735 "yyerrlab:", 736 " /* explicit YYERROR from an action -- pop the rhs of the rule reduced", 737 " * before looking for error recovery */", 738 " yystack.s_mark -= yym;", 739 " yystate = *yystack.s_mark;", 740 " yystack.l_mark -= yym;", 741 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 742 " yystack.p_mark -= yym;", 743 "#endif", 744 "", 745 " yynewerrflag = 0;", 746 "yyerrhandler:", 747 " while (yyps->save)", 748 " {", 749 " int ctry;", 750 " YYParseState *save = yyps->save;", 751 "#if YYDEBUG", 752 " if (yydebug)", 753 " fprintf(stderr, \"%s[%d]: ERROR in state %d, CONFLICT BACKTRACKING to state %d, %d tokens\\n\",", 754 " YYDEBUGSTR, yydepth, yystate, yyps->save->state,", 755 " (int)(yylvp - yylvals - yyps->save->lexeme));", 756 "#endif", 757 " /* Memorize most forward-looking error state in case it's really an error. */", 758 " if (yyerrctx == NULL || yyerrctx->lexeme < yylvp - yylvals)", 759 " {", 760 " /* Free old saved error context state */", 761 " if (yyerrctx) yyFreeState(yyerrctx);", 762 " /* Create and fill out new saved error context state */", 763 " yyerrctx = yyNewState((unsigned)(yystack.s_mark - yystack.s_base + 1));", 764 " if (yyerrctx == NULL) goto yyenomem;", 765 " yyerrctx->save = yyps->save;", 766 " yyerrctx->state = yystate;", 767 " yyerrctx->errflag = yyerrflag;", 768 " yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);", 769 " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", 770 " yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);", 771 " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", 772 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 773 " yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);", 774 " memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", 775 "#endif", 776 " yyerrctx->lexeme = (int) (yylvp - yylvals);", 777 " }", 778 " yylvp = yylvals + save->lexeme;", 779 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 780 " yylpp = yylpsns + save->lexeme;", 781 "#endif", 782 " yylexp = yylexemes + save->lexeme;", 783 " yychar = YYEMPTY;", 784 " yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);", 785 " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", 786 " yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);", 787 " memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", 788 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 789 " yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);", 790 " memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", 791 "#endif", 792 " ctry = ++save->ctry;", 793 " yystate = save->state;", 794 " /* We tried shift, try reduce now */", 795 " if ((yyn = yyctable[ctry]) >= 0) goto yyreduce;", 796 " yyps->save = save->save;", 797 " save->save = NULL;", 798 " yyFreeState(save);", 799 "", 800 " /* Nothing left on the stack -- error */", 801 " if (!yyps->save)", 802 " {", 803 "#if YYDEBUG", 804 " if (yydebug)", 805 " fprintf(stderr, \"%sdebug[%d,trial]: trial parse FAILED, entering ERROR mode\\n\",", 806 " YYPREFIX, yydepth);", 807 "#endif", 808 " /* Restore state as it was in the most forward-advanced error */", 809 " yylvp = yylvals + yyerrctx->lexeme;", 810 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 811 " yylpp = yylpsns + yyerrctx->lexeme;", 812 "#endif", 813 " yylexp = yylexemes + yyerrctx->lexeme;", 814 " yychar = yylexp[-1];", 815 " yylval = yylvp[-1];", 816 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 817 " yylloc = yylpp[-1];", 818 "#endif", 819 " yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);", 820 " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", 821 " yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);", 822 " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", 823 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 824 " yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);", 825 " memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", 826 "#endif", 827 " yystate = yyerrctx->state;", 828 " yyFreeState(yyerrctx);", 829 " yyerrctx = NULL;", 830 " }", 831 " yynewerrflag = 1;", 832 " }", 833 " if (yynewerrflag == 0) goto yyinrecovery;", 834 "#endif /* YYBTYACC */", 835 #endif /* defined(YYBTYACC) */ 836 "", 837 " YYERROR_CALL(\"syntax error\");", 838 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 839 " yyerror_loc_range[0] = yylloc; /* lookahead position is error start position */", 840 "#endif", 841 "", 842 "#if !YYBTYACC", 843 " goto yyerrlab; /* redundant goto avoids 'unused label' warning */", 844 "yyerrlab:", 845 "#endif", 846 " ++yynerrs;", 847 "", 848 "yyinrecovery:", 849 " if (yyerrflag < 3)", 850 " {", 851 " yyerrflag = 3;", 852 " for (;;)", 853 " {", 854 " if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&", 855 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)", 856 " {", 857 "#if YYDEBUG", 858 " if (yydebug)", 859 " fprintf(stderr, \"%s[%d]: state %d, error recovery shifting to state %d\\n\",", 860 " YYDEBUGSTR, yydepth, *yystack.s_mark, yytable[yyn]);", 861 "#endif", 862 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;", 863 " yystate = yytable[yyn];", 864 " *++yystack.s_mark = yytable[yyn];", 865 " *++yystack.l_mark = yylval;", 866 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 867 " /* lookahead position is error end position */", 868 " yyerror_loc_range[1] = yylloc;", 869 " YYLLOC_DEFAULT(yyloc, yyerror_loc_range, 2); /* position of error span */", 870 " *++yystack.p_mark = yyloc;", 871 "#endif", 872 " goto yyloop;", 873 " }", 874 " else", 875 " {", 876 "#if YYDEBUG", 877 " if (yydebug)", 878 " fprintf(stderr, \"%s[%d]: error recovery discarding state %d\\n\",", 879 " YYDEBUGSTR, yydepth, *yystack.s_mark);", 880 "#endif", 881 " if (yystack.s_mark <= yystack.s_base) goto yyabort;", 882 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 883 " /* the current TOS position is the error start position */", 884 " yyerror_loc_range[0] = *yystack.p_mark;", 885 "#endif", 886 "#if defined(YYDESTRUCT_CALL)", 887 #if defined(YYBTYACC) 888 "#if YYBTYACC", 889 " if (!yytrial)", 890 "#endif /* YYBTYACC */", 891 #endif /* defined(YYBTYACC) */ 892 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 893 " YYDESTRUCT_CALL(\"error: discarding state\",", 894 " yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);", 895 "#else", 896 " YYDESTRUCT_CALL(\"error: discarding state\",", 897 " yystos[*yystack.s_mark], yystack.l_mark);", 898 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */", 899 "#endif /* defined(YYDESTRUCT_CALL) */", 900 " --yystack.s_mark;", 901 " --yystack.l_mark;", 902 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 903 " --yystack.p_mark;", 904 "#endif", 905 " }", 906 " }", 907 " }", 908 " else", 909 " {", 910 " if (yychar == YYEOF) goto yyabort;", 911 "#if YYDEBUG", 912 " if (yydebug)", 913 " {", 914 " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", 915 " fprintf(stderr, \"%s[%d]: state %d, error recovery discarding token %d (%s)\\n\",", 916 " YYDEBUGSTR, yydepth, yystate, yychar, yys);", 917 " }", 918 "#endif", 919 "#if defined(YYDESTRUCT_CALL)", 920 #if defined(YYBTYACC) 921 "#if YYBTYACC", 922 " if (!yytrial)", 923 "#endif /* YYBTYACC */", 924 #endif /* defined(YYBTYACC) */ 925 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 926 " YYDESTRUCT_CALL(\"error: discarding token\", yychar, &yylval, &yylloc);", 927 "#else", 928 " YYDESTRUCT_CALL(\"error: discarding token\", yychar, &yylval);", 929 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */", 930 "#endif /* defined(YYDESTRUCT_CALL) */", 931 " yychar = YYEMPTY;", 932 " goto yyloop;", 933 " }", 934 "", 935 "yyreduce:", 936 " yym = yylen[yyn];", 937 "#if YYDEBUG", 938 " if (yydebug)", 939 " {", 940 " fprintf(stderr, \"%s[%d]: state %d, reducing by rule %d (%s)\",", 941 " YYDEBUGSTR, yydepth, yystate, yyn, yyrule[yyn]);", 942 "#ifdef YYSTYPE_TOSTRING", 943 #if defined(YYBTYACC) 944 "#if YYBTYACC", 945 " if (!yytrial)", 946 "#endif /* YYBTYACC */", 947 #endif /* defined(YYBTYACC) */ 948 " if (yym > 0)", 949 " {", 950 " int i;", 951 " fputc('<', stderr);", 952 " for (i = yym; i > 0; i--)", 953 " {", 954 " if (i != yym) fputs(\", \", stderr);", 955 " fputs(YYSTYPE_TOSTRING(yystos[yystack.s_mark[1-i]],", 956 " yystack.l_mark[1-i]), stderr);", 957 " }", 958 " fputc('>', stderr);", 959 " }", 960 "#endif", 961 " fputc('\\n', stderr);", 962 " }", 963 "#endif", 964 " if (yym > 0)", 965 " yyval = yystack.l_mark[1-yym];", 966 " else", 967 " memset(&yyval, 0, sizeof yyval);", 968 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 969 "", 970 " /* Perform position reduction */", 971 " memset(&yyloc, 0, sizeof(yyloc));", 972 #if defined(YYBTYACC) 973 "#if YYBTYACC", 974 " if (!yytrial)", 975 "#endif /* YYBTYACC */", 976 #endif /* defined(YYBTYACC) */ 977 " {", 978 " YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);", 979 " /* just in case YYERROR is invoked within the action, save", 980 " the start of the rhs as the error start position */", 981 " yyerror_loc_range[0] = yystack.p_mark[1-yym];", 982 " }", 983 "#endif", 984 "", 985 " switch (yyn)", 986 " {", 987 0 988 }; 989 990 const char *const trailer[] = 991 { 992 " default:", 993 " break;", 994 " }", 995 " yystack.s_mark -= yym;", 996 " yystate = *yystack.s_mark;", 997 " yystack.l_mark -= yym;", 998 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 999 " yystack.p_mark -= yym;", 1000 "#endif", 1001 " yym = yylhs[yyn];", 1002 " if (yystate == 0 && yym == 0)", 1003 " {", 1004 "#if YYDEBUG", 1005 " if (yydebug)", 1006 " {", 1007 " fprintf(stderr, \"%s[%d]: after reduction, \", YYDEBUGSTR, yydepth);", 1008 "#ifdef YYSTYPE_TOSTRING", 1009 #if defined(YYBTYACC) 1010 "#if YYBTYACC", 1011 " if (!yytrial)", 1012 "#endif /* YYBTYACC */", 1013 #endif /* defined(YYBTYACC) */ 1014 " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));", 1015 "#endif", 1016 " fprintf(stderr, \"shifting from state 0 to final state %d\\n\", YYFINAL);", 1017 " }", 1018 "#endif", 1019 " yystate = YYFINAL;", 1020 " *++yystack.s_mark = YYFINAL;", 1021 " *++yystack.l_mark = yyval;", 1022 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1023 " *++yystack.p_mark = yyloc;", 1024 "#endif", 1025 " if (yychar < 0)", 1026 " {", 1027 #if defined(YYBTYACC) 1028 "#if YYBTYACC", 1029 " do {", 1030 " if (yylvp < yylve)", 1031 " {", 1032 " /* we're currently re-reading tokens */", 1033 " yylval = *yylvp++;", 1034 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1035 " yylloc = *yylpp++;", 1036 "#endif", 1037 " yychar = *yylexp++;", 1038 " break;", 1039 " }", 1040 " if (yyps->save)", 1041 " {", 1042 " /* in trial mode; save scanner results for future parse attempts */", 1043 " if (yylvp == yylvlim)", 1044 " { /* Enlarge lexical value queue */", 1045 " size_t p = (size_t) (yylvp - yylvals);", 1046 " size_t s = (size_t) (yylvlim - yylvals);", 1047 "", 1048 " s += YYLVQUEUEGROWTH;", 1049 " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)", 1050 " goto yyenomem;", 1051 " if ((yylvals = (YYSTYPE *) realloc(yylvals, s * sizeof(YYSTYPE))) == NULL)", 1052 " goto yyenomem;", 1053 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1054 " if ((yylpsns = (YYLTYPE *) realloc(yylpsns, s * sizeof(YYLTYPE))) == NULL)", 1055 " goto yyenomem;", 1056 "#endif", 1057 " yylvp = yylve = yylvals + p;", 1058 " yylvlim = yylvals + s;", 1059 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1060 " yylpp = yylpe = yylpsns + p;", 1061 " yylplim = yylpsns + s;", 1062 "#endif", 1063 " yylexp = yylexemes + p;", 1064 " }", 1065 " *yylexp = (short) YYLEX;", 1066 " *yylvp++ = yylval;", 1067 " yylve++;", 1068 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1069 " *yylpp++ = yylloc;", 1070 " yylpe++;", 1071 "#endif", 1072 " yychar = *yylexp++;", 1073 " break;", 1074 " }", 1075 " /* normal operation, no conflict encountered */", 1076 "#endif /* YYBTYACC */", 1077 #endif /* defined(YYBTYACC) */ 1078 " yychar = YYLEX;", 1079 #if defined(YYBTYACC) 1080 "#if YYBTYACC", 1081 " } while (0);", 1082 "#endif /* YYBTYACC */", 1083 #endif /* defined(YYBTYACC) */ 1084 " if (yychar < 0) yychar = YYEOF;", 1085 "#if YYDEBUG", 1086 " if (yydebug)", 1087 " {", 1088 " if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];", 1089 " fprintf(stderr, \"%s[%d]: state %d, reading token %d (%s)\\n\",", 1090 " YYDEBUGSTR, yydepth, YYFINAL, yychar, yys);", 1091 " }", 1092 "#endif", 1093 " }", 1094 " if (yychar == YYEOF) goto yyaccept;", 1095 " goto yyloop;", 1096 " }", 1097 " if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&", 1098 " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)", 1099 " yystate = yytable[yyn];", 1100 " else", 1101 " yystate = yydgoto[yym];", 1102 "#if YYDEBUG", 1103 " if (yydebug)", 1104 " {", 1105 " fprintf(stderr, \"%s[%d]: after reduction, \", YYDEBUGSTR, yydepth);", 1106 "#ifdef YYSTYPE_TOSTRING", 1107 #if defined(YYBTYACC) 1108 "#if YYBTYACC", 1109 " if (!yytrial)", 1110 "#endif /* YYBTYACC */", 1111 #endif /* defined(YYBTYACC) */ 1112 " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[yystate], yyval));", 1113 "#endif", 1114 " fprintf(stderr, \"shifting from state %d to state %d\\n\", *yystack.s_mark, yystate);", 1115 " }", 1116 "#endif", 1117 " if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;", 1118 " *++yystack.s_mark = (YYINT) yystate;", 1119 " *++yystack.l_mark = yyval;", 1120 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1121 " *++yystack.p_mark = yyloc;", 1122 "#endif", 1123 " goto yyloop;", 1124 #if defined(YYBTYACC) 1125 "#if YYBTYACC", 1126 "", 1127 " /* Reduction declares that this path is valid. Set yypath and do a full parse */", 1128 "yyvalid:", 1129 " if (yypath) YYABORT;", 1130 " while (yyps->save)", 1131 " {", 1132 " YYParseState *save = yyps->save;", 1133 " yyps->save = save->save;", 1134 " save->save = yypath;", 1135 " yypath = save;", 1136 " }", 1137 "#if YYDEBUG", 1138 " if (yydebug)", 1139 " fprintf(stderr, \"%s[%d]: state %d, CONFLICT trial successful, backtracking to state %d, %d tokens\\n\",", 1140 " YYDEBUGSTR, yydepth, yystate, yypath->state, (int)(yylvp - yylvals - yypath->lexeme));", 1141 "#endif", 1142 " if (yyerrctx)", 1143 " {", 1144 " yyFreeState(yyerrctx);", 1145 " yyerrctx = NULL;", 1146 " }", 1147 " yylvp = yylvals + yypath->lexeme;", 1148 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1149 " yylpp = yylpsns + yypath->lexeme;", 1150 "#endif", 1151 " yylexp = yylexemes + yypath->lexeme;", 1152 " yychar = YYEMPTY;", 1153 " yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);", 1154 " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(YYINT));", 1155 " yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);", 1156 " memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", 1157 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1158 " yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);", 1159 " memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", 1160 "#endif", 1161 " yystate = yypath->state;", 1162 " goto yyloop;", 1163 "#endif /* YYBTYACC */", 1164 #endif /* defined(YYBTYACC) */ 1165 "", 1166 "yyoverflow:", 1167 " YYERROR_CALL(\"yacc stack overflow\");", 1168 #if defined(YYBTYACC) 1169 "#if YYBTYACC", 1170 " goto yyabort_nomem;", 1171 "yyenomem:", 1172 " YYERROR_CALL(\"memory exhausted\");", 1173 "yyabort_nomem:", 1174 "#endif /* YYBTYACC */", 1175 #endif /* defined(YYBTYACC) */ 1176 " yyresult = 2;", 1177 " goto yyreturn;", 1178 "", 1179 "yyabort:", 1180 " yyresult = 1;", 1181 " goto yyreturn;", 1182 "", 1183 "yyaccept:", 1184 #if defined(YYBTYACC) 1185 "#if YYBTYACC", 1186 " if (yyps->save) goto yyvalid;", 1187 "#endif /* YYBTYACC */", 1188 #endif /* defined(YYBTYACC) */ 1189 " yyresult = 0;", 1190 "", 1191 "yyreturn:", 1192 "#if defined(YYDESTRUCT_CALL)", 1193 " if (yychar != YYEOF && yychar != YYEMPTY)", 1194 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1195 " YYDESTRUCT_CALL(\"cleanup: discarding token\", yychar, &yylval, &yylloc);", 1196 "#else", 1197 " YYDESTRUCT_CALL(\"cleanup: discarding token\", yychar, &yylval);", 1198 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */", 1199 "", 1200 " {", 1201 " YYSTYPE *pv;", 1202 "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", 1203 " YYLTYPE *pp;", 1204 "", 1205 " for (pv = yystack.l_base, pp = yystack.p_base; pv <= yystack.l_mark; ++pv, ++pp)", 1206 " YYDESTRUCT_CALL(\"cleanup: discarding state\",", 1207 " yystos[*(yystack.s_base + (pv - yystack.l_base))], pv, pp);", 1208 "#else", 1209 " for (pv = yystack.l_base; pv <= yystack.l_mark; ++pv)", 1210 " YYDESTRUCT_CALL(\"cleanup: discarding state\",", 1211 " yystos[*(yystack.s_base + (pv - yystack.l_base))], pv);", 1212 "#endif /* defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED) */", 1213 " }", 1214 "#endif /* defined(YYDESTRUCT_CALL) */", 1215 "", 1216 #if defined(YYBTYACC) 1217 "#if YYBTYACC", 1218 " if (yyerrctx)", 1219 " {", 1220 " yyFreeState(yyerrctx);", 1221 " yyerrctx = NULL;", 1222 " }", 1223 " while (yyps)", 1224 " {", 1225 " YYParseState *save = yyps;", 1226 " yyps = save->save;", 1227 " save->save = NULL;", 1228 " yyFreeState(save);", 1229 " }", 1230 " while (yypath)", 1231 " {", 1232 " YYParseState *save = yypath;", 1233 " yypath = save->save;", 1234 " save->save = NULL;", 1235 " yyFreeState(save);", 1236 " }", 1237 "#endif /* YYBTYACC */", 1238 #endif /* defined(YYBTYACC) */ 1239 " yyfreestack(&yystack);", 1240 " return (yyresult);", 1241 "}", 1242 0 1243 }; 1244 1245 void 1246 write_section(FILE * fp, const char *const section[]) 1247 { 1248 int i; 1249 const char *s; 1250 1251 for (i = 0; (s = section[i]) != 0; ++i) 1252 { 1253 if (fp == code_file) 1254 ++outline; 1255 fprintf(fp, "%s\n", s); 1256 } 1257 } 1258