1 /* A Bison parser, made by GNU Bison 3.0.2. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 19 20 /* As a special exception, you may create a larger work that contains 21 part or all of the Bison parser skeleton and distribute that work 22 under terms of your choice, so long as that work isn't itself a 23 parser generator using the skeleton or a modified version thereof 24 as a parser skeleton. Alternatively, if you modify or redistribute 25 the parser skeleton itself, you may (at your option) remove this 26 special exception, which will cause the skeleton and the resulting 27 Bison output files to be licensed under the GNU General Public 28 License without this special exception. 29 30 This special exception was added by the Free Software Foundation in 31 version 2.2 of Bison. */ 32 33 /* C LALR(1) parser skeleton written by Richard Stallman, by 34 simplifying the original so-called "semantic" parser. */ 35 36 /* All symbols defined below should begin with yy or YY, to avoid 37 infringing on user name space. This should be done even for local 38 variables, as they might otherwise be expanded by user macros. 39 There are some unavoidable exceptions within include files to 40 define necessary library symbols; they are noted "INFRINGES ON 41 USER NAME SPACE" below. */ 42 43 /* Identify Bison output. */ 44 #define YYBISON 1 45 46 /* Bison version. */ 47 #define YYBISON_VERSION "3.0.2" 48 49 /* Skeleton name. */ 50 #define YYSKELETON_NAME "yacc.c" 51 52 /* Pure parsers. */ 53 #define YYPURE 1 54 55 /* Push parsers. */ 56 #define YYPUSH 0 57 58 /* Pull parsers. */ 59 #define YYPULL 1 60 61 62 63 64 /* Copy the first part of user declarations. */ 65 #line 26 "yyscript.y" /* yacc.c:339 */ 66 67 68 #include "config.h" 69 70 #include <stddef.h> 71 #include <stdint.h> 72 #include <stdlib.h> 73 #include <string.h> 74 75 #include "script-c.h" 76 77 78 #line 79 "yyscript.c" /* yacc.c:339 */ 79 80 # ifndef YY_NULLPTR 81 # if defined __cplusplus && 201103L <= __cplusplus 82 # define YY_NULLPTR nullptr 83 # else 84 # define YY_NULLPTR 0 85 # endif 86 # endif 87 88 /* Enabling verbose error messages. */ 89 #ifdef YYERROR_VERBOSE 90 # undef YYERROR_VERBOSE 91 # define YYERROR_VERBOSE 1 92 #else 93 # define YYERROR_VERBOSE 1 94 #endif 95 96 /* In a future release of Bison, this section will be replaced 97 by #include "y.tab.h". */ 98 #ifndef YY_YY_Y_TAB_H_INCLUDED 99 # define YY_YY_Y_TAB_H_INCLUDED 100 /* Debug traces. */ 101 #ifndef YYDEBUG 102 # define YYDEBUG 0 103 #endif 104 #if YYDEBUG 105 extern int yydebug; 106 #endif 107 108 /* Token type. */ 109 #ifndef YYTOKENTYPE 110 # define YYTOKENTYPE 111 enum yytokentype 112 { 113 PLUSEQ = 258, 114 MINUSEQ = 259, 115 MULTEQ = 260, 116 DIVEQ = 261, 117 LSHIFTEQ = 262, 118 RSHIFTEQ = 263, 119 ANDEQ = 264, 120 OREQ = 265, 121 OROR = 266, 122 ANDAND = 267, 123 EQ = 268, 124 NE = 269, 125 LE = 270, 126 GE = 271, 127 LSHIFT = 272, 128 RSHIFT = 273, 129 UNARY = 274, 130 STRING = 275, 131 QUOTED_STRING = 276, 132 INTEGER = 277, 133 ABSOLUTE = 278, 134 ADDR = 279, 135 ALIGN_K = 280, 136 ALIGNOF = 281, 137 ASSERT_K = 282, 138 AS_NEEDED = 283, 139 AT = 284, 140 BIND = 285, 141 BLOCK = 286, 142 BYTE = 287, 143 CONSTANT = 288, 144 CONSTRUCTORS = 289, 145 COPY = 290, 146 CREATE_OBJECT_SYMBOLS = 291, 147 DATA_SEGMENT_ALIGN = 292, 148 DATA_SEGMENT_END = 293, 149 DATA_SEGMENT_RELRO_END = 294, 150 DEFINED = 295, 151 DSECT = 296, 152 ENTRY = 297, 153 EXCLUDE_FILE = 298, 154 EXTERN = 299, 155 FILL = 300, 156 FLOAT = 301, 157 FORCE_COMMON_ALLOCATION = 302, 158 GLOBAL = 303, 159 GROUP = 304, 160 HLL = 305, 161 INCLUDE = 306, 162 INHIBIT_COMMON_ALLOCATION = 307, 163 INFO = 308, 164 INPUT = 309, 165 KEEP = 310, 166 LEN = 311, 167 LENGTH = 312, 168 LOADADDR = 313, 169 LOCAL = 314, 170 LONG = 315, 171 MAP = 316, 172 MAX_K = 317, 173 MEMORY = 318, 174 MIN_K = 319, 175 NEXT = 320, 176 NOCROSSREFS = 321, 177 NOFLOAT = 322, 178 NOLOAD = 323, 179 ONLY_IF_RO = 324, 180 ONLY_IF_RW = 325, 181 ORG = 326, 182 ORIGIN = 327, 183 OUTPUT = 328, 184 OUTPUT_ARCH = 329, 185 OUTPUT_FORMAT = 330, 186 OVERLAY = 331, 187 PHDRS = 332, 188 PROVIDE = 333, 189 PROVIDE_HIDDEN = 334, 190 QUAD = 335, 191 SEARCH_DIR = 336, 192 SECTIONS = 337, 193 SEGMENT_START = 338, 194 SHORT = 339, 195 SIZEOF = 340, 196 SIZEOF_HEADERS = 341, 197 SORT_BY_ALIGNMENT = 342, 198 SORT_BY_NAME = 343, 199 SPECIAL = 344, 200 SQUAD = 345, 201 STARTUP = 346, 202 SUBALIGN = 347, 203 SYSLIB = 348, 204 TARGET_K = 349, 205 TRUNCATE = 350, 206 VERSIONK = 351, 207 OPTION = 352, 208 PARSING_LINKER_SCRIPT = 353, 209 PARSING_VERSION_SCRIPT = 354, 210 PARSING_DEFSYM = 355, 211 PARSING_DYNAMIC_LIST = 356 212 }; 213 #endif 214 /* Tokens. */ 215 #define PLUSEQ 258 216 #define MINUSEQ 259 217 #define MULTEQ 260 218 #define DIVEQ 261 219 #define LSHIFTEQ 262 220 #define RSHIFTEQ 263 221 #define ANDEQ 264 222 #define OREQ 265 223 #define OROR 266 224 #define ANDAND 267 225 #define EQ 268 226 #define NE 269 227 #define LE 270 228 #define GE 271 229 #define LSHIFT 272 230 #define RSHIFT 273 231 #define UNARY 274 232 #define STRING 275 233 #define QUOTED_STRING 276 234 #define INTEGER 277 235 #define ABSOLUTE 278 236 #define ADDR 279 237 #define ALIGN_K 280 238 #define ALIGNOF 281 239 #define ASSERT_K 282 240 #define AS_NEEDED 283 241 #define AT 284 242 #define BIND 285 243 #define BLOCK 286 244 #define BYTE 287 245 #define CONSTANT 288 246 #define CONSTRUCTORS 289 247 #define COPY 290 248 #define CREATE_OBJECT_SYMBOLS 291 249 #define DATA_SEGMENT_ALIGN 292 250 #define DATA_SEGMENT_END 293 251 #define DATA_SEGMENT_RELRO_END 294 252 #define DEFINED 295 253 #define DSECT 296 254 #define ENTRY 297 255 #define EXCLUDE_FILE 298 256 #define EXTERN 299 257 #define FILL 300 258 #define FLOAT 301 259 #define FORCE_COMMON_ALLOCATION 302 260 #define GLOBAL 303 261 #define GROUP 304 262 #define HLL 305 263 #define INCLUDE 306 264 #define INHIBIT_COMMON_ALLOCATION 307 265 #define INFO 308 266 #define INPUT 309 267 #define KEEP 310 268 #define LEN 311 269 #define LENGTH 312 270 #define LOADADDR 313 271 #define LOCAL 314 272 #define LONG 315 273 #define MAP 316 274 #define MAX_K 317 275 #define MEMORY 318 276 #define MIN_K 319 277 #define NEXT 320 278 #define NOCROSSREFS 321 279 #define NOFLOAT 322 280 #define NOLOAD 323 281 #define ONLY_IF_RO 324 282 #define ONLY_IF_RW 325 283 #define ORG 326 284 #define ORIGIN 327 285 #define OUTPUT 328 286 #define OUTPUT_ARCH 329 287 #define OUTPUT_FORMAT 330 288 #define OVERLAY 331 289 #define PHDRS 332 290 #define PROVIDE 333 291 #define PROVIDE_HIDDEN 334 292 #define QUAD 335 293 #define SEARCH_DIR 336 294 #define SECTIONS 337 295 #define SEGMENT_START 338 296 #define SHORT 339 297 #define SIZEOF 340 298 #define SIZEOF_HEADERS 341 299 #define SORT_BY_ALIGNMENT 342 300 #define SORT_BY_NAME 343 301 #define SPECIAL 344 302 #define SQUAD 345 303 #define STARTUP 346 304 #define SUBALIGN 347 305 #define SYSLIB 348 306 #define TARGET_K 349 307 #define TRUNCATE 350 308 #define VERSIONK 351 309 #define OPTION 352 310 #define PARSING_LINKER_SCRIPT 353 311 #define PARSING_VERSION_SCRIPT 354 312 #define PARSING_DEFSYM 355 313 #define PARSING_DYNAMIC_LIST 356 314 315 /* Value type. */ 316 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 317 typedef union YYSTYPE YYSTYPE; 318 union YYSTYPE 319 { 320 #line 53 "yyscript.y" /* yacc.c:355 */ 321 322 /* A string. */ 323 struct Parser_string string; 324 /* A number. */ 325 uint64_t integer; 326 /* An expression. */ 327 Expression_ptr expr; 328 /* An output section header. */ 329 struct Parser_output_section_header output_section_header; 330 /* An output section trailer. */ 331 struct Parser_output_section_trailer output_section_trailer; 332 /* A section constraint. */ 333 enum Section_constraint constraint; 334 /* A complete input section specification. */ 335 struct Input_section_spec input_section_spec; 336 /* A list of wildcard specifications, with exclusions. */ 337 struct Wildcard_sections wildcard_sections; 338 /* A single wildcard specification. */ 339 struct Wildcard_section wildcard_section; 340 /* A list of strings. */ 341 String_list_ptr string_list; 342 /* Information for a program header. */ 343 struct Phdr_info phdr_info; 344 /* Used for version scripts and within VERSION {}. */ 345 struct Version_dependency_list* deplist; 346 struct Version_expression_list* versyms; 347 struct Version_tree* versnode; 348 enum Script_section_type section_type; 349 350 #line 351 "yyscript.c" /* yacc.c:355 */ 351 }; 352 # define YYSTYPE_IS_TRIVIAL 1 353 # define YYSTYPE_IS_DECLARED 1 354 #endif 355 356 357 358 int yyparse (void* closure); 359 360 #endif /* !YY_YY_Y_TAB_H_INCLUDED */ 361 362 /* Copy the second part of user declarations. */ 363 364 #line 365 "yyscript.c" /* yacc.c:358 */ 365 366 #ifdef short 367 # undef short 368 #endif 369 370 #ifdef YYTYPE_UINT8 371 typedef YYTYPE_UINT8 yytype_uint8; 372 #else 373 typedef unsigned char yytype_uint8; 374 #endif 375 376 #ifdef YYTYPE_INT8 377 typedef YYTYPE_INT8 yytype_int8; 378 #else 379 typedef signed char yytype_int8; 380 #endif 381 382 #ifdef YYTYPE_UINT16 383 typedef YYTYPE_UINT16 yytype_uint16; 384 #else 385 typedef unsigned short int yytype_uint16; 386 #endif 387 388 #ifdef YYTYPE_INT16 389 typedef YYTYPE_INT16 yytype_int16; 390 #else 391 typedef short int yytype_int16; 392 #endif 393 394 #ifndef YYSIZE_T 395 # ifdef __SIZE_TYPE__ 396 # define YYSIZE_T __SIZE_TYPE__ 397 # elif defined size_t 398 # define YYSIZE_T size_t 399 # elif ! defined YYSIZE_T 400 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 401 # define YYSIZE_T size_t 402 # else 403 # define YYSIZE_T unsigned int 404 # endif 405 #endif 406 407 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 408 409 #ifndef YY_ 410 # if defined YYENABLE_NLS && YYENABLE_NLS 411 # if ENABLE_NLS 412 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 413 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 414 # endif 415 # endif 416 # ifndef YY_ 417 # define YY_(Msgid) Msgid 418 # endif 419 #endif 420 421 #ifndef YY_ATTRIBUTE 422 # if (defined __GNUC__ \ 423 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 424 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 425 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 426 # else 427 # define YY_ATTRIBUTE(Spec) /* empty */ 428 # endif 429 #endif 430 431 #ifndef YY_ATTRIBUTE_PURE 432 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 433 #endif 434 435 #ifndef YY_ATTRIBUTE_UNUSED 436 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 437 #endif 438 439 #if !defined _Noreturn \ 440 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 441 # if defined _MSC_VER && 1200 <= _MSC_VER 442 # define _Noreturn __declspec (noreturn) 443 # else 444 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 445 # endif 446 #endif 447 448 /* Suppress unused-variable warnings by "using" E. */ 449 #if ! defined lint || defined __GNUC__ 450 # define YYUSE(E) ((void) (E)) 451 #else 452 # define YYUSE(E) /* empty */ 453 #endif 454 455 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 456 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 457 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 458 _Pragma ("GCC diagnostic push") \ 459 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 460 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 461 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 462 _Pragma ("GCC diagnostic pop") 463 #else 464 # define YY_INITIAL_VALUE(Value) Value 465 #endif 466 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 467 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 468 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 469 #endif 470 #ifndef YY_INITIAL_VALUE 471 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 472 #endif 473 474 475 #if ! defined yyoverflow || YYERROR_VERBOSE 476 477 /* The parser invokes alloca or malloc; define the necessary symbols. */ 478 479 # ifdef YYSTACK_USE_ALLOCA 480 # if YYSTACK_USE_ALLOCA 481 # ifdef __GNUC__ 482 # define YYSTACK_ALLOC __builtin_alloca 483 # elif defined __BUILTIN_VA_ARG_INCR 484 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 485 # elif defined _AIX 486 # define YYSTACK_ALLOC __alloca 487 # elif defined _MSC_VER 488 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 489 # define alloca _alloca 490 # else 491 # define YYSTACK_ALLOC alloca 492 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 493 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 494 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 495 # ifndef EXIT_SUCCESS 496 # define EXIT_SUCCESS 0 497 # endif 498 # endif 499 # endif 500 # endif 501 # endif 502 503 # ifdef YYSTACK_ALLOC 504 /* Pacify GCC's 'empty if-body' warning. */ 505 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 506 # ifndef YYSTACK_ALLOC_MAXIMUM 507 /* The OS might guarantee only one guard page at the bottom of the stack, 508 and a page size can be as small as 4096 bytes. So we cannot safely 509 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 510 to allow for a few compiler-allocated temporary stack slots. */ 511 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 512 # endif 513 # else 514 # define YYSTACK_ALLOC YYMALLOC 515 # define YYSTACK_FREE YYFREE 516 # ifndef YYSTACK_ALLOC_MAXIMUM 517 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 518 # endif 519 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 520 && ! ((defined YYMALLOC || defined malloc) \ 521 && (defined YYFREE || defined free))) 522 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 523 # ifndef EXIT_SUCCESS 524 # define EXIT_SUCCESS 0 525 # endif 526 # endif 527 # ifndef YYMALLOC 528 # define YYMALLOC malloc 529 # if ! defined malloc && ! defined EXIT_SUCCESS 530 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 531 # endif 532 # endif 533 # ifndef YYFREE 534 # define YYFREE free 535 # if ! defined free && ! defined EXIT_SUCCESS 536 void free (void *); /* INFRINGES ON USER NAME SPACE */ 537 # endif 538 # endif 539 # endif 540 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 541 542 543 #if (! defined yyoverflow \ 544 && (! defined __cplusplus \ 545 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 546 547 /* A type that is properly aligned for any stack member. */ 548 union yyalloc 549 { 550 yytype_int16 yyss_alloc; 551 YYSTYPE yyvs_alloc; 552 }; 553 554 /* The size of the maximum gap between one aligned stack and the next. */ 555 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 556 557 /* The size of an array large to enough to hold all stacks, each with 558 N elements. */ 559 # define YYSTACK_BYTES(N) \ 560 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 561 + YYSTACK_GAP_MAXIMUM) 562 563 # define YYCOPY_NEEDED 1 564 565 /* Relocate STACK from its old location to the new one. The 566 local variables YYSIZE and YYSTACKSIZE give the old and new number of 567 elements in the stack, and YYPTR gives the new location of the 568 stack. Advance YYPTR to a properly aligned location for the next 569 stack. */ 570 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 571 do \ 572 { \ 573 YYSIZE_T yynewbytes; \ 574 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 575 Stack = &yyptr->Stack_alloc; \ 576 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 577 yyptr += yynewbytes / sizeof (*yyptr); \ 578 } \ 579 while (0) 580 581 #endif 582 583 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 584 /* Copy COUNT objects from SRC to DST. The source and destination do 585 not overlap. */ 586 # ifndef YYCOPY 587 # if defined __GNUC__ && 1 < __GNUC__ 588 # define YYCOPY(Dst, Src, Count) \ 589 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 590 # else 591 # define YYCOPY(Dst, Src, Count) \ 592 do \ 593 { \ 594 YYSIZE_T yyi; \ 595 for (yyi = 0; yyi < (Count); yyi++) \ 596 (Dst)[yyi] = (Src)[yyi]; \ 597 } \ 598 while (0) 599 # endif 600 # endif 601 #endif /* !YYCOPY_NEEDED */ 602 603 /* YYFINAL -- State number of the termination state. */ 604 #define YYFINAL 20 605 /* YYLAST -- Last index in YYTABLE. */ 606 #define YYLAST 1329 607 608 /* YYNTOKENS -- Number of terminals. */ 609 #define YYNTOKENS 125 610 /* YYNNTS -- Number of nonterminals. */ 611 #define YYNNTS 71 612 /* YYNRULES -- Number of rules. */ 613 #define YYNRULES 234 614 /* YYNSTATES -- Number of states. */ 615 #define YYNSTATES 527 616 617 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned 618 by yylex, with out-of-bounds checking. */ 619 #define YYUNDEFTOK 2 620 #define YYMAXUTOK 356 621 622 #define YYTRANSLATE(YYX) \ 623 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 624 625 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 626 as returned by yylex, without out-of-bounds checking. */ 627 static const yytype_uint8 yytranslate[] = 628 { 629 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 630 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 631 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 632 2, 2, 2, 121, 2, 2, 2, 31, 18, 2, 633 115, 116, 29, 27, 119, 28, 2, 30, 2, 2, 634 2, 2, 2, 2, 2, 2, 2, 2, 13, 120, 635 21, 7, 22, 12, 2, 2, 2, 2, 2, 2, 636 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 637 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 638 2, 2, 2, 2, 17, 2, 2, 2, 2, 2, 639 2, 2, 2, 2, 2, 2, 2, 2, 123, 2, 640 2, 122, 2, 2, 2, 2, 2, 2, 2, 2, 641 2, 2, 2, 117, 16, 118, 124, 2, 2, 2, 642 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 643 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 644 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 645 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 646 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 647 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 648 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 649 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 650 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 651 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 652 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 653 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 654 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 655 5, 6, 8, 9, 10, 11, 14, 15, 19, 20, 656 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 657 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 658 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 659 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 660 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 661 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 662 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 663 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 664 108, 109, 110, 111, 112, 113, 114 665 }; 666 667 #if YYDEBUG 668 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 669 static const yytype_uint16 yyrline[] = 670 { 671 0, 231, 231, 232, 233, 234, 239, 240, 245, 246, 672 249, 248, 252, 254, 255, 256, 258, 264, 271, 272, 673 275, 274, 278, 281, 280, 284, 285, 286, 294, 302, 674 302, 308, 310, 312, 318, 319, 324, 326, 329, 328, 675 336, 337, 342, 344, 343, 352, 354, 352, 371, 376, 676 381, 386, 391, 396, 405, 407, 412, 417, 422, 432, 677 433, 440, 441, 448, 449, 456, 457, 459, 461, 467, 678 476, 478, 483, 485, 490, 493, 499, 502, 507, 509, 679 515, 516, 517, 519, 521, 523, 530, 531, 533, 539, 680 541, 543, 545, 547, 554, 556, 562, 569, 578, 583, 681 592, 597, 602, 607, 616, 621, 640, 663, 665, 672, 682 674, 679, 689, 691, 692, 694, 700, 701, 706, 710, 683 712, 717, 720, 723, 727, 729, 731, 735, 737, 739, 684 744, 745, 750, 759, 761, 768, 769, 777, 782, 793, 685 802, 804, 810, 816, 822, 828, 834, 840, 846, 852, 686 854, 860, 860, 870, 872, 874, 876, 878, 880, 882, 687 884, 886, 888, 890, 892, 894, 896, 898, 900, 902, 688 904, 906, 908, 910, 912, 914, 916, 918, 920, 922, 689 924, 926, 928, 930, 932, 934, 936, 938, 940, 942, 690 944, 946, 948, 950, 952, 957, 962, 964, 972, 978, 691 988, 991, 992, 996, 1002, 1006, 1007, 1011, 1015, 1020, 692 1027, 1031, 1039, 1040, 1042, 1044, 1046, 1055, 1060, 1065, 693 1070, 1077, 1076, 1087, 1086, 1093, 1098, 1108, 1110, 1117, 694 1118, 1123, 1124, 1129, 1130 695 }; 696 #endif 697 698 #if YYDEBUG || YYERROR_VERBOSE || 1 699 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 700 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 701 static const char *const yytname[] = 702 { 703 "$end", "error", "$undefined", "PLUSEQ", "MINUSEQ", "MULTEQ", "DIVEQ", 704 "'='", "LSHIFTEQ", "RSHIFTEQ", "ANDEQ", "OREQ", "'?'", "':'", "OROR", 705 "ANDAND", "'|'", "'^'", "'&'", "EQ", "NE", "'<'", "'>'", "LE", "GE", 706 "LSHIFT", "RSHIFT", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "STRING", 707 "QUOTED_STRING", "INTEGER", "ABSOLUTE", "ADDR", "ALIGN_K", "ALIGNOF", 708 "ASSERT_K", "AS_NEEDED", "AT", "BIND", "BLOCK", "BYTE", "CONSTANT", 709 "CONSTRUCTORS", "COPY", "CREATE_OBJECT_SYMBOLS", "DATA_SEGMENT_ALIGN", 710 "DATA_SEGMENT_END", "DATA_SEGMENT_RELRO_END", "DEFINED", "DSECT", 711 "ENTRY", "EXCLUDE_FILE", "EXTERN", "FILL", "FLOAT", 712 "FORCE_COMMON_ALLOCATION", "GLOBAL", "GROUP", "HLL", "INCLUDE", 713 "INHIBIT_COMMON_ALLOCATION", "INFO", "INPUT", "KEEP", "LEN", "LENGTH", 714 "LOADADDR", "LOCAL", "LONG", "MAP", "MAX_K", "MEMORY", "MIN_K", "NEXT", 715 "NOCROSSREFS", "NOFLOAT", "NOLOAD", "ONLY_IF_RO", "ONLY_IF_RW", "ORG", 716 "ORIGIN", "OUTPUT", "OUTPUT_ARCH", "OUTPUT_FORMAT", "OVERLAY", "PHDRS", 717 "PROVIDE", "PROVIDE_HIDDEN", "QUAD", "SEARCH_DIR", "SECTIONS", 718 "SEGMENT_START", "SHORT", "SIZEOF", "SIZEOF_HEADERS", 719 "SORT_BY_ALIGNMENT", "SORT_BY_NAME", "SPECIAL", "SQUAD", "STARTUP", 720 "SUBALIGN", "SYSLIB", "TARGET_K", "TRUNCATE", "VERSIONK", "OPTION", 721 "PARSING_LINKER_SCRIPT", "PARSING_VERSION_SCRIPT", "PARSING_DEFSYM", 722 "PARSING_DYNAMIC_LIST", "'('", "')'", "'{'", "'}'", "','", "';'", "'!'", 723 "'o'", "'l'", "'~'", "$accept", "top", "linker_script", "file_cmd", 724 "$@1", "$@2", "$@3", "ignore_cmd", "extern_name_list", "$@4", 725 "extern_name_list_body", "input_list", "input_list_element", "$@5", 726 "sections_block", "section_block_cmd", "$@6", "section_header", "$@7", 727 "$@8", "opt_address_and_section_type", "section_type", "opt_at", 728 "opt_align", "opt_subalign", "opt_constraint", "section_trailer", 729 "opt_memspec", "opt_at_memspec", "opt_phdr", "opt_fill", "section_cmds", 730 "section_cmd", "data_length", "input_section_spec", 731 "input_section_no_keep", "wildcard_file", "wildcard_sections", 732 "wildcard_section", "exclude_names", "wildcard_name", 733 "file_or_sections_cmd", "memory_defs", "memory_def", "memory_attr", 734 "memory_origin", "memory_length", "phdrs_defs", "phdr_def", "phdr_type", 735 "phdr_info", "assignment", "parse_exp", "$@9", "exp", "defsym_expr", 736 "dynamic_list_expr", "dynamic_list_nodes", "dynamic_list_node", 737 "version_script", "vers_nodes", "vers_node", "verdep", "vers_tag", 738 "vers_defns", "$@10", "$@11", "string", "end", "opt_semicolon", 739 "opt_comma", YY_NULLPTR 740 }; 741 #endif 742 743 # ifdef YYPRINT 744 /* YYTOKNUM[NUM] -- (External) token number corresponding to the 745 (internal) symbol number NUM (which must be that of a token). */ 746 static const yytype_uint16 yytoknum[] = 747 { 748 0, 256, 257, 258, 259, 260, 261, 61, 262, 263, 749 264, 265, 63, 58, 266, 267, 124, 94, 38, 268, 750 269, 60, 62, 270, 271, 272, 273, 43, 45, 42, 751 47, 37, 274, 275, 276, 277, 278, 279, 280, 281, 752 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 753 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 754 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 755 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 756 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 757 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 758 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 759 352, 353, 354, 355, 356, 40, 41, 123, 125, 44, 760 59, 33, 111, 108, 126 761 }; 762 # endif 763 764 #define YYPACT_NINF -396 765 766 #define yypact_value_is_default(Yystate) \ 767 (!!((Yystate) == (-396))) 768 769 #define YYTABLE_NINF -110 770 771 #define yytable_value_is_error(Yytable_value) \ 772 0 773 774 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 775 STATE-NUM. */ 776 static const yytype_int16 yypact[] = 777 { 778 155, -396, 42, 90, -106, 13, 1169, -396, -396, 122, 779 -396, 42, -396, -85, -396, 36, 135, -396, -106, -396, 780 -396, -68, -55, -46, -396, -396, 90, -396, -37, -29, 781 4, 19, 29, 46, 52, 69, 35, 78, 54, 82, 782 -396, -396, -396, -396, 20, 321, -396, -396, 90, 144, 783 202, -6, 103, -396, 122, -396, 105, -396, -396, 90, 784 -396, 102, -396, 185, -396, 90, 90, -396, 90, 90, 785 90, -396, 90, -396, 90, -396, -396, -396, -396, -396, 786 -396, -396, -396, -396, -396, -396, -396, 111, 135, 135, 787 118, 143, 127, -396, 1129, 72, 110, 157, 182, 90, 788 185, 210, -396, -63, -396, -396, 84, 186, 108, 40, 789 297, 301, 218, -396, 220, 42, 232, -396, -396, -396, 790 -396, -396, -396, -396, -396, -396, -396, 229, 231, -396, 791 -396, -396, 90, -3, 1129, 1129, -396, 237, 258, 259, 792 262, 263, 289, 300, 302, 303, 304, 305, 306, 309, 793 332, 333, 334, 337, 338, -396, 1129, 1129, 1129, 1298, 794 -396, 335, 90, -396, -396, -5, -396, 120, -396, 339, 795 -396, -396, 185, -396, 131, -396, -396, 90, -396, -396, 796 310, -396, -396, -396, 56, -396, 340, -396, 135, 109, 797 143, 343, -396, 25, -396, -396, -396, 1129, 90, 1129, 798 90, 1129, 1129, 90, 1129, 1129, 1129, 90, 90, 90, 799 1129, 1129, 90, 90, 90, 234, -396, -396, 1129, 1129, 800 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 1129, 801 1129, 1129, 1129, 1129, 1129, 1129, 1129, -396, 341, 90, 802 -396, -396, 185, -396, 90, -396, 346, 344, -396, 59, 803 -396, 349, 351, -396, -396, -396, 321, -396, 336, 455, 804 -396, -396, -396, 718, 353, 260, 356, 411, 744, 358, 805 638, 764, 658, 360, 361, 362, 678, 698, 363, 365, 806 366, -396, 1278, 590, 364, 801, 617, 900, 291, 291, 807 383, 383, 383, 383, 204, 204, 372, 372, -396, -396, 808 -396, -396, -396, 125, -396, -27, 467, 90, 368, 59, 809 367, 99, -396, -396, -396, 476, 143, 373, 135, 135, 810 -396, -396, -396, 1129, -396, 90, -396, -396, 1129, -396, 811 1129, -396, -396, -396, 1129, 1129, -396, 1129, -396, 1129, 812 -396, 90, 369, 51, 374, -396, -396, -396, 446, -396, 813 376, -396, 1037, 452, 1029, -396, 378, 336, 784, 384, 814 821, 847, 867, 887, 924, 1298, 385, -396, -396, -396, 815 -396, 495, -396, 390, 391, -396, -396, -396, -396, -396, 816 -396, 504, 392, 404, 485, -396, 37, 143, 406, -396, 817 -396, -396, -396, -396, -396, -396, -396, -396, 59, 59, 818 531, -396, 512, 1129, 416, 427, 520, 418, -396, 417, 819 -396, -396, -396, -396, 420, -396, -396, 422, 90, 423, 820 -396, -396, -396, 425, -396, 519, -396, -396, 429, -396, 821 -396, 430, -396, 20, 12, -396, 950, 1129, 433, -396, 822 -396, 529, 39, -396, -396, -396, 53, 175, 90, -396, 823 507, -396, 15, -396, -396, 970, 1129, -57, -396, -396, 824 -396, -396, 543, 435, 436, 440, 441, 443, 447, 450, 825 -396, -396, 534, -396, 451, 444, 453, 454, 176, -396, 826 -396, -396, 990, -396, -396, -396, -396, -396, 90, -396, 827 187, -396, -396, -396, 90, 97, -396, 187, 50, 50, 828 -396, 21, -396, -396, 461, -396, -396, 90, 417, 180, 829 -396, 463, 464, 466, -396, -396, -396, -396, -396, -396, 830 187, -396, -396, 187, -396, 181, -396 831 }; 832 833 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 834 Performed when YYTABLE does not specify something else to do. Zero 835 means the default is an error. */ 836 static const yytype_uint8 yydefact[] = 837 { 838 0, 7, 0, 0, 0, 0, 2, 227, 228, 212, 839 3, 204, 205, 0, 4, 0, 0, 5, 200, 201, 840 1, 0, 0, 0, 9, 10, 0, 12, 0, 0, 841 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 842 27, 6, 26, 25, 0, 0, 217, 218, 225, 0, 843 0, 0, 0, 206, 212, 151, 0, 202, 151, 0, 844 29, 0, 115, 0, 117, 0, 0, 131, 0, 0, 845 0, 20, 0, 23, 0, 230, 229, 113, 151, 151, 846 151, 151, 151, 151, 151, 151, 151, 0, 0, 0, 847 0, 213, 0, 199, 0, 0, 0, 0, 0, 0, 848 0, 0, 38, 234, 34, 36, 234, 0, 0, 0, 849 0, 0, 0, 41, 0, 0, 0, 141, 142, 143, 850 144, 140, 145, 146, 147, 148, 221, 0, 0, 207, 851 219, 220, 226, 0, 0, 0, 177, 0, 0, 0, 852 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 853 0, 0, 0, 0, 0, 182, 0, 0, 0, 152, 854 178, 0, 0, 112, 8, 30, 31, 234, 37, 0, 855 13, 233, 0, 14, 120, 28, 16, 0, 18, 130, 856 0, 151, 151, 19, 0, 22, 0, 15, 0, 214, 857 215, 0, 208, 0, 210, 157, 154, 0, 0, 0, 858 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 859 0, 0, 0, 0, 0, 0, 155, 156, 0, 0, 860 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 861 0, 0, 0, 0, 0, 0, 0, 203, 0, 0, 862 32, 11, 0, 35, 0, 116, 123, 0, 134, 135, 863 133, 0, 0, 21, 40, 42, 45, 24, 232, 0, 864 223, 209, 211, 0, 0, 0, 0, 0, 0, 0, 865 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 866 0, 153, 0, 175, 174, 173, 172, 171, 165, 166, 867 169, 170, 167, 168, 163, 164, 161, 162, 158, 159, 868 160, 114, 33, 234, 119, 0, 0, 0, 0, 135, 869 0, 135, 149, 150, 43, 0, 231, 0, 0, 0, 870 190, 185, 191, 0, 183, 0, 193, 189, 0, 196, 871 0, 181, 188, 186, 0, 0, 187, 0, 184, 0, 872 39, 0, 0, 0, 0, 151, 137, 132, 0, 136, 873 0, 48, 0, 59, 0, 222, 0, 232, 0, 0, 874 0, 0, 0, 0, 0, 176, 0, 121, 125, 124, 875 126, 0, 17, 0, 0, 78, 56, 55, 57, 54, 876 58, 0, 0, 0, 61, 50, 0, 216, 0, 192, 877 198, 194, 195, 179, 180, 197, 122, 151, 135, 135, 878 0, 49, 0, 0, 0, 63, 0, 0, 224, 234, 879 139, 138, 111, 110, 0, 93, 85, 0, 0, 0, 880 91, 89, 92, 0, 90, 71, 88, 79, 0, 81, 881 94, 0, 98, 0, 96, 52, 0, 0, 0, 46, 882 51, 0, 0, 151, 151, 87, 0, 0, 0, 44, 883 73, 151, 0, 80, 60, 0, 0, 65, 53, 128, 884 127, 129, 0, 0, 0, 0, 0, 96, 0, 0, 885 109, 70, 0, 75, 0, 0, 0, 0, 234, 101, 886 104, 62, 0, 66, 67, 68, 47, 151, 0, 84, 887 0, 95, 86, 99, 0, 77, 82, 0, 0, 0, 888 97, 0, 64, 118, 0, 72, 151, 0, 234, 234, 889 108, 0, 0, 0, 100, 83, 76, 74, 69, 103, 890 0, 106, 105, 0, 107, 234, 102 891 }; 892 893 /* YYPGOTO[NTERM-NUM]. */ 894 static const yytype_int16 yypgoto[] = 895 { 896 -396, -396, -396, -396, -396, -396, -396, -396, -396, -396, 897 -396, -98, 398, -396, -396, -396, -396, -396, -396, -396, 898 -396, 196, -396, -396, -396, -396, -396, -396, -396, -396, 899 -396, -396, -396, -396, -396, 116, -396, -396, -313, 60, 900 -395, 400, -396, -396, -396, -396, -396, -396, -396, -396, 901 -299, 188, -44, -396, 136, -396, -396, -396, 567, 471, 902 -396, 576, -396, 536, -8, -396, -396, -2, 160, 239, 903 -103 904 }; 905 906 /* YYDEFGOTO[NTERM-NUM]. */ 907 static const yytype_int16 yydefgoto[] = 908 { 909 -1, 5, 6, 41, 61, 113, 115, 42, 98, 99, 910 165, 103, 104, 169, 184, 254, 350, 314, 315, 457, 911 353, 382, 384, 405, 439, 486, 449, 450, 473, 495, 912 508, 400, 427, 428, 429, 430, 431, 478, 479, 509, 913 480, 43, 106, 245, 306, 371, 462, 109, 179, 249, 914 310, 44, 93, 94, 215, 14, 17, 18, 19, 10, 915 11, 12, 193, 51, 52, 188, 319, 160, 77, 317, 916 172 917 }; 918 919 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 920 positive, shift that token. If negative, reduce the rule whose 921 number is the opposite. If YYTABLE_NINF, syntax error. */ 922 static const yytype_int16 yytable[] = 923 { 924 13, 15, 167, 174, 45, 432, 7, 8, 56, 13, 925 346, 16, 349, 20, 96, 78, 79, 80, 81, 82, 926 83, 84, 85, 86, 62, 483, 484, 412, 7, 8, 927 7, 8, 54, 412, 117, 118, 119, 120, 121, 122, 928 123, 124, 125, 55, 413, 485, 87, 58, 7, 8, 929 413, 432, 469, 170, 7, 8, 171, 97, 7, 8, 930 59, 105, 412, 107, 108, 412, 110, 111, 112, 60, 931 114, 475, 116, 7, 8, 7, 8, 513, 63, 413, 932 127, 128, 413, 7, 8, 376, 7, 8, 64, 7, 933 8, 377, 7, 8, 341, 469, 21, 166, 105, 410, 934 411, 308, 510, 378, 506, 130, 131, 180, 459, 460, 935 507, 22, 90, 13, 239, 476, 477, 192, 379, 65, 936 26, 476, 477, 7, 8, 524, 380, -109, 510, 132, 937 191, 194, 7, 8, 66, 368, 369, 251, 252, 75, 938 76, 308, 130, 131, 303, 261, 67, 33, 34, 309, 939 476, 477, 71, 406, 465, 46, 47, 88, 178, 9, 940 238, 68, 461, 240, 7, 8, 132, 69, 46, 47, 941 105, 73, 246, 370, 253, 247, 130, 131, 250, 48, 942 258, 259, 256, 49, 70, 511, 512, 412, 514, 309, 943 161, 262, 48, 72, 50, 244, 264, 74, 266, 412, 944 132, 269, 173, 171, 413, 273, 274, 275, 7, 8, 945 278, 279, 280, 101, 348, 89, 413, 100, 7, 8, 946 7, 8, 468, 91, 176, 95, 102, 177, 126, 162, 947 159, 232, 233, 234, 235, 236, 241, 302, 129, 171, 948 105, 340, 304, 168, 171, 133, 218, 311, 219, 220, 949 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 950 231, 232, 233, 234, 235, 236, 1, 2, 3, 4, 951 195, 196, 218, 163, 219, 220, 221, 222, 223, 224, 952 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 953 235, 236, 500, 216, 217, 171, 519, 526, 164, 171, 954 171, 373, 175, 342, 181, 344, 442, 311, 182, 311, 955 356, 357, 226, 227, 228, 229, 230, 231, 232, 233, 956 234, 235, 236, 359, 78, 79, 80, 81, 82, 83, 957 84, 85, 86, 263, 183, 265, 185, 267, 268, 366, 958 270, 271, 272, 7, 8, 248, 276, 277, 187, 189, 959 281, 190, 197, 409, 282, 283, 284, 285, 286, 287, 960 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 961 298, 299, 300, 198, 199, 501, 322, 200, 201, 323, 962 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 963 231, 232, 233, 234, 235, 236, 311, 311, 434, 463, 964 464, 234, 235, 236, 202, 518, 520, 474, 230, 231, 965 232, 233, 234, 235, 236, 203, 445, 204, 205, 206, 966 207, 208, 520, 218, 209, 219, 220, 221, 222, 223, 967 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 968 234, 235, 236, 503, 467, 470, 471, 210, 211, 212, 969 470, 354, 213, 214, 242, 237, 316, 301, 257, 358, 970 260, 305, 516, 307, 360, 312, 361, 313, 318, 321, 971 362, 363, 324, 364, 327, 365, 331, 332, 333, 336, 972 343, 374, 338, 345, 337, 367, 504, 347, 470, 351, 973 372, 355, 505, 375, 383, 470, 470, 470, 387, 470, 974 390, 396, 397, 134, 135, 517, 398, 399, 402, 7, 975 8, 136, 137, 138, 139, 140, 141, 401, 470, 403, 976 142, 470, 143, 404, 408, 435, 144, 145, 146, 147, 977 325, 437, 438, 440, 441, 443, 171, 444, 446, 436, 978 447, 448, 458, 412, 451, 452, 148, 149, 456, 472, 979 487, 150, 489, 151, 488, 490, 494, 491, -109, 497, 980 413, 152, 466, 492, 7, 8, 493, 496, 498, 499, 981 243, 414, 153, 455, 154, 155, 415, 515, 416, 521, 982 522, 523, 407, 525, 255, 57, 186, 53, 433, 417, 983 92, 352, 482, 453, 0, 418, 388, 157, 0, 419, 984 158, 0, 0, 0, 420, 220, 221, 222, 223, 224, 985 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 986 235, 236, 33, 34, 421, 0, 0, 0, 422, 0, 987 0, 0, 423, 0, 424, 223, 224, 225, 226, 227, 988 228, 229, 230, 231, 232, 233, 234, 235, 236, 425, 989 218, 426, 219, 220, 221, 222, 223, 224, 225, 226, 990 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 991 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 992 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 993 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 994 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 995 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 996 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 997 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 998 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 999 0, 0, 0, 0, 0, 0, 218, 328, 219, 220, 1000 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 1001 231, 232, 233, 234, 235, 236, 218, 330, 219, 220, 1002 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 1003 231, 232, 233, 234, 235, 236, 218, 334, 219, 220, 1004 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 1005 231, 232, 233, 234, 235, 236, 0, 335, 222, 223, 1006 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 1007 234, 235, 236, 218, 320, 219, 220, 221, 222, 223, 1008 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 1009 234, 235, 236, 0, 0, 0, 0, 0, 0, 218, 1010 326, 219, 220, 221, 222, 223, 224, 225, 226, 227, 1011 228, 229, 230, 231, 232, 233, 234, 235, 236, 218, 1012 329, 219, 220, 221, 222, 223, 224, 225, 226, 227, 1013 228, 229, 230, 231, 232, 233, 234, 235, 236, 218, 1014 389, 219, 220, 221, 222, 223, 224, 225, 226, 227, 1015 228, 229, 230, 231, 232, 233, 234, 235, 236, 224, 1016 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 1017 235, 236, 0, 0, 0, 0, 218, 391, 219, 220, 1018 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 1019 231, 232, 233, 234, 235, 236, 0, 0, 0, 0, 1020 0, 0, 218, 392, 219, 220, 221, 222, 223, 224, 1021 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 1022 235, 236, 218, 393, 219, 220, 221, 222, 223, 224, 1023 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 1024 235, 236, 218, 394, 219, 220, 221, 222, 223, 224, 1025 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 1026 235, 236, 0, 0, 0, 0, 0, 0, 0, 0, 1027 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1028 395, 218, 385, 219, 220, 221, 222, 223, 224, 225, 1029 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 1030 236, 0, 0, 0, 134, 135, 454, 0, 0, 0, 1031 7, 8, 136, 137, 138, 139, 140, 141, 0, 0, 1032 0, 142, 0, 143, 0, 376, 481, 144, 145, 146, 1033 147, 377, 0, 0, 0, 0, 0, 0, 0, 0, 1034 0, 0, 0, 378, 0, 0, 502, 148, 149, 0, 1035 0, 0, 150, 0, 151, 0, 0, 0, 379, 0, 1036 0, 0, 152, 0, 0, 0, 380, 0, 0, 0, 1037 0, 0, 0, 153, 0, 154, 155, 0, 0, 0, 1038 0, 0, 0, 0, 386, 0, 0, 0, 0, 0, 1039 0, 0, 156, 381, 0, 0, 134, 135, 157, 0, 1040 0, 158, 7, 8, 136, 137, 138, 139, 140, 141, 1041 0, 0, 0, 142, 0, 143, 0, 0, 0, 144, 1042 145, 146, 147, 0, 0, 0, 0, 0, 0, 0, 1043 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 1044 149, 0, 7, 8, 150, 0, 151, 0, 0, 21, 1045 0, 0, 0, 0, 152, 0, 0, 0, 0, 0, 1046 0, 0, 0, 0, 22, 153, 23, 154, 155, 24, 1047 0, 25, 0, 26, 27, 0, 28, 0, 0, 0, 1048 0, 0, 0, 0, 156, 29, 0, 0, 0, 0, 1049 157, 0, 0, 158, 0, 0, 30, 31, 0, 32, 1050 33, 34, 0, 35, 36, 0, 0, 0, 0, 0, 1051 0, 0, 0, 0, 0, 0, 37, 0, 38, 39, 1052 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 1053 218, 339, 219, 220, 221, 222, 223, 224, 225, 226, 1054 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 1055 218, 0, 219, 220, 221, 222, 223, 224, 225, 226, 1056 227, 228, 229, 230, 231, 232, 233, 234, 235, 236 1057 }; 1058 1059 static const yytype_int16 yycheck[] = 1060 { 1061 2, 3, 100, 106, 6, 400, 33, 34, 16, 11, 1062 309, 117, 311, 0, 58, 3, 4, 5, 6, 7, 1063 8, 9, 10, 11, 26, 82, 83, 12, 33, 34, 1064 33, 34, 117, 12, 78, 79, 80, 81, 82, 83, 1065 84, 85, 86, 7, 29, 102, 48, 115, 33, 34, 1066 29, 446, 447, 116, 33, 34, 119, 59, 33, 34, 1067 115, 63, 12, 65, 66, 12, 68, 69, 70, 115, 1068 72, 56, 74, 33, 34, 33, 34, 56, 115, 29, 1069 88, 89, 29, 33, 34, 48, 33, 34, 117, 33, 1070 34, 54, 33, 34, 121, 490, 40, 99, 100, 398, 1071 399, 42, 497, 66, 7, 33, 34, 109, 69, 70, 1072 13, 55, 118, 115, 119, 100, 101, 120, 81, 115, 1073 64, 100, 101, 33, 34, 520, 89, 115, 523, 57, 1074 132, 133, 33, 34, 115, 84, 85, 181, 182, 119, 1075 120, 42, 33, 34, 242, 120, 117, 91, 92, 90, 1076 100, 101, 117, 116, 101, 33, 34, 13, 118, 117, 1077 162, 115, 123, 165, 33, 34, 57, 115, 33, 34, 1078 172, 117, 174, 122, 118, 177, 33, 34, 180, 57, 1079 188, 72, 184, 61, 115, 498, 499, 12, 501, 90, 1080 118, 193, 57, 115, 72, 64, 198, 115, 200, 12, 1081 57, 203, 118, 119, 29, 207, 208, 209, 33, 34, 1082 212, 213, 214, 28, 115, 13, 29, 115, 33, 34, 1083 33, 34, 47, 120, 116, 120, 41, 119, 117, 119, 1084 94, 27, 28, 29, 30, 31, 116, 239, 120, 119, 1085 242, 116, 244, 33, 119, 118, 12, 249, 14, 15, 1086 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1087 26, 27, 28, 29, 30, 31, 111, 112, 113, 114, 1088 134, 135, 12, 116, 14, 15, 16, 17, 18, 19, 1089 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1090 30, 31, 116, 157, 158, 119, 116, 116, 116, 119, 1091 119, 345, 116, 305, 7, 307, 409, 309, 7, 311, 1092 318, 319, 21, 22, 23, 24, 25, 26, 27, 28, 1093 29, 30, 31, 325, 3, 4, 5, 6, 7, 8, 1094 9, 10, 11, 197, 116, 199, 116, 201, 202, 341, 1095 204, 205, 206, 33, 34, 35, 210, 211, 116, 120, 1096 116, 120, 115, 397, 218, 219, 220, 221, 222, 223, 1097 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 1098 234, 235, 236, 115, 115, 478, 116, 115, 115, 119, 1099 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1100 26, 27, 28, 29, 30, 31, 398, 399, 400, 443, 1101 444, 29, 30, 31, 115, 508, 509, 451, 25, 26, 1102 27, 28, 29, 30, 31, 115, 418, 115, 115, 115, 1103 115, 115, 525, 12, 115, 14, 15, 16, 17, 18, 1104 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1105 29, 30, 31, 487, 446, 447, 448, 115, 115, 115, 1106 452, 315, 115, 115, 115, 120, 120, 116, 118, 323, 1107 117, 115, 506, 119, 328, 116, 330, 116, 13, 116, 1108 334, 335, 116, 337, 116, 339, 116, 116, 116, 116, 1109 13, 35, 116, 115, 119, 116, 488, 120, 490, 13, 1110 116, 118, 494, 117, 42, 497, 498, 499, 120, 501, 1111 116, 116, 7, 27, 28, 507, 116, 116, 116, 33, 1112 34, 35, 36, 37, 38, 39, 40, 13, 520, 115, 1113 44, 523, 46, 38, 118, 13, 50, 51, 52, 53, 1114 119, 115, 105, 13, 116, 115, 119, 115, 115, 403, 1115 115, 22, 13, 12, 115, 115, 70, 71, 115, 42, 1116 7, 75, 116, 77, 119, 115, 22, 116, 115, 115, 1117 29, 85, 446, 116, 33, 34, 116, 116, 115, 115, 1118 172, 40, 96, 437, 98, 99, 45, 116, 47, 116, 1119 116, 115, 386, 523, 184, 18, 115, 11, 400, 58, 1120 54, 115, 456, 433, -1, 64, 357, 121, -1, 68, 1121 124, -1, -1, -1, 73, 15, 16, 17, 18, 19, 1122 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1123 30, 31, 91, 92, 93, -1, -1, -1, 97, -1, 1124 -1, -1, 101, -1, 103, 18, 19, 20, 21, 22, 1125 23, 24, 25, 26, 27, 28, 29, 30, 31, 118, 1126 12, 120, 14, 15, 16, 17, 18, 19, 20, 21, 1127 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1128 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, 1129 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1130 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, 1131 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1132 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, 1133 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1134 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, 1135 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1136 -1, -1, -1, -1, -1, -1, 12, 119, 14, 15, 1137 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1138 26, 27, 28, 29, 30, 31, 12, 119, 14, 15, 1139 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1140 26, 27, 28, 29, 30, 31, 12, 119, 14, 15, 1141 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1142 26, 27, 28, 29, 30, 31, -1, 119, 17, 18, 1143 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1144 29, 30, 31, 12, 116, 14, 15, 16, 17, 18, 1145 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1146 29, 30, 31, -1, -1, -1, -1, -1, -1, 12, 1147 116, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1148 23, 24, 25, 26, 27, 28, 29, 30, 31, 12, 1149 116, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1150 23, 24, 25, 26, 27, 28, 29, 30, 31, 12, 1151 116, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1152 23, 24, 25, 26, 27, 28, 29, 30, 31, 19, 1153 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1154 30, 31, -1, -1, -1, -1, 12, 116, 14, 15, 1155 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1156 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, 1157 -1, -1, 12, 116, 14, 15, 16, 17, 18, 19, 1158 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1159 30, 31, 12, 116, 14, 15, 16, 17, 18, 19, 1160 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1161 30, 31, 12, 116, 14, 15, 16, 17, 18, 19, 1162 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1163 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, 1164 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1165 116, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1166 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1167 31, -1, -1, -1, 27, 28, 116, -1, -1, -1, 1168 33, 34, 35, 36, 37, 38, 39, 40, -1, -1, 1169 -1, 44, -1, 46, -1, 48, 116, 50, 51, 52, 1170 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, 1171 -1, -1, -1, 66, -1, -1, 116, 70, 71, -1, 1172 -1, -1, 75, -1, 77, -1, -1, -1, 81, -1, 1173 -1, -1, 85, -1, -1, -1, 89, -1, -1, -1, 1174 -1, -1, -1, 96, -1, 98, 99, -1, -1, -1, 1175 -1, -1, -1, -1, 115, -1, -1, -1, -1, -1, 1176 -1, -1, 115, 116, -1, -1, 27, 28, 121, -1, 1177 -1, 124, 33, 34, 35, 36, 37, 38, 39, 40, 1178 -1, -1, -1, 44, -1, 46, -1, -1, -1, 50, 1179 51, 52, 53, -1, -1, -1, -1, -1, -1, -1, 1180 -1, -1, -1, -1, -1, -1, -1, -1, -1, 70, 1181 71, -1, 33, 34, 75, -1, 77, -1, -1, 40, 1182 -1, -1, -1, -1, 85, -1, -1, -1, -1, -1, 1183 -1, -1, -1, -1, 55, 96, 57, 98, 99, 60, 1184 -1, 62, -1, 64, 65, -1, 67, -1, -1, -1, 1185 -1, -1, -1, -1, 115, 76, -1, -1, -1, -1, 1186 121, -1, -1, 124, -1, -1, 87, 88, -1, 90, 1187 91, 92, -1, 94, 95, -1, -1, -1, -1, -1, 1188 -1, -1, -1, -1, -1, -1, 107, -1, 109, 110, 1189 -1, -1, -1, -1, -1, -1, -1, -1, -1, 120, 1190 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1191 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 1192 12, -1, 14, 15, 16, 17, 18, 19, 20, 21, 1193 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 1194 }; 1195 1196 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1197 symbol of state STATE-NUM. */ 1198 static const yytype_uint8 yystos[] = 1199 { 1200 0, 111, 112, 113, 114, 126, 127, 33, 34, 117, 1201 184, 185, 186, 192, 180, 192, 117, 181, 182, 183, 1202 0, 40, 55, 57, 60, 62, 64, 65, 67, 76, 1203 87, 88, 90, 91, 92, 94, 95, 107, 109, 110, 1204 120, 128, 132, 166, 176, 192, 33, 34, 57, 61, 1205 72, 188, 189, 186, 117, 7, 189, 183, 115, 115, 1206 115, 129, 192, 115, 117, 115, 115, 117, 115, 115, 1207 115, 117, 115, 117, 115, 119, 120, 193, 3, 4, 1208 5, 6, 7, 8, 9, 10, 11, 192, 13, 13, 1209 118, 120, 188, 177, 178, 120, 177, 192, 133, 134, 1210 115, 28, 41, 136, 137, 192, 167, 192, 192, 172, 1211 192, 192, 192, 130, 192, 131, 192, 177, 177, 177, 1212 177, 177, 177, 177, 177, 177, 117, 189, 189, 120, 1213 33, 34, 57, 118, 27, 28, 35, 36, 37, 38, 1214 39, 40, 44, 46, 50, 51, 52, 53, 70, 71, 1215 75, 77, 85, 96, 98, 99, 115, 121, 124, 179, 1216 192, 118, 119, 116, 116, 135, 192, 136, 33, 138, 1217 116, 119, 195, 118, 195, 116, 116, 119, 118, 173, 1218 192, 7, 7, 116, 139, 116, 184, 116, 190, 120, 1219 120, 192, 120, 187, 192, 179, 179, 115, 115, 115, 1220 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 1221 115, 115, 115, 115, 115, 179, 179, 179, 12, 14, 1222 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1223 25, 26, 27, 28, 29, 30, 31, 120, 192, 119, 1224 192, 116, 115, 137, 64, 168, 192, 192, 35, 174, 1225 192, 177, 177, 118, 140, 166, 192, 118, 189, 72, 1226 117, 120, 192, 179, 192, 179, 192, 179, 179, 192, 1227 179, 179, 179, 192, 192, 192, 179, 179, 192, 192, 1228 192, 116, 179, 179, 179, 179, 179, 179, 179, 179, 1229 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 1230 179, 116, 192, 136, 192, 115, 169, 119, 42, 90, 1231 175, 192, 116, 116, 142, 143, 120, 194, 13, 191, 1232 116, 116, 116, 119, 116, 119, 116, 116, 119, 116, 1233 119, 116, 116, 116, 119, 119, 116, 119, 116, 13, 1234 116, 121, 192, 13, 192, 115, 175, 120, 115, 175, 1235 141, 13, 115, 145, 179, 118, 189, 189, 179, 192, 1236 179, 179, 179, 179, 179, 179, 192, 116, 84, 85, 1237 122, 170, 116, 177, 35, 117, 48, 54, 66, 81, 1238 89, 116, 146, 42, 147, 13, 115, 120, 194, 116, 1239 116, 116, 116, 116, 116, 116, 116, 7, 116, 116, 1240 156, 13, 116, 115, 38, 148, 116, 146, 118, 177, 1241 175, 175, 12, 29, 40, 45, 47, 58, 64, 68, 1242 73, 93, 97, 101, 103, 118, 120, 157, 158, 159, 1243 160, 161, 165, 176, 192, 13, 179, 115, 105, 149, 1244 13, 116, 195, 115, 115, 192, 115, 115, 22, 151, 1245 152, 115, 115, 193, 116, 179, 115, 144, 13, 69, 1246 70, 123, 171, 177, 177, 101, 160, 192, 47, 165, 1247 192, 192, 42, 153, 177, 56, 100, 101, 162, 163, 1248 165, 116, 179, 82, 83, 102, 150, 7, 119, 116, 1249 115, 116, 116, 116, 22, 154, 116, 115, 115, 115, 1250 116, 195, 116, 177, 192, 192, 7, 13, 155, 164, 1251 165, 163, 163, 56, 163, 116, 177, 192, 195, 116, 1252 195, 116, 116, 115, 165, 164, 116 1253 }; 1254 1255 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 1256 static const yytype_uint8 yyr1[] = 1257 { 1258 0, 125, 126, 126, 126, 126, 127, 127, 128, 128, 1259 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 1260 130, 128, 128, 131, 128, 128, 128, 128, 132, 134, 1261 133, 135, 135, 135, 136, 136, 137, 137, 138, 137, 1262 139, 139, 140, 141, 140, 143, 144, 142, 145, 145, 1263 145, 145, 145, 145, 146, 146, 146, 146, 146, 147, 1264 147, 148, 148, 149, 149, 150, 150, 150, 150, 151, 1265 152, 152, 153, 153, 154, 154, 155, 155, 156, 156, 1266 157, 157, 157, 157, 157, 157, 157, 157, 157, 158, 1267 158, 158, 158, 158, 159, 159, 160, 160, 161, 161, 1268 162, 162, 162, 162, 163, 163, 163, 164, 164, 165, 1269 165, 165, 166, 166, 166, 166, 167, 167, 168, 168, 1270 168, 169, 169, 169, 170, 170, 170, 171, 171, 171, 1271 172, 172, 173, 174, 174, 175, 175, 175, 175, 175, 1272 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 1273 176, 178, 177, 179, 179, 179, 179, 179, 179, 179, 1274 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 1275 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 1276 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 1277 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, 1278 181, 182, 182, 183, 184, 185, 185, 186, 186, 186, 1279 187, 187, 188, 188, 188, 188, 188, 189, 189, 189, 1280 189, 190, 189, 191, 189, 189, 189, 192, 192, 193, 1281 193, 194, 194, 195, 195 1282 }; 1283 1284 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 1285 static const yytype_uint8 yyr2[] = 1286 { 1287 0, 2, 2, 2, 2, 2, 2, 0, 4, 1, 1288 0, 5, 1, 4, 4, 4, 4, 8, 4, 4, 1289 0, 5, 4, 0, 5, 1, 1, 1, 4, 0, 1290 2, 1, 2, 3, 1, 3, 1, 2, 0, 5, 1291 2, 0, 1, 0, 7, 0, 0, 7, 1, 3, 1292 2, 4, 4, 5, 1, 1, 1, 1, 1, 0, 1293 4, 0, 4, 0, 4, 0, 1, 1, 1, 5, 1294 2, 0, 3, 0, 3, 0, 2, 0, 0, 2, 1295 2, 1, 4, 6, 4, 1, 4, 2, 1, 1, 1296 1, 1, 1, 1, 1, 4, 1, 4, 1, 4, 1297 3, 1, 6, 4, 1, 4, 4, 3, 1, 1, 1298 1, 1, 4, 2, 6, 2, 3, 0, 10, 2, 1299 0, 3, 4, 0, 1, 1, 1, 1, 1, 1, 1300 2, 0, 4, 1, 1, 0, 2, 2, 5, 5, 1301 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 1302 6, 0, 2, 3, 2, 2, 2, 2, 3, 3, 1303 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1304 3, 3, 3, 3, 3, 3, 5, 1, 1, 6, 1305 6, 4, 1, 4, 4, 4, 4, 4, 4, 4, 1306 4, 4, 6, 4, 6, 6, 4, 6, 6, 3, 1307 1, 1, 2, 5, 1, 1, 2, 4, 5, 6, 1308 1, 2, 0, 2, 4, 4, 8, 1, 1, 3, 1309 3, 0, 7, 0, 9, 1, 3, 1, 1, 1, 1310 1, 1, 0, 1, 0 1311 }; 1312 1313 1314 #define yyerrok (yyerrstatus = 0) 1315 #define yyclearin (yychar = YYEMPTY) 1316 #define YYEMPTY (-2) 1317 #define YYEOF 0 1318 1319 #define YYACCEPT goto yyacceptlab 1320 #define YYABORT goto yyabortlab 1321 #define YYERROR goto yyerrorlab 1322 1323 1324 #define YYRECOVERING() (!!yyerrstatus) 1325 1326 #define YYBACKUP(Token, Value) \ 1327 do \ 1328 if (yychar == YYEMPTY) \ 1329 { \ 1330 yychar = (Token); \ 1331 yylval = (Value); \ 1332 YYPOPSTACK (yylen); \ 1333 yystate = *yyssp; \ 1334 goto yybackup; \ 1335 } \ 1336 else \ 1337 { \ 1338 yyerror (closure, YY_("syntax error: cannot back up")); \ 1339 YYERROR; \ 1340 } \ 1341 while (0) 1342 1343 /* Error token number */ 1344 #define YYTERROR 1 1345 #define YYERRCODE 256 1346 1347 1348 1349 /* Enable debugging if requested. */ 1350 #if YYDEBUG 1351 1352 # ifndef YYFPRINTF 1353 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1354 # define YYFPRINTF fprintf 1355 # endif 1356 1357 # define YYDPRINTF(Args) \ 1358 do { \ 1359 if (yydebug) \ 1360 YYFPRINTF Args; \ 1361 } while (0) 1362 1363 /* This macro is provided for backward compatibility. */ 1364 #ifndef YY_LOCATION_PRINT 1365 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1366 #endif 1367 1368 1369 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1370 do { \ 1371 if (yydebug) \ 1372 { \ 1373 YYFPRINTF (stderr, "%s ", Title); \ 1374 yy_symbol_print (stderr, \ 1375 Type, Value, closure); \ 1376 YYFPRINTF (stderr, "\n"); \ 1377 } \ 1378 } while (0) 1379 1380 1381 /*----------------------------------------. 1382 | Print this symbol's value on YYOUTPUT. | 1383 `----------------------------------------*/ 1384 1385 static void 1386 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* closure) 1387 { 1388 FILE *yyo = yyoutput; 1389 YYUSE (yyo); 1390 YYUSE (closure); 1391 if (!yyvaluep) 1392 return; 1393 # ifdef YYPRINT 1394 if (yytype < YYNTOKENS) 1395 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1396 # endif 1397 YYUSE (yytype); 1398 } 1399 1400 1401 /*--------------------------------. 1402 | Print this symbol on YYOUTPUT. | 1403 `--------------------------------*/ 1404 1405 static void 1406 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void* closure) 1407 { 1408 YYFPRINTF (yyoutput, "%s %s (", 1409 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 1410 1411 yy_symbol_value_print (yyoutput, yytype, yyvaluep, closure); 1412 YYFPRINTF (yyoutput, ")"); 1413 } 1414 1415 /*------------------------------------------------------------------. 1416 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1417 | TOP (included). | 1418 `------------------------------------------------------------------*/ 1419 1420 static void 1421 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1422 { 1423 YYFPRINTF (stderr, "Stack now"); 1424 for (; yybottom <= yytop; yybottom++) 1425 { 1426 int yybot = *yybottom; 1427 YYFPRINTF (stderr, " %d", yybot); 1428 } 1429 YYFPRINTF (stderr, "\n"); 1430 } 1431 1432 # define YY_STACK_PRINT(Bottom, Top) \ 1433 do { \ 1434 if (yydebug) \ 1435 yy_stack_print ((Bottom), (Top)); \ 1436 } while (0) 1437 1438 1439 /*------------------------------------------------. 1440 | Report that the YYRULE is going to be reduced. | 1441 `------------------------------------------------*/ 1442 1443 static void 1444 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, void* closure) 1445 { 1446 unsigned long int yylno = yyrline[yyrule]; 1447 int yynrhs = yyr2[yyrule]; 1448 int yyi; 1449 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1450 yyrule - 1, yylno); 1451 /* The symbols being reduced. */ 1452 for (yyi = 0; yyi < yynrhs; yyi++) 1453 { 1454 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1455 yy_symbol_print (stderr, 1456 yystos[yyssp[yyi + 1 - yynrhs]], 1457 &(yyvsp[(yyi + 1) - (yynrhs)]) 1458 , closure); 1459 YYFPRINTF (stderr, "\n"); 1460 } 1461 } 1462 1463 # define YY_REDUCE_PRINT(Rule) \ 1464 do { \ 1465 if (yydebug) \ 1466 yy_reduce_print (yyssp, yyvsp, Rule, closure); \ 1467 } while (0) 1468 1469 /* Nonzero means print parse trace. It is left uninitialized so that 1470 multiple parsers can coexist. */ 1471 int yydebug; 1472 #else /* !YYDEBUG */ 1473 # define YYDPRINTF(Args) 1474 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1475 # define YY_STACK_PRINT(Bottom, Top) 1476 # define YY_REDUCE_PRINT(Rule) 1477 #endif /* !YYDEBUG */ 1478 1479 1480 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1481 #ifndef YYINITDEPTH 1482 # define YYINITDEPTH 200 1483 #endif 1484 1485 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1486 if the built-in stack extension method is used). 1487 1488 Do not make this value too large; the results are undefined if 1489 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1490 evaluated with infinite-precision integer arithmetic. */ 1491 1492 #ifndef YYMAXDEPTH 1493 # define YYMAXDEPTH 10000 1494 #endif 1495 1496 1497 #if YYERROR_VERBOSE 1498 1499 # ifndef yystrlen 1500 # if defined __GLIBC__ && defined _STRING_H 1501 # define yystrlen strlen 1502 # else 1503 /* Return the length of YYSTR. */ 1504 static YYSIZE_T 1505 yystrlen (const char *yystr) 1506 { 1507 YYSIZE_T yylen; 1508 for (yylen = 0; yystr[yylen]; yylen++) 1509 continue; 1510 return yylen; 1511 } 1512 # endif 1513 # endif 1514 1515 # ifndef yystpcpy 1516 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1517 # define yystpcpy stpcpy 1518 # else 1519 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1520 YYDEST. */ 1521 static char * 1522 yystpcpy (char *yydest, const char *yysrc) 1523 { 1524 char *yyd = yydest; 1525 const char *yys = yysrc; 1526 1527 while ((*yyd++ = *yys++) != '\0') 1528 continue; 1529 1530 return yyd - 1; 1531 } 1532 # endif 1533 # endif 1534 1535 # ifndef yytnamerr 1536 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1537 quotes and backslashes, so that it's suitable for yyerror. The 1538 heuristic is that double-quoting is unnecessary unless the string 1539 contains an apostrophe, a comma, or backslash (other than 1540 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1541 null, do not copy; instead, return the length of what the result 1542 would have been. */ 1543 static YYSIZE_T 1544 yytnamerr (char *yyres, const char *yystr) 1545 { 1546 if (*yystr == '"') 1547 { 1548 YYSIZE_T yyn = 0; 1549 char const *yyp = yystr; 1550 1551 for (;;) 1552 switch (*++yyp) 1553 { 1554 case '\'': 1555 case ',': 1556 goto do_not_strip_quotes; 1557 1558 case '\\': 1559 if (*++yyp != '\\') 1560 goto do_not_strip_quotes; 1561 /* Fall through. */ 1562 default: 1563 if (yyres) 1564 yyres[yyn] = *yyp; 1565 yyn++; 1566 break; 1567 1568 case '"': 1569 if (yyres) 1570 yyres[yyn] = '\0'; 1571 return yyn; 1572 } 1573 do_not_strip_quotes: ; 1574 } 1575 1576 if (! yyres) 1577 return yystrlen (yystr); 1578 1579 return yystpcpy (yyres, yystr) - yyres; 1580 } 1581 # endif 1582 1583 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 1584 about the unexpected token YYTOKEN for the state stack whose top is 1585 YYSSP. 1586 1587 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 1588 not large enough to hold the message. In that case, also set 1589 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 1590 required number of bytes is too large to store. */ 1591 static int 1592 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1593 yytype_int16 *yyssp, int yytoken) 1594 { 1595 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 1596 YYSIZE_T yysize = yysize0; 1597 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1598 /* Internationalized format string. */ 1599 const char *yyformat = YY_NULLPTR; 1600 /* Arguments of yyformat. */ 1601 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1602 /* Number of reported tokens (one for the "unexpected", one per 1603 "expected"). */ 1604 int yycount = 0; 1605 1606 /* There are many possibilities here to consider: 1607 - If this state is a consistent state with a default action, then 1608 the only way this function was invoked is if the default action 1609 is an error action. In that case, don't check for expected 1610 tokens because there are none. 1611 - The only way there can be no lookahead present (in yychar) is if 1612 this state is a consistent state with a default action. Thus, 1613 detecting the absence of a lookahead is sufficient to determine 1614 that there is no unexpected or expected token to report. In that 1615 case, just report a simple "syntax error". 1616 - Don't assume there isn't a lookahead just because this state is a 1617 consistent state with a default action. There might have been a 1618 previous inconsistent state, consistent state with a non-default 1619 action, or user semantic action that manipulated yychar. 1620 - Of course, the expected token list depends on states to have 1621 correct lookahead information, and it depends on the parser not 1622 to perform extra reductions after fetching a lookahead from the 1623 scanner and before detecting a syntax error. Thus, state merging 1624 (from LALR or IELR) and default reductions corrupt the expected 1625 token list. However, the list is correct for canonical LR with 1626 one exception: it will still contain any token that will not be 1627 accepted due to an error action in a later state. 1628 */ 1629 if (yytoken != YYEMPTY) 1630 { 1631 int yyn = yypact[*yyssp]; 1632 yyarg[yycount++] = yytname[yytoken]; 1633 if (!yypact_value_is_default (yyn)) 1634 { 1635 /* Start YYX at -YYN if negative to avoid negative indexes in 1636 YYCHECK. In other words, skip the first -YYN actions for 1637 this state because they are default actions. */ 1638 int yyxbegin = yyn < 0 ? -yyn : 0; 1639 /* Stay within bounds of both yycheck and yytname. */ 1640 int yychecklim = YYLAST - yyn + 1; 1641 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1642 int yyx; 1643 1644 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1645 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 1646 && !yytable_value_is_error (yytable[yyx + yyn])) 1647 { 1648 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1649 { 1650 yycount = 1; 1651 yysize = yysize0; 1652 break; 1653 } 1654 yyarg[yycount++] = yytname[yyx]; 1655 { 1656 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 1657 if (! (yysize <= yysize1 1658 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1659 return 2; 1660 yysize = yysize1; 1661 } 1662 } 1663 } 1664 } 1665 1666 switch (yycount) 1667 { 1668 # define YYCASE_(N, S) \ 1669 case N: \ 1670 yyformat = S; \ 1671 break 1672 YYCASE_(0, YY_("syntax error")); 1673 YYCASE_(1, YY_("syntax error, unexpected %s")); 1674 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1675 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1676 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1677 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1678 # undef YYCASE_ 1679 } 1680 1681 { 1682 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1683 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1684 return 2; 1685 yysize = yysize1; 1686 } 1687 1688 if (*yymsg_alloc < yysize) 1689 { 1690 *yymsg_alloc = 2 * yysize; 1691 if (! (yysize <= *yymsg_alloc 1692 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1693 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1694 return 1; 1695 } 1696 1697 /* Avoid sprintf, as that infringes on the user's name space. 1698 Don't have undefined behavior even if the translation 1699 produced a string with the wrong number of "%s"s. */ 1700 { 1701 char *yyp = *yymsg; 1702 int yyi = 0; 1703 while ((*yyp = *yyformat) != '\0') 1704 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1705 { 1706 yyp += yytnamerr (yyp, yyarg[yyi++]); 1707 yyformat += 2; 1708 } 1709 else 1710 { 1711 yyp++; 1712 yyformat++; 1713 } 1714 } 1715 return 0; 1716 } 1717 #endif /* YYERROR_VERBOSE */ 1718 1719 /*-----------------------------------------------. 1720 | Release the memory associated to this symbol. | 1721 `-----------------------------------------------*/ 1722 1723 static void 1724 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void* closure) 1725 { 1726 YYUSE (yyvaluep); 1727 YYUSE (closure); 1728 if (!yymsg) 1729 yymsg = "Deleting"; 1730 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1731 1732 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1733 YYUSE (yytype); 1734 YY_IGNORE_MAYBE_UNINITIALIZED_END 1735 } 1736 1737 1738 1739 1740 /*----------. 1741 | yyparse. | 1742 `----------*/ 1743 1744 int 1745 yyparse (void* closure) 1746 { 1747 /* The lookahead symbol. */ 1748 int yychar; 1749 1750 1751 /* The semantic value of the lookahead symbol. */ 1752 /* Default value used for initialization, for pacifying older GCCs 1753 or non-GCC compilers. */ 1754 YY_INITIAL_VALUE (static YYSTYPE yyval_default;) 1755 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); 1756 1757 /* Number of syntax errors so far. */ 1758 int yynerrs; 1759 1760 int yystate; 1761 /* Number of tokens to shift before error messages enabled. */ 1762 int yyerrstatus; 1763 1764 /* The stacks and their tools: 1765 'yyss': related to states. 1766 'yyvs': related to semantic values. 1767 1768 Refer to the stacks through separate pointers, to allow yyoverflow 1769 to reallocate them elsewhere. */ 1770 1771 /* The state stack. */ 1772 yytype_int16 yyssa[YYINITDEPTH]; 1773 yytype_int16 *yyss; 1774 yytype_int16 *yyssp; 1775 1776 /* The semantic value stack. */ 1777 YYSTYPE yyvsa[YYINITDEPTH]; 1778 YYSTYPE *yyvs; 1779 YYSTYPE *yyvsp; 1780 1781 YYSIZE_T yystacksize; 1782 1783 int yyn; 1784 int yyresult; 1785 /* Lookahead token as an internal (translated) token number. */ 1786 int yytoken = 0; 1787 /* The variables used to return semantic value and location from the 1788 action routines. */ 1789 YYSTYPE yyval; 1790 1791 #if YYERROR_VERBOSE 1792 /* Buffer for error messages, and its allocated size. */ 1793 char yymsgbuf[128]; 1794 char *yymsg = yymsgbuf; 1795 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1796 #endif 1797 1798 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1799 1800 /* The number of symbols on the RHS of the reduced rule. 1801 Keep to zero when no symbol should be popped. */ 1802 int yylen = 0; 1803 1804 yyssp = yyss = yyssa; 1805 yyvsp = yyvs = yyvsa; 1806 yystacksize = YYINITDEPTH; 1807 1808 YYDPRINTF ((stderr, "Starting parse\n")); 1809 1810 yystate = 0; 1811 yyerrstatus = 0; 1812 yynerrs = 0; 1813 yychar = YYEMPTY; /* Cause a token to be read. */ 1814 goto yysetstate; 1815 1816 /*------------------------------------------------------------. 1817 | yynewstate -- Push a new state, which is found in yystate. | 1818 `------------------------------------------------------------*/ 1819 yynewstate: 1820 /* In all cases, when you get here, the value and location stacks 1821 have just been pushed. So pushing a state here evens the stacks. */ 1822 yyssp++; 1823 1824 yysetstate: 1825 *yyssp = yystate; 1826 1827 if (yyss + yystacksize - 1 <= yyssp) 1828 { 1829 /* Get the current used size of the three stacks, in elements. */ 1830 YYSIZE_T yysize = yyssp - yyss + 1; 1831 1832 #ifdef yyoverflow 1833 { 1834 /* Give user a chance to reallocate the stack. Use copies of 1835 these so that the &'s don't force the real ones into 1836 memory. */ 1837 YYSTYPE *yyvs1 = yyvs; 1838 yytype_int16 *yyss1 = yyss; 1839 1840 /* Each stack pointer address is followed by the size of the 1841 data in use in that stack, in bytes. This used to be a 1842 conditional around just the two extra args, but that might 1843 be undefined if yyoverflow is a macro. */ 1844 yyoverflow (YY_("memory exhausted"), 1845 &yyss1, yysize * sizeof (*yyssp), 1846 &yyvs1, yysize * sizeof (*yyvsp), 1847 &yystacksize); 1848 1849 yyss = yyss1; 1850 yyvs = yyvs1; 1851 } 1852 #else /* no yyoverflow */ 1853 # ifndef YYSTACK_RELOCATE 1854 goto yyexhaustedlab; 1855 # else 1856 /* Extend the stack our own way. */ 1857 if (YYMAXDEPTH <= yystacksize) 1858 goto yyexhaustedlab; 1859 yystacksize *= 2; 1860 if (YYMAXDEPTH < yystacksize) 1861 yystacksize = YYMAXDEPTH; 1862 1863 { 1864 yytype_int16 *yyss1 = yyss; 1865 union yyalloc *yyptr = 1866 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1867 if (! yyptr) 1868 goto yyexhaustedlab; 1869 YYSTACK_RELOCATE (yyss_alloc, yyss); 1870 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1871 # undef YYSTACK_RELOCATE 1872 if (yyss1 != yyssa) 1873 YYSTACK_FREE (yyss1); 1874 } 1875 # endif 1876 #endif /* no yyoverflow */ 1877 1878 yyssp = yyss + yysize - 1; 1879 yyvsp = yyvs + yysize - 1; 1880 1881 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1882 (unsigned long int) yystacksize)); 1883 1884 if (yyss + yystacksize - 1 <= yyssp) 1885 YYABORT; 1886 } 1887 1888 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1889 1890 if (yystate == YYFINAL) 1891 YYACCEPT; 1892 1893 goto yybackup; 1894 1895 /*-----------. 1896 | yybackup. | 1897 `-----------*/ 1898 yybackup: 1899 1900 /* Do appropriate processing given the current state. Read a 1901 lookahead token if we need one and don't already have one. */ 1902 1903 /* First try to decide what to do without reference to lookahead token. */ 1904 yyn = yypact[yystate]; 1905 if (yypact_value_is_default (yyn)) 1906 goto yydefault; 1907 1908 /* Not known => get a lookahead token if don't already have one. */ 1909 1910 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1911 if (yychar == YYEMPTY) 1912 { 1913 YYDPRINTF ((stderr, "Reading a token: ")); 1914 yychar = yylex (&yylval, closure); 1915 } 1916 1917 if (yychar <= YYEOF) 1918 { 1919 yychar = yytoken = YYEOF; 1920 YYDPRINTF ((stderr, "Now at end of input.\n")); 1921 } 1922 else 1923 { 1924 yytoken = YYTRANSLATE (yychar); 1925 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1926 } 1927 1928 /* If the proper action on seeing token YYTOKEN is to reduce or to 1929 detect an error, take that action. */ 1930 yyn += yytoken; 1931 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1932 goto yydefault; 1933 yyn = yytable[yyn]; 1934 if (yyn <= 0) 1935 { 1936 if (yytable_value_is_error (yyn)) 1937 goto yyerrlab; 1938 yyn = -yyn; 1939 goto yyreduce; 1940 } 1941 1942 /* Count tokens shifted since error; after three, turn off error 1943 status. */ 1944 if (yyerrstatus) 1945 yyerrstatus--; 1946 1947 /* Shift the lookahead token. */ 1948 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1949 1950 /* Discard the shifted token. */ 1951 yychar = YYEMPTY; 1952 1953 yystate = yyn; 1954 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1955 *++yyvsp = yylval; 1956 YY_IGNORE_MAYBE_UNINITIALIZED_END 1957 1958 goto yynewstate; 1959 1960 1961 /*-----------------------------------------------------------. 1962 | yydefault -- do the default action for the current state. | 1963 `-----------------------------------------------------------*/ 1964 yydefault: 1965 yyn = yydefact[yystate]; 1966 if (yyn == 0) 1967 goto yyerrlab; 1968 goto yyreduce; 1969 1970 1971 /*-----------------------------. 1972 | yyreduce -- Do a reduction. | 1973 `-----------------------------*/ 1974 yyreduce: 1975 /* yyn is the number of a rule to reduce with. */ 1976 yylen = yyr2[yyn]; 1977 1978 /* If YYLEN is nonzero, implement the default value of the action: 1979 '$$ = $1'. 1980 1981 Otherwise, the following line sets YYVAL to garbage. 1982 This behavior is undocumented and Bison 1983 users should not rely upon it. Assigning to YYVAL 1984 unconditionally makes the parser a bit smaller, and it avoids a 1985 GCC warning that YYVAL may be used uninitialized. */ 1986 yyval = yyvsp[1-yylen]; 1987 1988 1989 YY_REDUCE_PRINT (yyn); 1990 switch (yyn) 1991 { 1992 case 9: 1993 #line 247 "yyscript.y" /* yacc.c:1646 */ 1994 { script_set_common_allocation(closure, 1); } 1995 #line 1996 "yyscript.c" /* yacc.c:1646 */ 1996 break; 1997 1998 case 10: 1999 #line 249 "yyscript.y" /* yacc.c:1646 */ 2000 { script_start_group(closure); } 2001 #line 2002 "yyscript.c" /* yacc.c:1646 */ 2002 break; 2003 2004 case 11: 2005 #line 251 "yyscript.y" /* yacc.c:1646 */ 2006 { script_end_group(closure); } 2007 #line 2008 "yyscript.c" /* yacc.c:1646 */ 2008 break; 2009 2010 case 12: 2011 #line 253 "yyscript.y" /* yacc.c:1646 */ 2012 { script_set_common_allocation(closure, 0); } 2013 #line 2014 "yyscript.c" /* yacc.c:1646 */ 2014 break; 2015 2016 case 15: 2017 #line 257 "yyscript.y" /* yacc.c:1646 */ 2018 { script_parse_option(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 2019 #line 2020 "yyscript.c" /* yacc.c:1646 */ 2020 break; 2021 2022 case 16: 2023 #line 259 "yyscript.y" /* yacc.c:1646 */ 2024 { 2025 if (!script_check_output_format(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, 2026 NULL, 0, NULL, 0)) 2027 YYABORT; 2028 } 2029 #line 2030 "yyscript.c" /* yacc.c:1646 */ 2030 break; 2031 2032 case 17: 2033 #line 265 "yyscript.y" /* yacc.c:1646 */ 2034 { 2035 if (!script_check_output_format(closure, (yyvsp[-5].string).value, (yyvsp[-5].string).length, 2036 (yyvsp[-3].string).value, (yyvsp[-3].string).length, 2037 (yyvsp[-1].string).value, (yyvsp[-1].string).length)) 2038 YYABORT; 2039 } 2040 #line 2041 "yyscript.c" /* yacc.c:1646 */ 2041 break; 2042 2043 case 19: 2044 #line 273 "yyscript.y" /* yacc.c:1646 */ 2045 { script_add_search_dir(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 2046 #line 2047 "yyscript.c" /* yacc.c:1646 */ 2047 break; 2048 2049 case 20: 2050 #line 275 "yyscript.y" /* yacc.c:1646 */ 2051 { script_start_sections(closure); } 2052 #line 2053 "yyscript.c" /* yacc.c:1646 */ 2053 break; 2054 2055 case 21: 2056 #line 277 "yyscript.y" /* yacc.c:1646 */ 2057 { script_finish_sections(closure); } 2058 #line 2059 "yyscript.c" /* yacc.c:1646 */ 2059 break; 2060 2061 case 22: 2062 #line 279 "yyscript.y" /* yacc.c:1646 */ 2063 { script_set_target(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 2064 #line 2065 "yyscript.c" /* yacc.c:1646 */ 2065 break; 2066 2067 case 23: 2068 #line 281 "yyscript.y" /* yacc.c:1646 */ 2069 { script_push_lex_into_version_mode(closure); } 2070 #line 2071 "yyscript.c" /* yacc.c:1646 */ 2071 break; 2072 2073 case 24: 2074 #line 283 "yyscript.y" /* yacc.c:1646 */ 2075 { script_pop_lex_mode(closure); } 2076 #line 2077 "yyscript.c" /* yacc.c:1646 */ 2077 break; 2078 2079 case 29: 2080 #line 302 "yyscript.y" /* yacc.c:1646 */ 2081 { script_push_lex_into_expression_mode(closure); } 2082 #line 2083 "yyscript.c" /* yacc.c:1646 */ 2083 break; 2084 2085 case 30: 2086 #line 304 "yyscript.y" /* yacc.c:1646 */ 2087 { script_pop_lex_mode(closure); } 2088 #line 2089 "yyscript.c" /* yacc.c:1646 */ 2089 break; 2090 2091 case 31: 2092 #line 309 "yyscript.y" /* yacc.c:1646 */ 2093 { script_add_extern(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2094 #line 2095 "yyscript.c" /* yacc.c:1646 */ 2095 break; 2096 2097 case 32: 2098 #line 311 "yyscript.y" /* yacc.c:1646 */ 2099 { script_add_extern(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2100 #line 2101 "yyscript.c" /* yacc.c:1646 */ 2101 break; 2102 2103 case 33: 2104 #line 313 "yyscript.y" /* yacc.c:1646 */ 2105 { script_add_extern(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2106 #line 2107 "yyscript.c" /* yacc.c:1646 */ 2107 break; 2108 2109 case 36: 2110 #line 325 "yyscript.y" /* yacc.c:1646 */ 2111 { script_add_file(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2112 #line 2113 "yyscript.c" /* yacc.c:1646 */ 2113 break; 2114 2115 case 37: 2116 #line 327 "yyscript.y" /* yacc.c:1646 */ 2117 { script_add_library(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2118 #line 2119 "yyscript.c" /* yacc.c:1646 */ 2119 break; 2120 2121 case 38: 2122 #line 329 "yyscript.y" /* yacc.c:1646 */ 2123 { script_start_as_needed(closure); } 2124 #line 2125 "yyscript.c" /* yacc.c:1646 */ 2125 break; 2126 2127 case 39: 2128 #line 331 "yyscript.y" /* yacc.c:1646 */ 2129 { script_end_as_needed(closure); } 2130 #line 2131 "yyscript.c" /* yacc.c:1646 */ 2131 break; 2132 2133 case 43: 2134 #line 344 "yyscript.y" /* yacc.c:1646 */ 2135 { script_start_output_section(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, &(yyvsp[0].output_section_header)); } 2136 #line 2137 "yyscript.c" /* yacc.c:1646 */ 2137 break; 2138 2139 case 44: 2140 #line 346 "yyscript.y" /* yacc.c:1646 */ 2141 { script_finish_output_section(closure, &(yyvsp[0].output_section_trailer)); } 2142 #line 2143 "yyscript.c" /* yacc.c:1646 */ 2143 break; 2144 2145 case 45: 2146 #line 352 "yyscript.y" /* yacc.c:1646 */ 2147 { script_push_lex_into_expression_mode(closure); } 2148 #line 2149 "yyscript.c" /* yacc.c:1646 */ 2149 break; 2150 2151 case 46: 2152 #line 354 "yyscript.y" /* yacc.c:1646 */ 2153 { script_pop_lex_mode(closure); } 2154 #line 2155 "yyscript.c" /* yacc.c:1646 */ 2155 break; 2156 2157 case 47: 2158 #line 356 "yyscript.y" /* yacc.c:1646 */ 2159 { 2160 (yyval.output_section_header).address = (yyvsp[-5].output_section_header).address; 2161 (yyval.output_section_header).section_type = (yyvsp[-5].output_section_header).section_type; 2162 (yyval.output_section_header).load_address = (yyvsp[-4].expr); 2163 (yyval.output_section_header).align = (yyvsp[-3].expr); 2164 (yyval.output_section_header).subalign = (yyvsp[-2].expr); 2165 (yyval.output_section_header).constraint = (yyvsp[0].constraint); 2166 } 2167 #line 2168 "yyscript.c" /* yacc.c:1646 */ 2168 break; 2169 2170 case 48: 2171 #line 372 "yyscript.y" /* yacc.c:1646 */ 2172 { 2173 (yyval.output_section_header).address = NULL; 2174 (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; 2175 } 2176 #line 2177 "yyscript.c" /* yacc.c:1646 */ 2177 break; 2178 2179 case 49: 2180 #line 377 "yyscript.y" /* yacc.c:1646 */ 2181 { 2182 (yyval.output_section_header).address = NULL; 2183 (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; 2184 } 2185 #line 2186 "yyscript.c" /* yacc.c:1646 */ 2186 break; 2187 2188 case 50: 2189 #line 382 "yyscript.y" /* yacc.c:1646 */ 2190 { 2191 (yyval.output_section_header).address = (yyvsp[-1].expr); 2192 (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; 2193 } 2194 #line 2195 "yyscript.c" /* yacc.c:1646 */ 2195 break; 2196 2197 case 51: 2198 #line 387 "yyscript.y" /* yacc.c:1646 */ 2199 { 2200 (yyval.output_section_header).address = (yyvsp[-3].expr); 2201 (yyval.output_section_header).section_type = SCRIPT_SECTION_TYPE_NONE; 2202 } 2203 #line 2204 "yyscript.c" /* yacc.c:1646 */ 2204 break; 2205 2206 case 52: 2207 #line 392 "yyscript.y" /* yacc.c:1646 */ 2208 { 2209 (yyval.output_section_header).address = NULL; 2210 (yyval.output_section_header).section_type = (yyvsp[-2].section_type); 2211 } 2212 #line 2213 "yyscript.c" /* yacc.c:1646 */ 2213 break; 2214 2215 case 53: 2216 #line 397 "yyscript.y" /* yacc.c:1646 */ 2217 { 2218 (yyval.output_section_header).address = (yyvsp[-4].expr); 2219 (yyval.output_section_header).section_type = (yyvsp[-2].section_type); 2220 } 2221 #line 2222 "yyscript.c" /* yacc.c:1646 */ 2222 break; 2223 2224 case 54: 2225 #line 406 "yyscript.y" /* yacc.c:1646 */ 2226 { (yyval.section_type) = SCRIPT_SECTION_TYPE_NOLOAD; } 2227 #line 2228 "yyscript.c" /* yacc.c:1646 */ 2228 break; 2229 2230 case 55: 2231 #line 408 "yyscript.y" /* yacc.c:1646 */ 2232 { 2233 yyerror(closure, "DSECT section type is unsupported"); 2234 (yyval.section_type) = SCRIPT_SECTION_TYPE_DSECT; 2235 } 2236 #line 2237 "yyscript.c" /* yacc.c:1646 */ 2237 break; 2238 2239 case 56: 2240 #line 413 "yyscript.y" /* yacc.c:1646 */ 2241 { 2242 yyerror(closure, "COPY section type is unsupported"); 2243 (yyval.section_type) = SCRIPT_SECTION_TYPE_COPY; 2244 } 2245 #line 2246 "yyscript.c" /* yacc.c:1646 */ 2246 break; 2247 2248 case 57: 2249 #line 418 "yyscript.y" /* yacc.c:1646 */ 2250 { 2251 yyerror(closure, "INFO section type is unsupported"); 2252 (yyval.section_type) = SCRIPT_SECTION_TYPE_INFO; 2253 } 2254 #line 2255 "yyscript.c" /* yacc.c:1646 */ 2255 break; 2256 2257 case 58: 2258 #line 423 "yyscript.y" /* yacc.c:1646 */ 2259 { 2260 yyerror(closure, "OVERLAY section type is unsupported"); 2261 (yyval.section_type) = SCRIPT_SECTION_TYPE_OVERLAY; 2262 } 2263 #line 2264 "yyscript.c" /* yacc.c:1646 */ 2264 break; 2265 2266 case 59: 2267 #line 432 "yyscript.y" /* yacc.c:1646 */ 2268 { (yyval.expr) = NULL; } 2269 #line 2270 "yyscript.c" /* yacc.c:1646 */ 2270 break; 2271 2272 case 60: 2273 #line 434 "yyscript.y" /* yacc.c:1646 */ 2274 { (yyval.expr) = (yyvsp[-1].expr); } 2275 #line 2276 "yyscript.c" /* yacc.c:1646 */ 2276 break; 2277 2278 case 61: 2279 #line 440 "yyscript.y" /* yacc.c:1646 */ 2280 { (yyval.expr) = NULL; } 2281 #line 2282 "yyscript.c" /* yacc.c:1646 */ 2282 break; 2283 2284 case 62: 2285 #line 442 "yyscript.y" /* yacc.c:1646 */ 2286 { (yyval.expr) = (yyvsp[-1].expr); } 2287 #line 2288 "yyscript.c" /* yacc.c:1646 */ 2288 break; 2289 2290 case 63: 2291 #line 448 "yyscript.y" /* yacc.c:1646 */ 2292 { (yyval.expr) = NULL; } 2293 #line 2294 "yyscript.c" /* yacc.c:1646 */ 2294 break; 2295 2296 case 64: 2297 #line 450 "yyscript.y" /* yacc.c:1646 */ 2298 { (yyval.expr) = (yyvsp[-1].expr); } 2299 #line 2300 "yyscript.c" /* yacc.c:1646 */ 2300 break; 2301 2302 case 65: 2303 #line 456 "yyscript.y" /* yacc.c:1646 */ 2304 { (yyval.constraint) = CONSTRAINT_NONE; } 2305 #line 2306 "yyscript.c" /* yacc.c:1646 */ 2306 break; 2307 2308 case 66: 2309 #line 458 "yyscript.y" /* yacc.c:1646 */ 2310 { (yyval.constraint) = CONSTRAINT_ONLY_IF_RO; } 2311 #line 2312 "yyscript.c" /* yacc.c:1646 */ 2312 break; 2313 2314 case 67: 2315 #line 460 "yyscript.y" /* yacc.c:1646 */ 2316 { (yyval.constraint) = CONSTRAINT_ONLY_IF_RW; } 2317 #line 2318 "yyscript.c" /* yacc.c:1646 */ 2318 break; 2319 2320 case 68: 2321 #line 462 "yyscript.y" /* yacc.c:1646 */ 2322 { (yyval.constraint) = CONSTRAINT_SPECIAL; } 2323 #line 2324 "yyscript.c" /* yacc.c:1646 */ 2324 break; 2325 2326 case 69: 2327 #line 468 "yyscript.y" /* yacc.c:1646 */ 2328 { 2329 (yyval.output_section_trailer).fill = (yyvsp[-1].expr); 2330 (yyval.output_section_trailer).phdrs = (yyvsp[-2].string_list); 2331 } 2332 #line 2333 "yyscript.c" /* yacc.c:1646 */ 2333 break; 2334 2335 case 70: 2336 #line 477 "yyscript.y" /* yacc.c:1646 */ 2337 { script_set_section_region(closure, (yyvsp[0].string).value, (yyvsp[0].string).length, 1); } 2338 #line 2339 "yyscript.c" /* yacc.c:1646 */ 2339 break; 2340 2341 case 72: 2342 #line 484 "yyscript.y" /* yacc.c:1646 */ 2343 { script_set_section_region(closure, (yyvsp[0].string).value, (yyvsp[0].string).length, 0); } 2344 #line 2345 "yyscript.c" /* yacc.c:1646 */ 2345 break; 2346 2347 case 74: 2348 #line 491 "yyscript.y" /* yacc.c:1646 */ 2349 { (yyval.string_list) = script_string_list_push_back((yyvsp[-2].string_list), (yyvsp[0].string).value, (yyvsp[0].string).length); } 2350 #line 2351 "yyscript.c" /* yacc.c:1646 */ 2351 break; 2352 2353 case 75: 2354 #line 493 "yyscript.y" /* yacc.c:1646 */ 2355 { (yyval.string_list) = NULL; } 2356 #line 2357 "yyscript.c" /* yacc.c:1646 */ 2357 break; 2358 2359 case 76: 2360 #line 500 "yyscript.y" /* yacc.c:1646 */ 2361 { (yyval.expr) = (yyvsp[0].expr); } 2362 #line 2363 "yyscript.c" /* yacc.c:1646 */ 2363 break; 2364 2365 case 77: 2366 #line 502 "yyscript.y" /* yacc.c:1646 */ 2367 { (yyval.expr) = NULL; } 2368 #line 2369 "yyscript.c" /* yacc.c:1646 */ 2369 break; 2370 2371 case 82: 2372 #line 518 "yyscript.y" /* yacc.c:1646 */ 2373 { script_add_data(closure, (yyvsp[-3].integer), (yyvsp[-1].expr)); } 2374 #line 2375 "yyscript.c" /* yacc.c:1646 */ 2375 break; 2376 2377 case 83: 2378 #line 520 "yyscript.y" /* yacc.c:1646 */ 2379 { script_add_assertion(closure, (yyvsp[-3].expr), (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 2380 #line 2381 "yyscript.c" /* yacc.c:1646 */ 2381 break; 2382 2383 case 84: 2384 #line 522 "yyscript.y" /* yacc.c:1646 */ 2385 { script_add_fill(closure, (yyvsp[-1].expr)); } 2386 #line 2387 "yyscript.c" /* yacc.c:1646 */ 2387 break; 2388 2389 case 85: 2390 #line 524 "yyscript.y" /* yacc.c:1646 */ 2391 { 2392 /* The GNU linker uses CONSTRUCTORS for the a.out object 2393 file format. It does nothing when using ELF. Since 2394 some ELF linker scripts use it although it does 2395 nothing, we accept it and ignore it. */ 2396 } 2397 #line 2398 "yyscript.c" /* yacc.c:1646 */ 2398 break; 2399 2400 case 87: 2401 #line 532 "yyscript.y" /* yacc.c:1646 */ 2402 { script_include_directive(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2403 #line 2404 "yyscript.c" /* yacc.c:1646 */ 2404 break; 2405 2406 case 89: 2407 #line 540 "yyscript.y" /* yacc.c:1646 */ 2408 { (yyval.integer) = QUAD; } 2409 #line 2410 "yyscript.c" /* yacc.c:1646 */ 2410 break; 2411 2412 case 90: 2413 #line 542 "yyscript.y" /* yacc.c:1646 */ 2414 { (yyval.integer) = SQUAD; } 2415 #line 2416 "yyscript.c" /* yacc.c:1646 */ 2416 break; 2417 2418 case 91: 2419 #line 544 "yyscript.y" /* yacc.c:1646 */ 2420 { (yyval.integer) = LONG; } 2421 #line 2422 "yyscript.c" /* yacc.c:1646 */ 2422 break; 2423 2424 case 92: 2425 #line 546 "yyscript.y" /* yacc.c:1646 */ 2426 { (yyval.integer) = SHORT; } 2427 #line 2428 "yyscript.c" /* yacc.c:1646 */ 2428 break; 2429 2430 case 93: 2431 #line 548 "yyscript.y" /* yacc.c:1646 */ 2432 { (yyval.integer) = BYTE; } 2433 #line 2434 "yyscript.c" /* yacc.c:1646 */ 2434 break; 2435 2436 case 94: 2437 #line 555 "yyscript.y" /* yacc.c:1646 */ 2438 { script_add_input_section(closure, &(yyvsp[0].input_section_spec), 0); } 2439 #line 2440 "yyscript.c" /* yacc.c:1646 */ 2440 break; 2441 2442 case 95: 2443 #line 557 "yyscript.y" /* yacc.c:1646 */ 2444 { script_add_input_section(closure, &(yyvsp[-1].input_section_spec), 1); } 2445 #line 2446 "yyscript.c" /* yacc.c:1646 */ 2446 break; 2447 2448 case 96: 2449 #line 563 "yyscript.y" /* yacc.c:1646 */ 2450 { 2451 (yyval.input_section_spec).file.name = (yyvsp[0].string); 2452 (yyval.input_section_spec).file.sort = SORT_WILDCARD_NONE; 2453 (yyval.input_section_spec).input_sections.sections = NULL; 2454 (yyval.input_section_spec).input_sections.exclude = NULL; 2455 } 2456 #line 2457 "yyscript.c" /* yacc.c:1646 */ 2457 break; 2458 2459 case 97: 2460 #line 570 "yyscript.y" /* yacc.c:1646 */ 2461 { 2462 (yyval.input_section_spec).file = (yyvsp[-3].wildcard_section); 2463 (yyval.input_section_spec).input_sections = (yyvsp[-1].wildcard_sections); 2464 } 2465 #line 2466 "yyscript.c" /* yacc.c:1646 */ 2466 break; 2467 2468 case 98: 2469 #line 579 "yyscript.y" /* yacc.c:1646 */ 2470 { 2471 (yyval.wildcard_section).name = (yyvsp[0].string); 2472 (yyval.wildcard_section).sort = SORT_WILDCARD_NONE; 2473 } 2474 #line 2475 "yyscript.c" /* yacc.c:1646 */ 2475 break; 2476 2477 case 99: 2478 #line 584 "yyscript.y" /* yacc.c:1646 */ 2479 { 2480 (yyval.wildcard_section).name = (yyvsp[-1].string); 2481 (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME; 2482 } 2483 #line 2484 "yyscript.c" /* yacc.c:1646 */ 2484 break; 2485 2486 case 100: 2487 #line 593 "yyscript.y" /* yacc.c:1646 */ 2488 { 2489 (yyval.wildcard_sections).sections = script_string_sort_list_add((yyvsp[-2].wildcard_sections).sections, &(yyvsp[0].wildcard_section)); 2490 (yyval.wildcard_sections).exclude = (yyvsp[-2].wildcard_sections).exclude; 2491 } 2492 #line 2493 "yyscript.c" /* yacc.c:1646 */ 2493 break; 2494 2495 case 101: 2496 #line 598 "yyscript.y" /* yacc.c:1646 */ 2497 { 2498 (yyval.wildcard_sections).sections = script_new_string_sort_list(&(yyvsp[0].wildcard_section)); 2499 (yyval.wildcard_sections).exclude = NULL; 2500 } 2501 #line 2502 "yyscript.c" /* yacc.c:1646 */ 2502 break; 2503 2504 case 102: 2505 #line 603 "yyscript.y" /* yacc.c:1646 */ 2506 { 2507 (yyval.wildcard_sections).sections = (yyvsp[-5].wildcard_sections).sections; 2508 (yyval.wildcard_sections).exclude = script_string_list_append((yyvsp[-5].wildcard_sections).exclude, (yyvsp[-1].string_list)); 2509 } 2510 #line 2511 "yyscript.c" /* yacc.c:1646 */ 2511 break; 2512 2513 case 103: 2514 #line 608 "yyscript.y" /* yacc.c:1646 */ 2515 { 2516 (yyval.wildcard_sections).sections = NULL; 2517 (yyval.wildcard_sections).exclude = (yyvsp[-1].string_list); 2518 } 2519 #line 2520 "yyscript.c" /* yacc.c:1646 */ 2520 break; 2521 2522 case 104: 2523 #line 617 "yyscript.y" /* yacc.c:1646 */ 2524 { 2525 (yyval.wildcard_section).name = (yyvsp[0].string); 2526 (yyval.wildcard_section).sort = SORT_WILDCARD_NONE; 2527 } 2528 #line 2529 "yyscript.c" /* yacc.c:1646 */ 2529 break; 2530 2531 case 105: 2532 #line 622 "yyscript.y" /* yacc.c:1646 */ 2533 { 2534 (yyval.wildcard_section).name = (yyvsp[-1].wildcard_section).name; 2535 switch ((yyvsp[-1].wildcard_section).sort) 2536 { 2537 case SORT_WILDCARD_NONE: 2538 (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME; 2539 break; 2540 case SORT_WILDCARD_BY_NAME: 2541 case SORT_WILDCARD_BY_NAME_BY_ALIGNMENT: 2542 break; 2543 case SORT_WILDCARD_BY_ALIGNMENT: 2544 case SORT_WILDCARD_BY_ALIGNMENT_BY_NAME: 2545 (yyval.wildcard_section).sort = SORT_WILDCARD_BY_NAME_BY_ALIGNMENT; 2546 break; 2547 default: 2548 abort(); 2549 } 2550 } 2551 #line 2552 "yyscript.c" /* yacc.c:1646 */ 2552 break; 2553 2554 case 106: 2555 #line 641 "yyscript.y" /* yacc.c:1646 */ 2556 { 2557 (yyval.wildcard_section).name = (yyvsp[-1].wildcard_section).name; 2558 switch ((yyvsp[-1].wildcard_section).sort) 2559 { 2560 case SORT_WILDCARD_NONE: 2561 (yyval.wildcard_section).sort = SORT_WILDCARD_BY_ALIGNMENT; 2562 break; 2563 case SORT_WILDCARD_BY_ALIGNMENT: 2564 case SORT_WILDCARD_BY_ALIGNMENT_BY_NAME: 2565 break; 2566 case SORT_WILDCARD_BY_NAME: 2567 case SORT_WILDCARD_BY_NAME_BY_ALIGNMENT: 2568 (yyval.wildcard_section).sort = SORT_WILDCARD_BY_ALIGNMENT_BY_NAME; 2569 break; 2570 default: 2571 abort(); 2572 } 2573 } 2574 #line 2575 "yyscript.c" /* yacc.c:1646 */ 2575 break; 2576 2577 case 107: 2578 #line 664 "yyscript.y" /* yacc.c:1646 */ 2579 { (yyval.string_list) = script_string_list_push_back((yyvsp[-2].string_list), (yyvsp[0].string).value, (yyvsp[0].string).length); } 2580 #line 2581 "yyscript.c" /* yacc.c:1646 */ 2581 break; 2582 2583 case 108: 2584 #line 666 "yyscript.y" /* yacc.c:1646 */ 2585 { (yyval.string_list) = script_new_string_list((yyvsp[0].string).value, (yyvsp[0].string).length); } 2586 #line 2587 "yyscript.c" /* yacc.c:1646 */ 2587 break; 2588 2589 case 109: 2590 #line 673 "yyscript.y" /* yacc.c:1646 */ 2591 { (yyval.string) = (yyvsp[0].string); } 2592 #line 2593 "yyscript.c" /* yacc.c:1646 */ 2593 break; 2594 2595 case 110: 2596 #line 675 "yyscript.y" /* yacc.c:1646 */ 2597 { 2598 (yyval.string).value = "*"; 2599 (yyval.string).length = 1; 2600 } 2601 #line 2602 "yyscript.c" /* yacc.c:1646 */ 2602 break; 2603 2604 case 111: 2605 #line 680 "yyscript.y" /* yacc.c:1646 */ 2606 { 2607 (yyval.string).value = "?"; 2608 (yyval.string).length = 1; 2609 } 2610 #line 2611 "yyscript.c" /* yacc.c:1646 */ 2611 break; 2612 2613 case 112: 2614 #line 690 "yyscript.y" /* yacc.c:1646 */ 2615 { script_set_entry(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 2616 #line 2617 "yyscript.c" /* yacc.c:1646 */ 2617 break; 2618 2619 case 114: 2620 #line 693 "yyscript.y" /* yacc.c:1646 */ 2621 { script_add_assertion(closure, (yyvsp[-3].expr), (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 2622 #line 2623 "yyscript.c" /* yacc.c:1646 */ 2623 break; 2624 2625 case 115: 2626 #line 695 "yyscript.y" /* yacc.c:1646 */ 2627 { script_include_directive(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2628 #line 2629 "yyscript.c" /* yacc.c:1646 */ 2629 break; 2630 2631 case 118: 2632 #line 707 "yyscript.y" /* yacc.c:1646 */ 2633 { script_add_memory(closure, (yyvsp[-9].string).value, (yyvsp[-9].string).length, (yyvsp[-8].integer), (yyvsp[-4].expr), (yyvsp[0].expr)); } 2634 #line 2635 "yyscript.c" /* yacc.c:1646 */ 2635 break; 2636 2637 case 119: 2638 #line 711 "yyscript.y" /* yacc.c:1646 */ 2639 { script_include_directive(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2640 #line 2641 "yyscript.c" /* yacc.c:1646 */ 2641 break; 2642 2643 case 121: 2644 #line 718 "yyscript.y" /* yacc.c:1646 */ 2645 { (yyval.integer) = script_parse_memory_attr(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, 0); } 2646 #line 2647 "yyscript.c" /* yacc.c:1646 */ 2647 break; 2648 2649 case 122: 2650 #line 721 "yyscript.y" /* yacc.c:1646 */ 2651 { (yyval.integer) = script_parse_memory_attr(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length, 1); } 2652 #line 2653 "yyscript.c" /* yacc.c:1646 */ 2653 break; 2654 2655 case 123: 2656 #line 723 "yyscript.y" /* yacc.c:1646 */ 2657 { (yyval.integer) = 0; } 2658 #line 2659 "yyscript.c" /* yacc.c:1646 */ 2659 break; 2660 2661 case 132: 2662 #line 751 "yyscript.y" /* yacc.c:1646 */ 2663 { script_add_phdr(closure, (yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-2].integer), &(yyvsp[-1].phdr_info)); } 2664 #line 2665 "yyscript.c" /* yacc.c:1646 */ 2665 break; 2666 2667 case 133: 2668 #line 760 "yyscript.y" /* yacc.c:1646 */ 2669 { (yyval.integer) = script_phdr_string_to_type(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2670 #line 2671 "yyscript.c" /* yacc.c:1646 */ 2671 break; 2672 2673 case 134: 2674 #line 762 "yyscript.y" /* yacc.c:1646 */ 2675 { (yyval.integer) = (yyvsp[0].integer); } 2676 #line 2677 "yyscript.c" /* yacc.c:1646 */ 2677 break; 2678 2679 case 135: 2680 #line 768 "yyscript.y" /* yacc.c:1646 */ 2681 { memset(&(yyval.phdr_info), 0, sizeof(struct Phdr_info)); } 2682 #line 2683 "yyscript.c" /* yacc.c:1646 */ 2683 break; 2684 2685 case 136: 2686 #line 770 "yyscript.y" /* yacc.c:1646 */ 2687 { 2688 (yyval.phdr_info) = (yyvsp[0].phdr_info); 2689 if ((yyvsp[-1].string).length == 7 && strncmp((yyvsp[-1].string).value, "FILEHDR", 7) == 0) 2690 (yyval.phdr_info).includes_filehdr = 1; 2691 else 2692 yyerror(closure, "PHDRS syntax error"); 2693 } 2694 #line 2695 "yyscript.c" /* yacc.c:1646 */ 2695 break; 2696 2697 case 137: 2698 #line 778 "yyscript.y" /* yacc.c:1646 */ 2699 { 2700 (yyval.phdr_info) = (yyvsp[0].phdr_info); 2701 (yyval.phdr_info).includes_phdrs = 1; 2702 } 2703 #line 2704 "yyscript.c" /* yacc.c:1646 */ 2704 break; 2705 2706 case 138: 2707 #line 783 "yyscript.y" /* yacc.c:1646 */ 2708 { 2709 (yyval.phdr_info) = (yyvsp[0].phdr_info); 2710 if ((yyvsp[-4].string).length == 5 && strncmp((yyvsp[-4].string).value, "FLAGS", 5) == 0) 2711 { 2712 (yyval.phdr_info).is_flags_valid = 1; 2713 (yyval.phdr_info).flags = (yyvsp[-2].integer); 2714 } 2715 else 2716 yyerror(closure, "PHDRS syntax error"); 2717 } 2718 #line 2719 "yyscript.c" /* yacc.c:1646 */ 2719 break; 2720 2721 case 139: 2722 #line 794 "yyscript.y" /* yacc.c:1646 */ 2723 { 2724 (yyval.phdr_info) = (yyvsp[0].phdr_info); 2725 (yyval.phdr_info).load_address = (yyvsp[-2].expr); 2726 } 2727 #line 2728 "yyscript.c" /* yacc.c:1646 */ 2728 break; 2729 2730 case 140: 2731 #line 803 "yyscript.y" /* yacc.c:1646 */ 2732 { script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, (yyvsp[0].expr), 0, 0); } 2733 #line 2734 "yyscript.c" /* yacc.c:1646 */ 2734 break; 2735 2736 case 141: 2737 #line 805 "yyscript.y" /* yacc.c:1646 */ 2738 { 2739 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2740 Expression_ptr e = script_exp_binary_add(s, (yyvsp[0].expr)); 2741 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2742 } 2743 #line 2744 "yyscript.c" /* yacc.c:1646 */ 2744 break; 2745 2746 case 142: 2747 #line 811 "yyscript.y" /* yacc.c:1646 */ 2748 { 2749 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2750 Expression_ptr e = script_exp_binary_sub(s, (yyvsp[0].expr)); 2751 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2752 } 2753 #line 2754 "yyscript.c" /* yacc.c:1646 */ 2754 break; 2755 2756 case 143: 2757 #line 817 "yyscript.y" /* yacc.c:1646 */ 2758 { 2759 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2760 Expression_ptr e = script_exp_binary_mult(s, (yyvsp[0].expr)); 2761 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2762 } 2763 #line 2764 "yyscript.c" /* yacc.c:1646 */ 2764 break; 2765 2766 case 144: 2767 #line 823 "yyscript.y" /* yacc.c:1646 */ 2768 { 2769 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2770 Expression_ptr e = script_exp_binary_div(s, (yyvsp[0].expr)); 2771 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2772 } 2773 #line 2774 "yyscript.c" /* yacc.c:1646 */ 2774 break; 2775 2776 case 145: 2777 #line 829 "yyscript.y" /* yacc.c:1646 */ 2778 { 2779 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2780 Expression_ptr e = script_exp_binary_lshift(s, (yyvsp[0].expr)); 2781 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2782 } 2783 #line 2784 "yyscript.c" /* yacc.c:1646 */ 2784 break; 2785 2786 case 146: 2787 #line 835 "yyscript.y" /* yacc.c:1646 */ 2788 { 2789 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2790 Expression_ptr e = script_exp_binary_rshift(s, (yyvsp[0].expr)); 2791 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2792 } 2793 #line 2794 "yyscript.c" /* yacc.c:1646 */ 2794 break; 2795 2796 case 147: 2797 #line 841 "yyscript.y" /* yacc.c:1646 */ 2798 { 2799 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2800 Expression_ptr e = script_exp_binary_bitwise_and(s, (yyvsp[0].expr)); 2801 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2802 } 2803 #line 2804 "yyscript.c" /* yacc.c:1646 */ 2804 break; 2805 2806 case 148: 2807 #line 847 "yyscript.y" /* yacc.c:1646 */ 2808 { 2809 Expression_ptr s = script_exp_string((yyvsp[-2].string).value, (yyvsp[-2].string).length); 2810 Expression_ptr e = script_exp_binary_bitwise_or(s, (yyvsp[0].expr)); 2811 script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, e, 0, 0); 2812 } 2813 #line 2814 "yyscript.c" /* yacc.c:1646 */ 2814 break; 2815 2816 case 149: 2817 #line 853 "yyscript.y" /* yacc.c:1646 */ 2818 { script_set_symbol(closure, (yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-1].expr), 1, 0); } 2819 #line 2820 "yyscript.c" /* yacc.c:1646 */ 2820 break; 2821 2822 case 150: 2823 #line 855 "yyscript.y" /* yacc.c:1646 */ 2824 { script_set_symbol(closure, (yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-1].expr), 1, 1); } 2825 #line 2826 "yyscript.c" /* yacc.c:1646 */ 2826 break; 2827 2828 case 151: 2829 #line 860 "yyscript.y" /* yacc.c:1646 */ 2830 { script_push_lex_into_expression_mode(closure); } 2831 #line 2832 "yyscript.c" /* yacc.c:1646 */ 2832 break; 2833 2834 case 152: 2835 #line 862 "yyscript.y" /* yacc.c:1646 */ 2836 { 2837 script_pop_lex_mode(closure); 2838 (yyval.expr) = (yyvsp[0].expr); 2839 } 2840 #line 2841 "yyscript.c" /* yacc.c:1646 */ 2841 break; 2842 2843 case 153: 2844 #line 871 "yyscript.y" /* yacc.c:1646 */ 2845 { (yyval.expr) = (yyvsp[-1].expr); } 2846 #line 2847 "yyscript.c" /* yacc.c:1646 */ 2847 break; 2848 2849 case 154: 2850 #line 873 "yyscript.y" /* yacc.c:1646 */ 2851 { (yyval.expr) = script_exp_unary_minus((yyvsp[0].expr)); } 2852 #line 2853 "yyscript.c" /* yacc.c:1646 */ 2853 break; 2854 2855 case 155: 2856 #line 875 "yyscript.y" /* yacc.c:1646 */ 2857 { (yyval.expr) = script_exp_unary_logical_not((yyvsp[0].expr)); } 2858 #line 2859 "yyscript.c" /* yacc.c:1646 */ 2859 break; 2860 2861 case 156: 2862 #line 877 "yyscript.y" /* yacc.c:1646 */ 2863 { (yyval.expr) = script_exp_unary_bitwise_not((yyvsp[0].expr)); } 2864 #line 2865 "yyscript.c" /* yacc.c:1646 */ 2865 break; 2866 2867 case 157: 2868 #line 879 "yyscript.y" /* yacc.c:1646 */ 2869 { (yyval.expr) = (yyvsp[0].expr); } 2870 #line 2871 "yyscript.c" /* yacc.c:1646 */ 2871 break; 2872 2873 case 158: 2874 #line 881 "yyscript.y" /* yacc.c:1646 */ 2875 { (yyval.expr) = script_exp_binary_mult((yyvsp[-2].expr), (yyvsp[0].expr)); } 2876 #line 2877 "yyscript.c" /* yacc.c:1646 */ 2877 break; 2878 2879 case 159: 2880 #line 883 "yyscript.y" /* yacc.c:1646 */ 2881 { (yyval.expr) = script_exp_binary_div((yyvsp[-2].expr), (yyvsp[0].expr)); } 2882 #line 2883 "yyscript.c" /* yacc.c:1646 */ 2883 break; 2884 2885 case 160: 2886 #line 885 "yyscript.y" /* yacc.c:1646 */ 2887 { (yyval.expr) = script_exp_binary_mod((yyvsp[-2].expr), (yyvsp[0].expr)); } 2888 #line 2889 "yyscript.c" /* yacc.c:1646 */ 2889 break; 2890 2891 case 161: 2892 #line 887 "yyscript.y" /* yacc.c:1646 */ 2893 { (yyval.expr) = script_exp_binary_add((yyvsp[-2].expr), (yyvsp[0].expr)); } 2894 #line 2895 "yyscript.c" /* yacc.c:1646 */ 2895 break; 2896 2897 case 162: 2898 #line 889 "yyscript.y" /* yacc.c:1646 */ 2899 { (yyval.expr) = script_exp_binary_sub((yyvsp[-2].expr), (yyvsp[0].expr)); } 2900 #line 2901 "yyscript.c" /* yacc.c:1646 */ 2901 break; 2902 2903 case 163: 2904 #line 891 "yyscript.y" /* yacc.c:1646 */ 2905 { (yyval.expr) = script_exp_binary_lshift((yyvsp[-2].expr), (yyvsp[0].expr)); } 2906 #line 2907 "yyscript.c" /* yacc.c:1646 */ 2907 break; 2908 2909 case 164: 2910 #line 893 "yyscript.y" /* yacc.c:1646 */ 2911 { (yyval.expr) = script_exp_binary_rshift((yyvsp[-2].expr), (yyvsp[0].expr)); } 2912 #line 2913 "yyscript.c" /* yacc.c:1646 */ 2913 break; 2914 2915 case 165: 2916 #line 895 "yyscript.y" /* yacc.c:1646 */ 2917 { (yyval.expr) = script_exp_binary_eq((yyvsp[-2].expr), (yyvsp[0].expr)); } 2918 #line 2919 "yyscript.c" /* yacc.c:1646 */ 2919 break; 2920 2921 case 166: 2922 #line 897 "yyscript.y" /* yacc.c:1646 */ 2923 { (yyval.expr) = script_exp_binary_ne((yyvsp[-2].expr), (yyvsp[0].expr)); } 2924 #line 2925 "yyscript.c" /* yacc.c:1646 */ 2925 break; 2926 2927 case 167: 2928 #line 899 "yyscript.y" /* yacc.c:1646 */ 2929 { (yyval.expr) = script_exp_binary_le((yyvsp[-2].expr), (yyvsp[0].expr)); } 2930 #line 2931 "yyscript.c" /* yacc.c:1646 */ 2931 break; 2932 2933 case 168: 2934 #line 901 "yyscript.y" /* yacc.c:1646 */ 2935 { (yyval.expr) = script_exp_binary_ge((yyvsp[-2].expr), (yyvsp[0].expr)); } 2936 #line 2937 "yyscript.c" /* yacc.c:1646 */ 2937 break; 2938 2939 case 169: 2940 #line 903 "yyscript.y" /* yacc.c:1646 */ 2941 { (yyval.expr) = script_exp_binary_lt((yyvsp[-2].expr), (yyvsp[0].expr)); } 2942 #line 2943 "yyscript.c" /* yacc.c:1646 */ 2943 break; 2944 2945 case 170: 2946 #line 905 "yyscript.y" /* yacc.c:1646 */ 2947 { (yyval.expr) = script_exp_binary_gt((yyvsp[-2].expr), (yyvsp[0].expr)); } 2948 #line 2949 "yyscript.c" /* yacc.c:1646 */ 2949 break; 2950 2951 case 171: 2952 #line 907 "yyscript.y" /* yacc.c:1646 */ 2953 { (yyval.expr) = script_exp_binary_bitwise_and((yyvsp[-2].expr), (yyvsp[0].expr)); } 2954 #line 2955 "yyscript.c" /* yacc.c:1646 */ 2955 break; 2956 2957 case 172: 2958 #line 909 "yyscript.y" /* yacc.c:1646 */ 2959 { (yyval.expr) = script_exp_binary_bitwise_xor((yyvsp[-2].expr), (yyvsp[0].expr)); } 2960 #line 2961 "yyscript.c" /* yacc.c:1646 */ 2961 break; 2962 2963 case 173: 2964 #line 911 "yyscript.y" /* yacc.c:1646 */ 2965 { (yyval.expr) = script_exp_binary_bitwise_or((yyvsp[-2].expr), (yyvsp[0].expr)); } 2966 #line 2967 "yyscript.c" /* yacc.c:1646 */ 2967 break; 2968 2969 case 174: 2970 #line 913 "yyscript.y" /* yacc.c:1646 */ 2971 { (yyval.expr) = script_exp_binary_logical_and((yyvsp[-2].expr), (yyvsp[0].expr)); } 2972 #line 2973 "yyscript.c" /* yacc.c:1646 */ 2973 break; 2974 2975 case 175: 2976 #line 915 "yyscript.y" /* yacc.c:1646 */ 2977 { (yyval.expr) = script_exp_binary_logical_or((yyvsp[-2].expr), (yyvsp[0].expr)); } 2978 #line 2979 "yyscript.c" /* yacc.c:1646 */ 2979 break; 2980 2981 case 176: 2982 #line 917 "yyscript.y" /* yacc.c:1646 */ 2983 { (yyval.expr) = script_exp_trinary_cond((yyvsp[-4].expr), (yyvsp[-2].expr), (yyvsp[0].expr)); } 2984 #line 2985 "yyscript.c" /* yacc.c:1646 */ 2985 break; 2986 2987 case 177: 2988 #line 919 "yyscript.y" /* yacc.c:1646 */ 2989 { (yyval.expr) = script_exp_integer((yyvsp[0].integer)); } 2990 #line 2991 "yyscript.c" /* yacc.c:1646 */ 2991 break; 2992 2993 case 178: 2994 #line 921 "yyscript.y" /* yacc.c:1646 */ 2995 { (yyval.expr) = script_symbol(closure, (yyvsp[0].string).value, (yyvsp[0].string).length); } 2996 #line 2997 "yyscript.c" /* yacc.c:1646 */ 2997 break; 2998 2999 case 179: 3000 #line 923 "yyscript.y" /* yacc.c:1646 */ 3001 { (yyval.expr) = script_exp_function_max((yyvsp[-3].expr), (yyvsp[-1].expr)); } 3002 #line 3003 "yyscript.c" /* yacc.c:1646 */ 3003 break; 3004 3005 case 180: 3006 #line 925 "yyscript.y" /* yacc.c:1646 */ 3007 { (yyval.expr) = script_exp_function_min((yyvsp[-3].expr), (yyvsp[-1].expr)); } 3008 #line 3009 "yyscript.c" /* yacc.c:1646 */ 3009 break; 3010 3011 case 181: 3012 #line 927 "yyscript.y" /* yacc.c:1646 */ 3013 { (yyval.expr) = script_exp_function_defined((yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3014 #line 3015 "yyscript.c" /* yacc.c:1646 */ 3015 break; 3016 3017 case 182: 3018 #line 929 "yyscript.y" /* yacc.c:1646 */ 3019 { (yyval.expr) = script_exp_function_sizeof_headers(); } 3020 #line 3021 "yyscript.c" /* yacc.c:1646 */ 3021 break; 3022 3023 case 183: 3024 #line 931 "yyscript.y" /* yacc.c:1646 */ 3025 { (yyval.expr) = script_exp_function_alignof((yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3026 #line 3027 "yyscript.c" /* yacc.c:1646 */ 3027 break; 3028 3029 case 184: 3030 #line 933 "yyscript.y" /* yacc.c:1646 */ 3031 { (yyval.expr) = script_exp_function_sizeof((yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3032 #line 3033 "yyscript.c" /* yacc.c:1646 */ 3033 break; 3034 3035 case 185: 3036 #line 935 "yyscript.y" /* yacc.c:1646 */ 3037 { (yyval.expr) = script_exp_function_addr((yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3038 #line 3039 "yyscript.c" /* yacc.c:1646 */ 3039 break; 3040 3041 case 186: 3042 #line 937 "yyscript.y" /* yacc.c:1646 */ 3043 { (yyval.expr) = script_exp_function_loadaddr((yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3044 #line 3045 "yyscript.c" /* yacc.c:1646 */ 3045 break; 3046 3047 case 187: 3048 #line 939 "yyscript.y" /* yacc.c:1646 */ 3049 { (yyval.expr) = script_exp_function_origin(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3050 #line 3051 "yyscript.c" /* yacc.c:1646 */ 3051 break; 3052 3053 case 188: 3054 #line 941 "yyscript.y" /* yacc.c:1646 */ 3055 { (yyval.expr) = script_exp_function_length(closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3056 #line 3057 "yyscript.c" /* yacc.c:1646 */ 3057 break; 3058 3059 case 189: 3060 #line 943 "yyscript.y" /* yacc.c:1646 */ 3061 { (yyval.expr) = script_exp_function_constant((yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3062 #line 3063 "yyscript.c" /* yacc.c:1646 */ 3063 break; 3064 3065 case 190: 3066 #line 945 "yyscript.y" /* yacc.c:1646 */ 3067 { (yyval.expr) = script_exp_function_absolute((yyvsp[-1].expr)); } 3068 #line 3069 "yyscript.c" /* yacc.c:1646 */ 3069 break; 3070 3071 case 191: 3072 #line 947 "yyscript.y" /* yacc.c:1646 */ 3073 { (yyval.expr) = script_exp_function_align(script_exp_string(".", 1), (yyvsp[-1].expr)); } 3074 #line 3075 "yyscript.c" /* yacc.c:1646 */ 3075 break; 3076 3077 case 192: 3078 #line 949 "yyscript.y" /* yacc.c:1646 */ 3079 { (yyval.expr) = script_exp_function_align((yyvsp[-3].expr), (yyvsp[-1].expr)); } 3080 #line 3081 "yyscript.c" /* yacc.c:1646 */ 3081 break; 3082 3083 case 193: 3084 #line 951 "yyscript.y" /* yacc.c:1646 */ 3085 { (yyval.expr) = script_exp_function_align(script_exp_string(".", 1), (yyvsp[-1].expr)); } 3086 #line 3087 "yyscript.c" /* yacc.c:1646 */ 3087 break; 3088 3089 case 194: 3090 #line 953 "yyscript.y" /* yacc.c:1646 */ 3091 { 3092 script_data_segment_align(closure); 3093 (yyval.expr) = script_exp_function_data_segment_align((yyvsp[-3].expr), (yyvsp[-1].expr)); 3094 } 3095 #line 3096 "yyscript.c" /* yacc.c:1646 */ 3096 break; 3097 3098 case 195: 3099 #line 958 "yyscript.y" /* yacc.c:1646 */ 3100 { 3101 script_data_segment_relro_end(closure); 3102 (yyval.expr) = script_exp_function_data_segment_relro_end((yyvsp[-3].expr), (yyvsp[-1].expr)); 3103 } 3104 #line 3105 "yyscript.c" /* yacc.c:1646 */ 3105 break; 3106 3107 case 196: 3108 #line 963 "yyscript.y" /* yacc.c:1646 */ 3109 { (yyval.expr) = script_exp_function_data_segment_end((yyvsp[-1].expr)); } 3110 #line 3111 "yyscript.c" /* yacc.c:1646 */ 3111 break; 3112 3113 case 197: 3114 #line 965 "yyscript.y" /* yacc.c:1646 */ 3115 { 3116 (yyval.expr) = script_exp_function_segment_start((yyvsp[-3].string).value, (yyvsp[-3].string).length, (yyvsp[-1].expr)); 3117 /* We need to take note of any SEGMENT_START expressions 3118 because they change the behaviour of -Ttext, -Tdata and 3119 -Tbss options. */ 3120 script_saw_segment_start_expression(closure); 3121 } 3122 #line 3123 "yyscript.c" /* yacc.c:1646 */ 3123 break; 3124 3125 case 198: 3126 #line 973 "yyscript.y" /* yacc.c:1646 */ 3127 { (yyval.expr) = script_exp_function_assert((yyvsp[-3].expr), (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3128 #line 3129 "yyscript.c" /* yacc.c:1646 */ 3129 break; 3130 3131 case 199: 3132 #line 979 "yyscript.y" /* yacc.c:1646 */ 3133 { script_set_symbol(closure, (yyvsp[-2].string).value, (yyvsp[-2].string).length, (yyvsp[0].expr), 0, 0); } 3134 #line 3135 "yyscript.c" /* yacc.c:1646 */ 3135 break; 3136 3137 case 203: 3138 #line 997 "yyscript.y" /* yacc.c:1646 */ 3139 { script_new_vers_node (closure, NULL, (yyvsp[-3].versyms)); } 3140 #line 3141 "yyscript.c" /* yacc.c:1646 */ 3141 break; 3142 3143 case 207: 3144 #line 1012 "yyscript.y" /* yacc.c:1646 */ 3145 { 3146 script_register_vers_node (closure, NULL, 0, (yyvsp[-2].versnode), NULL); 3147 } 3148 #line 3149 "yyscript.c" /* yacc.c:1646 */ 3149 break; 3150 3151 case 208: 3152 #line 1016 "yyscript.y" /* yacc.c:1646 */ 3153 { 3154 script_register_vers_node (closure, (yyvsp[-4].string).value, (yyvsp[-4].string).length, (yyvsp[-2].versnode), 3155 NULL); 3156 } 3157 #line 3158 "yyscript.c" /* yacc.c:1646 */ 3158 break; 3159 3160 case 209: 3161 #line 1021 "yyscript.y" /* yacc.c:1646 */ 3162 { 3163 script_register_vers_node (closure, (yyvsp[-5].string).value, (yyvsp[-5].string).length, (yyvsp[-3].versnode), (yyvsp[-1].deplist)); 3164 } 3165 #line 3166 "yyscript.c" /* yacc.c:1646 */ 3166 break; 3167 3168 case 210: 3169 #line 1028 "yyscript.y" /* yacc.c:1646 */ 3170 { 3171 (yyval.deplist) = script_add_vers_depend (closure, NULL, (yyvsp[0].string).value, (yyvsp[0].string).length); 3172 } 3173 #line 3174 "yyscript.c" /* yacc.c:1646 */ 3174 break; 3175 3176 case 211: 3177 #line 1032 "yyscript.y" /* yacc.c:1646 */ 3178 { 3179 (yyval.deplist) = script_add_vers_depend (closure, (yyvsp[-1].deplist), (yyvsp[0].string).value, (yyvsp[0].string).length); 3180 } 3181 #line 3182 "yyscript.c" /* yacc.c:1646 */ 3182 break; 3183 3184 case 212: 3185 #line 1039 "yyscript.y" /* yacc.c:1646 */ 3186 { (yyval.versnode) = script_new_vers_node (closure, NULL, NULL); } 3187 #line 3188 "yyscript.c" /* yacc.c:1646 */ 3188 break; 3189 3190 case 213: 3191 #line 1041 "yyscript.y" /* yacc.c:1646 */ 3192 { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[-1].versyms), NULL); } 3193 #line 3194 "yyscript.c" /* yacc.c:1646 */ 3194 break; 3195 3196 case 214: 3197 #line 1043 "yyscript.y" /* yacc.c:1646 */ 3198 { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[-1].versyms), NULL); } 3199 #line 3200 "yyscript.c" /* yacc.c:1646 */ 3200 break; 3201 3202 case 215: 3203 #line 1045 "yyscript.y" /* yacc.c:1646 */ 3204 { (yyval.versnode) = script_new_vers_node (closure, NULL, (yyvsp[-1].versyms)); } 3205 #line 3206 "yyscript.c" /* yacc.c:1646 */ 3206 break; 3207 3208 case 216: 3209 #line 1047 "yyscript.y" /* yacc.c:1646 */ 3210 { (yyval.versnode) = script_new_vers_node (closure, (yyvsp[-5].versyms), (yyvsp[-1].versyms)); } 3211 #line 3212 "yyscript.c" /* yacc.c:1646 */ 3212 break; 3213 3214 case 217: 3215 #line 1056 "yyscript.y" /* yacc.c:1646 */ 3216 { 3217 (yyval.versyms) = script_new_vers_pattern (closure, NULL, (yyvsp[0].string).value, 3218 (yyvsp[0].string).length, 0); 3219 } 3220 #line 3221 "yyscript.c" /* yacc.c:1646 */ 3221 break; 3222 3223 case 218: 3224 #line 1061 "yyscript.y" /* yacc.c:1646 */ 3225 { 3226 (yyval.versyms) = script_new_vers_pattern (closure, NULL, (yyvsp[0].string).value, 3227 (yyvsp[0].string).length, 1); 3228 } 3229 #line 3230 "yyscript.c" /* yacc.c:1646 */ 3230 break; 3231 3232 case 219: 3233 #line 1066 "yyscript.y" /* yacc.c:1646 */ 3234 { 3235 (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[-2].versyms), (yyvsp[0].string).value, 3236 (yyvsp[0].string).length, 0); 3237 } 3238 #line 3239 "yyscript.c" /* yacc.c:1646 */ 3239 break; 3240 3241 case 220: 3242 #line 1071 "yyscript.y" /* yacc.c:1646 */ 3243 { 3244 (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[-2].versyms), (yyvsp[0].string).value, 3245 (yyvsp[0].string).length, 1); 3246 } 3247 #line 3248 "yyscript.c" /* yacc.c:1646 */ 3248 break; 3249 3250 case 221: 3251 #line 1077 "yyscript.y" /* yacc.c:1646 */ 3252 { version_script_push_lang (closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3253 #line 3254 "yyscript.c" /* yacc.c:1646 */ 3254 break; 3255 3256 case 222: 3257 #line 1079 "yyscript.y" /* yacc.c:1646 */ 3258 { 3259 (yyval.versyms) = (yyvsp[-2].versyms); 3260 version_script_pop_lang(closure); 3261 } 3262 #line 3263 "yyscript.c" /* yacc.c:1646 */ 3263 break; 3264 3265 case 223: 3266 #line 1087 "yyscript.y" /* yacc.c:1646 */ 3267 { version_script_push_lang (closure, (yyvsp[-1].string).value, (yyvsp[-1].string).length); } 3268 #line 3269 "yyscript.c" /* yacc.c:1646 */ 3269 break; 3270 3271 case 224: 3272 #line 1089 "yyscript.y" /* yacc.c:1646 */ 3273 { 3274 (yyval.versyms) = script_merge_expressions ((yyvsp[-8].versyms), (yyvsp[-2].versyms)); 3275 version_script_pop_lang(closure); 3276 } 3277 #line 3278 "yyscript.c" /* yacc.c:1646 */ 3278 break; 3279 3280 case 225: 3281 #line 1094 "yyscript.y" /* yacc.c:1646 */ 3282 { 3283 (yyval.versyms) = script_new_vers_pattern (closure, NULL, "extern", 3284 sizeof("extern") - 1, 1); 3285 } 3286 #line 3287 "yyscript.c" /* yacc.c:1646 */ 3287 break; 3288 3289 case 226: 3290 #line 1099 "yyscript.y" /* yacc.c:1646 */ 3291 { 3292 (yyval.versyms) = script_new_vers_pattern (closure, (yyvsp[-2].versyms), "extern", 3293 sizeof("extern") - 1, 1); 3294 } 3295 #line 3296 "yyscript.c" /* yacc.c:1646 */ 3296 break; 3297 3298 case 227: 3299 #line 1109 "yyscript.y" /* yacc.c:1646 */ 3300 { (yyval.string) = (yyvsp[0].string); } 3301 #line 3302 "yyscript.c" /* yacc.c:1646 */ 3302 break; 3303 3304 case 228: 3305 #line 1111 "yyscript.y" /* yacc.c:1646 */ 3306 { (yyval.string) = (yyvsp[0].string); } 3307 #line 3308 "yyscript.c" /* yacc.c:1646 */ 3308 break; 3309 3310 3311 #line 3312 "yyscript.c" /* yacc.c:1646 */ 3312 default: break; 3313 } 3314 /* User semantic actions sometimes alter yychar, and that requires 3315 that yytoken be updated with the new translation. We take the 3316 approach of translating immediately before every use of yytoken. 3317 One alternative is translating here after every semantic action, 3318 but that translation would be missed if the semantic action invokes 3319 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 3320 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 3321 incorrect destructor might then be invoked immediately. In the 3322 case of YYERROR or YYBACKUP, subsequent parser actions might lead 3323 to an incorrect destructor call or verbose syntax error message 3324 before the lookahead is translated. */ 3325 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 3326 3327 YYPOPSTACK (yylen); 3328 yylen = 0; 3329 YY_STACK_PRINT (yyss, yyssp); 3330 3331 *++yyvsp = yyval; 3332 3333 /* Now 'shift' the result of the reduction. Determine what state 3334 that goes to, based on the state we popped back to and the rule 3335 number reduced by. */ 3336 3337 yyn = yyr1[yyn]; 3338 3339 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 3340 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 3341 yystate = yytable[yystate]; 3342 else 3343 yystate = yydefgoto[yyn - YYNTOKENS]; 3344 3345 goto yynewstate; 3346 3347 3348 /*--------------------------------------. 3349 | yyerrlab -- here on detecting error. | 3350 `--------------------------------------*/ 3351 yyerrlab: 3352 /* Make sure we have latest lookahead translation. See comments at 3353 user semantic actions for why this is necessary. */ 3354 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 3355 3356 /* If not already recovering from an error, report this error. */ 3357 if (!yyerrstatus) 3358 { 3359 ++yynerrs; 3360 #if ! YYERROR_VERBOSE 3361 yyerror (closure, YY_("syntax error")); 3362 #else 3363 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 3364 yyssp, yytoken) 3365 { 3366 char const *yymsgp = YY_("syntax error"); 3367 int yysyntax_error_status; 3368 yysyntax_error_status = YYSYNTAX_ERROR; 3369 if (yysyntax_error_status == 0) 3370 yymsgp = yymsg; 3371 else if (yysyntax_error_status == 1) 3372 { 3373 if (yymsg != yymsgbuf) 3374 YYSTACK_FREE (yymsg); 3375 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 3376 if (!yymsg) 3377 { 3378 yymsg = yymsgbuf; 3379 yymsg_alloc = sizeof yymsgbuf; 3380 yysyntax_error_status = 2; 3381 } 3382 else 3383 { 3384 yysyntax_error_status = YYSYNTAX_ERROR; 3385 yymsgp = yymsg; 3386 } 3387 } 3388 yyerror (closure, yymsgp); 3389 if (yysyntax_error_status == 2) 3390 goto yyexhaustedlab; 3391 } 3392 # undef YYSYNTAX_ERROR 3393 #endif 3394 } 3395 3396 3397 3398 if (yyerrstatus == 3) 3399 { 3400 /* If just tried and failed to reuse lookahead token after an 3401 error, discard it. */ 3402 3403 if (yychar <= YYEOF) 3404 { 3405 /* Return failure if at end of input. */ 3406 if (yychar == YYEOF) 3407 YYABORT; 3408 } 3409 else 3410 { 3411 yydestruct ("Error: discarding", 3412 yytoken, &yylval, closure); 3413 yychar = YYEMPTY; 3414 } 3415 } 3416 3417 /* Else will try to reuse lookahead token after shifting the error 3418 token. */ 3419 goto yyerrlab1; 3420 3421 3422 /*---------------------------------------------------. 3423 | yyerrorlab -- error raised explicitly by YYERROR. | 3424 `---------------------------------------------------*/ 3425 yyerrorlab: 3426 3427 /* Pacify compilers like GCC when the user code never invokes 3428 YYERROR and the label yyerrorlab therefore never appears in user 3429 code. */ 3430 if (/*CONSTCOND*/ 0) 3431 goto yyerrorlab; 3432 3433 /* Do not reclaim the symbols of the rule whose action triggered 3434 this YYERROR. */ 3435 YYPOPSTACK (yylen); 3436 yylen = 0; 3437 YY_STACK_PRINT (yyss, yyssp); 3438 yystate = *yyssp; 3439 goto yyerrlab1; 3440 3441 3442 /*-------------------------------------------------------------. 3443 | yyerrlab1 -- common code for both syntax error and YYERROR. | 3444 `-------------------------------------------------------------*/ 3445 yyerrlab1: 3446 yyerrstatus = 3; /* Each real token shifted decrements this. */ 3447 3448 for (;;) 3449 { 3450 yyn = yypact[yystate]; 3451 if (!yypact_value_is_default (yyn)) 3452 { 3453 yyn += YYTERROR; 3454 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 3455 { 3456 yyn = yytable[yyn]; 3457 if (0 < yyn) 3458 break; 3459 } 3460 } 3461 3462 /* Pop the current state because it cannot handle the error token. */ 3463 if (yyssp == yyss) 3464 YYABORT; 3465 3466 3467 yydestruct ("Error: popping", 3468 yystos[yystate], yyvsp, closure); 3469 YYPOPSTACK (1); 3470 yystate = *yyssp; 3471 YY_STACK_PRINT (yyss, yyssp); 3472 } 3473 3474 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 3475 *++yyvsp = yylval; 3476 YY_IGNORE_MAYBE_UNINITIALIZED_END 3477 3478 3479 /* Shift the error token. */ 3480 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 3481 3482 yystate = yyn; 3483 goto yynewstate; 3484 3485 3486 /*-------------------------------------. 3487 | yyacceptlab -- YYACCEPT comes here. | 3488 `-------------------------------------*/ 3489 yyacceptlab: 3490 yyresult = 0; 3491 goto yyreturn; 3492 3493 /*-----------------------------------. 3494 | yyabortlab -- YYABORT comes here. | 3495 `-----------------------------------*/ 3496 yyabortlab: 3497 yyresult = 1; 3498 goto yyreturn; 3499 3500 #if !defined yyoverflow || YYERROR_VERBOSE 3501 /*-------------------------------------------------. 3502 | yyexhaustedlab -- memory exhaustion comes here. | 3503 `-------------------------------------------------*/ 3504 yyexhaustedlab: 3505 yyerror (closure, YY_("memory exhausted")); 3506 yyresult = 2; 3507 /* Fall through. */ 3508 #endif 3509 3510 yyreturn: 3511 if (yychar != YYEMPTY) 3512 { 3513 /* Make sure we have latest lookahead translation. See comments at 3514 user semantic actions for why this is necessary. */ 3515 yytoken = YYTRANSLATE (yychar); 3516 yydestruct ("Cleanup: discarding lookahead", 3517 yytoken, &yylval, closure); 3518 } 3519 /* Do not reclaim the symbols of the rule whose action triggered 3520 this YYABORT or YYACCEPT. */ 3521 YYPOPSTACK (yylen); 3522 YY_STACK_PRINT (yyss, yyssp); 3523 while (yyssp != yyss) 3524 { 3525 yydestruct ("Cleanup: popping", 3526 yystos[*yyssp], yyvsp, closure); 3527 YYPOPSTACK (1); 3528 } 3529 #ifndef yyoverflow 3530 if (yyss != yyssa) 3531 YYSTACK_FREE (yyss); 3532 #endif 3533 #if YYERROR_VERBOSE 3534 if (yymsg != yymsgbuf) 3535 YYSTACK_FREE (yymsg); 3536 #endif 3537 return yyresult; 3538 } 3539 #line 1133 "yyscript.y" /* yacc.c:1906 */ 3540 3541