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