1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2, or (at your option) 11 any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 22 23 /* As a special exception, you may create a larger work that contains 24 part or all of the Bison parser skeleton and distribute that work 25 under terms of your choice, so long as that work isn't itself a 26 parser generator using the skeleton or a modified version thereof 27 as a parser skeleton. Alternatively, if you modify or redistribute 28 the parser skeleton itself, you may (at your option) remove this 29 special exception, which will cause the skeleton and the resulting 30 Bison output files to be licensed under the GNU General Public 31 License without this special exception. 32 33 This special exception was added by the Free Software Foundation in 34 version 2.2 of Bison. */ 35 36 /* C LALR(1) parser skeleton written by Richard Stallman, by 37 simplifying the original so-called "semantic" parser. */ 38 39 /* All symbols defined below should begin with yy or YY, to avoid 40 infringing on user name space. This should be done even for local 41 variables, as they might otherwise be expanded by user macros. 42 There are some unavoidable exceptions within include files to 43 define necessary library symbols; they are noted "INFRINGES ON 44 USER NAME SPACE" below. */ 45 46 /* Identify Bison output. */ 47 #define YYBISON 1 48 49 /* Bison version. */ 50 #define YYBISON_VERSION "2.3" 51 52 /* Skeleton name. */ 53 #define YYSKELETON_NAME "yacc.c" 54 55 /* Pure parsers. */ 56 #define YYPURE 0 57 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 60 61 62 63 /* Tokens. */ 64 #ifndef YYTOKENTYPE 65 # define YYTOKENTYPE 66 /* Put the tokens into the symbol table, so that GDB and other debuggers 67 know about them. */ 68 enum yytokentype { 69 NAME = 258, 70 LIBRARY = 259, 71 DESCRIPTION = 260, 72 STACKSIZE = 261, 73 HEAPSIZE = 262, 74 CODE = 263, 75 DATA = 264, 76 SECTIONS = 265, 77 EXPORTS = 266, 78 IMPORTS = 267, 79 VERSIONK = 268, 80 BASE = 269, 81 CONSTANT = 270, 82 READ = 271, 83 WRITE = 272, 84 EXECUTE = 273, 85 SHARED = 274, 86 NONSHARED = 275, 87 NONAME = 276, 88 PRIVATE = 277, 89 SINGLE = 278, 90 MULTIPLE = 279, 91 INITINSTANCE = 280, 92 INITGLOBAL = 281, 93 TERMINSTANCE = 282, 94 TERMGLOBAL = 283, 95 EQUAL = 284, 96 ID = 285, 97 NUMBER = 286 98 }; 99 #endif 100 /* Tokens. */ 101 #define NAME 258 102 #define LIBRARY 259 103 #define DESCRIPTION 260 104 #define STACKSIZE 261 105 #define HEAPSIZE 262 106 #define CODE 263 107 #define DATA 264 108 #define SECTIONS 265 109 #define EXPORTS 266 110 #define IMPORTS 267 111 #define VERSIONK 268 112 #define BASE 269 113 #define CONSTANT 270 114 #define READ 271 115 #define WRITE 272 116 #define EXECUTE 273 117 #define SHARED 274 118 #define NONSHARED 275 119 #define NONAME 276 120 #define PRIVATE 277 121 #define SINGLE 278 122 #define MULTIPLE 279 123 #define INITINSTANCE 280 124 #define INITGLOBAL 281 125 #define TERMINSTANCE 282 126 #define TERMGLOBAL 283 127 #define EQUAL 284 128 #define ID 285 129 #define NUMBER 286 130 131 132 133 134 /* Copy the first part of user declarations. */ 135 #line 1 "defparse.y" 136 /* defparse.y - parser for .def files */ 137 138 /* Copyright (C) 1995-2016 Free Software Foundation, Inc. 139 140 This file is part of GNU Binutils. 141 142 This program is free software; you can redistribute it and/or modify 143 it under the terms of the GNU General Public License as published by 144 the Free Software Foundation; either version 3 of the License, or 145 (at your option) any later version. 146 147 This program is distributed in the hope that it will be useful, 148 but WITHOUT ANY WARRANTY; without even the implied warranty of 149 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 150 GNU General Public License for more details. 151 152 You should have received a copy of the GNU General Public License 153 along with this program; if not, write to the Free Software 154 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 155 MA 02110-1301, USA. */ 156 157 #include "sysdep.h" 158 #include "bfd.h" 159 #include "libiberty.h" 160 #include "dlltool.h" 161 162 163 /* Enabling traces. */ 164 #ifndef YYDEBUG 165 # define YYDEBUG 0 166 #endif 167 168 /* Enabling verbose error messages. */ 169 #ifdef YYERROR_VERBOSE 170 # undef YYERROR_VERBOSE 171 # define YYERROR_VERBOSE 1 172 #else 173 # define YYERROR_VERBOSE 0 174 #endif 175 176 /* Enabling the token table. */ 177 #ifndef YYTOKEN_TABLE 178 # define YYTOKEN_TABLE 0 179 #endif 180 181 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 182 typedef union YYSTYPE 183 #line 28 "defparse.y" 184 { 185 char *id; 186 const char *id_const; 187 int number; 188 } 189 /* Line 193 of yacc.c. */ 190 #line 191 "defparse.c" 191 YYSTYPE; 192 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 193 # define YYSTYPE_IS_DECLARED 1 194 # define YYSTYPE_IS_TRIVIAL 1 195 #endif 196 197 198 199 /* Copy the second part of user declarations. */ 200 201 202 /* Line 216 of yacc.c. */ 203 #line 204 "defparse.c" 204 205 #ifdef short 206 # undef short 207 #endif 208 209 #ifdef YYTYPE_UINT8 210 typedef YYTYPE_UINT8 yytype_uint8; 211 #else 212 typedef unsigned char yytype_uint8; 213 #endif 214 215 #ifdef YYTYPE_INT8 216 typedef YYTYPE_INT8 yytype_int8; 217 #elif (defined __STDC__ || defined __C99__FUNC__ \ 218 || defined __cplusplus || defined _MSC_VER) 219 typedef signed char yytype_int8; 220 #else 221 typedef short int yytype_int8; 222 #endif 223 224 #ifdef YYTYPE_UINT16 225 typedef YYTYPE_UINT16 yytype_uint16; 226 #else 227 typedef unsigned short int yytype_uint16; 228 #endif 229 230 #ifdef YYTYPE_INT16 231 typedef YYTYPE_INT16 yytype_int16; 232 #else 233 typedef short int yytype_int16; 234 #endif 235 236 #ifndef YYSIZE_T 237 # ifdef __SIZE_TYPE__ 238 # define YYSIZE_T __SIZE_TYPE__ 239 # elif defined size_t 240 # define YYSIZE_T size_t 241 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 242 || defined __cplusplus || defined _MSC_VER) 243 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 244 # define YYSIZE_T size_t 245 # else 246 # define YYSIZE_T unsigned int 247 # endif 248 #endif 249 250 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 251 252 #ifndef YY_ 253 # if defined YYENABLE_NLS && YYENABLE_NLS 254 # if ENABLE_NLS 255 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 256 # define YY_(msgid) dgettext ("bison-runtime", msgid) 257 # endif 258 # endif 259 # ifndef YY_ 260 # define YY_(msgid) msgid 261 # endif 262 #endif 263 264 /* Suppress unused-variable warnings by "using" E. */ 265 #if ! defined lint || defined __GNUC__ 266 # define YYUSE(e) ((void) (e)) 267 #else 268 # define YYUSE(e) /* empty */ 269 #endif 270 271 /* Identity function, used to suppress warnings about constant conditions. */ 272 #ifndef lint 273 # define YYID(n) (n) 274 #else 275 #if (defined __STDC__ || defined __C99__FUNC__ \ 276 || defined __cplusplus || defined _MSC_VER) 277 static int 278 YYID (int i) 279 #else 280 static int 281 YYID (i) 282 int i; 283 #endif 284 { 285 return i; 286 } 287 #endif 288 289 #if ! defined yyoverflow || YYERROR_VERBOSE 290 291 /* The parser invokes alloca or malloc; define the necessary symbols. */ 292 293 # ifdef YYSTACK_USE_ALLOCA 294 # if YYSTACK_USE_ALLOCA 295 # ifdef __GNUC__ 296 # define YYSTACK_ALLOC __builtin_alloca 297 # elif defined __BUILTIN_VA_ARG_INCR 298 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 299 # elif defined _AIX 300 # define YYSTACK_ALLOC __alloca 301 # elif defined _MSC_VER 302 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 303 # define alloca _alloca 304 # else 305 # define YYSTACK_ALLOC alloca 306 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 307 || defined __cplusplus || defined _MSC_VER) 308 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 309 # ifndef _STDLIB_H 310 # define _STDLIB_H 1 311 # endif 312 # endif 313 # endif 314 # endif 315 # endif 316 317 # ifdef YYSTACK_ALLOC 318 /* Pacify GCC's `empty if-body' warning. */ 319 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 320 # ifndef YYSTACK_ALLOC_MAXIMUM 321 /* The OS might guarantee only one guard page at the bottom of the stack, 322 and a page size can be as small as 4096 bytes. So we cannot safely 323 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 324 to allow for a few compiler-allocated temporary stack slots. */ 325 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 326 # endif 327 # else 328 # define YYSTACK_ALLOC YYMALLOC 329 # define YYSTACK_FREE YYFREE 330 # ifndef YYSTACK_ALLOC_MAXIMUM 331 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 332 # endif 333 # if (defined __cplusplus && ! defined _STDLIB_H \ 334 && ! ((defined YYMALLOC || defined malloc) \ 335 && (defined YYFREE || defined free))) 336 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 337 # ifndef _STDLIB_H 338 # define _STDLIB_H 1 339 # endif 340 # endif 341 # ifndef YYMALLOC 342 # define YYMALLOC malloc 343 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 344 || defined __cplusplus || defined _MSC_VER) 345 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 346 # endif 347 # endif 348 # ifndef YYFREE 349 # define YYFREE free 350 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 351 || defined __cplusplus || defined _MSC_VER) 352 void free (void *); /* INFRINGES ON USER NAME SPACE */ 353 # endif 354 # endif 355 # endif 356 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 357 358 359 #if (! defined yyoverflow \ 360 && (! defined __cplusplus \ 361 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 362 363 /* A type that is properly aligned for any stack member. */ 364 union yyalloc 365 { 366 yytype_int16 yyss; 367 YYSTYPE yyvs; 368 }; 369 370 /* The size of the maximum gap between one aligned stack and the next. */ 371 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 372 373 /* The size of an array large to enough to hold all stacks, each with 374 N elements. */ 375 # define YYSTACK_BYTES(N) \ 376 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 377 + YYSTACK_GAP_MAXIMUM) 378 379 /* Copy COUNT objects from FROM to TO. The source and destination do 380 not overlap. */ 381 # ifndef YYCOPY 382 # if defined __GNUC__ && 1 < __GNUC__ 383 # define YYCOPY(To, From, Count) \ 384 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 385 # else 386 # define YYCOPY(To, From, Count) \ 387 do \ 388 { \ 389 YYSIZE_T yyi; \ 390 for (yyi = 0; yyi < (Count); yyi++) \ 391 (To)[yyi] = (From)[yyi]; \ 392 } \ 393 while (YYID (0)) 394 # endif 395 # endif 396 397 /* Relocate STACK from its old location to the new one. The 398 local variables YYSIZE and YYSTACKSIZE give the old and new number of 399 elements in the stack, and YYPTR gives the new location of the 400 stack. Advance YYPTR to a properly aligned location for the next 401 stack. */ 402 # define YYSTACK_RELOCATE(Stack) \ 403 do \ 404 { \ 405 YYSIZE_T yynewbytes; \ 406 YYCOPY (&yyptr->Stack, Stack, yysize); \ 407 Stack = &yyptr->Stack; \ 408 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 409 yyptr += yynewbytes / sizeof (*yyptr); \ 410 } \ 411 while (YYID (0)) 412 413 #endif 414 415 /* YYFINAL -- State number of the termination state. */ 416 #define YYFINAL 66 417 /* YYLAST -- Last index in YYTABLE. */ 418 #define YYLAST 141 419 420 /* YYNTOKENS -- Number of terminals. */ 421 #define YYNTOKENS 36 422 /* YYNNTS -- Number of nonterminals. */ 423 #define YYNNTS 26 424 /* YYNRULES -- Number of rules. */ 425 #define YYNRULES 98 426 /* YYNRULES -- Number of states. */ 427 #define YYNSTATES 139 428 429 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 430 #define YYUNDEFTOK 2 431 #define YYMAXUTOK 286 432 433 #define YYTRANSLATE(YYX) \ 434 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 435 436 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 437 static const yytype_uint8 yytranslate[] = 438 { 439 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 443 2, 2, 2, 2, 34, 2, 32, 2, 2, 2, 444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 445 2, 33, 2, 2, 35, 2, 2, 2, 2, 2, 446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 464 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 465 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 466 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 467 25, 26, 27, 28, 29, 30, 31 468 }; 469 470 #if YYDEBUG 471 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 472 YYRHS. */ 473 static const yytype_uint16 yyprhs[] = 474 { 475 0, 0, 3, 6, 8, 12, 17, 20, 23, 27, 476 31, 34, 37, 40, 43, 46, 51, 52, 55, 64, 477 67, 69, 78, 87, 94, 101, 108, 115, 120, 125, 478 128, 130, 133, 137, 139, 141, 142, 145, 146, 148, 479 150, 152, 154, 156, 158, 160, 162, 163, 165, 166, 480 168, 169, 171, 172, 174, 176, 178, 180, 182, 184, 481 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 482 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 483 227, 230, 234, 238, 240, 241, 244, 245, 248, 249, 484 252, 253, 257, 258, 259, 263, 265, 267, 269 485 }; 486 487 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 488 static const yytype_int8 yyrhs[] = 489 { 490 37, 0, -1, 37, 38, -1, 38, -1, 3, 55, 491 59, -1, 4, 55, 59, 60, -1, 11, 39, -1, 492 5, 30, -1, 6, 31, 47, -1, 7, 31, 47, 493 -1, 8, 45, -1, 9, 45, -1, 10, 43, -1, 494 12, 41, -1, 13, 31, -1, 13, 31, 32, 31, 495 -1, -1, 39, 40, -1, 30, 58, 56, 50, 49, 496 51, 52, 57, -1, 41, 42, -1, 42, -1, 30, 497 33, 30, 32, 30, 32, 30, 57, -1, 30, 33, 498 30, 32, 30, 32, 31, 57, -1, 30, 33, 30, 499 32, 30, 57, -1, 30, 33, 30, 32, 31, 57, 500 -1, 30, 32, 30, 32, 30, 57, -1, 30, 32, 501 30, 32, 31, 57, -1, 30, 32, 30, 57, -1, 502 30, 32, 31, 57, -1, 43, 44, -1, 44, -1, 503 30, 45, -1, 45, 46, 48, -1, 48, -1, 34, 504 -1, -1, 34, 31, -1, -1, 16, -1, 17, -1, 505 18, -1, 19, -1, 20, -1, 23, -1, 24, -1, 506 15, -1, -1, 21, -1, -1, 9, -1, -1, 22, 507 -1, -1, 3, -1, 5, -1, 6, -1, 7, -1, 508 8, -1, 9, -1, 10, -1, 11, -1, 12, -1, 509 13, -1, 14, -1, 15, -1, 21, -1, 22, -1, 510 16, -1, 17, -1, 18, -1, 19, -1, 20, -1, 511 23, -1, 24, -1, 25, -1, 26, -1, 27, -1, 512 28, -1, 30, -1, 32, 53, -1, 32, 54, -1, 513 53, 32, 54, -1, 30, 32, 54, -1, 54, -1, 514 -1, 35, 31, -1, -1, 29, 54, -1, -1, 33, 515 54, -1, -1, 14, 33, 31, -1, -1, -1, 60, 516 46, 61, -1, 25, -1, 26, -1, 27, -1, 28, 517 -1 518 }; 519 520 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 521 static const yytype_uint8 yyrline[] = 522 { 523 0, 48, 48, 49, 53, 54, 55, 56, 57, 58, 524 59, 60, 61, 62, 63, 64, 68, 70, 74, 79, 525 80, 84, 86, 88, 90, 92, 94, 96, 98, 103, 526 104, 108, 112, 113, 117, 118, 120, 121, 125, 126, 527 127, 128, 129, 130, 131, 135, 136, 140, 141, 145, 528 146, 150, 151, 154, 159, 160, 161, 162, 163, 164, 529 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 530 175, 176, 177, 178, 179, 180, 181, 182, 185, 186, 531 192, 198, 204, 211, 212, 216, 217, 221, 222, 226, 532 227, 230, 231, 234, 236, 240, 241, 242, 243 533 }; 534 #endif 535 536 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 537 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 538 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 539 static const char *const yytname[] = 540 { 541 "$end", "error", "$undefined", "NAME", "LIBRARY", "DESCRIPTION", 542 "STACKSIZE", "HEAPSIZE", "CODE", "DATA", "SECTIONS", "EXPORTS", 543 "IMPORTS", "VERSIONK", "BASE", "CONSTANT", "READ", "WRITE", "EXECUTE", 544 "SHARED", "NONSHARED", "NONAME", "PRIVATE", "SINGLE", "MULTIPLE", 545 "INITINSTANCE", "INITGLOBAL", "TERMINSTANCE", "TERMGLOBAL", "EQUAL", 546 "ID", "NUMBER", "'.'", "'='", "','", "'@'", "$accept", "start", 547 "command", "explist", "expline", "implist", "impline", "seclist", 548 "secline", "attr_list", "opt_comma", "opt_number", "attr", 549 "opt_CONSTANT", "opt_NONAME", "opt_DATA", "opt_PRIVATE", 550 "keyword_as_name", "opt_name2", "opt_name", "opt_ordinal", 551 "opt_import_name", "opt_equal_name", "opt_base", "option_list", "option", 0 552 }; 553 #endif 554 555 # ifdef YYPRINT 556 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 557 token YYLEX-NUM. */ 558 static const yytype_uint16 yytoknum[] = 559 { 560 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 561 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 562 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 563 285, 286, 46, 61, 44, 64 564 }; 565 # endif 566 567 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 568 static const yytype_uint8 yyr1[] = 569 { 570 0, 36, 37, 37, 38, 38, 38, 38, 38, 38, 571 38, 38, 38, 38, 38, 38, 39, 39, 40, 41, 572 41, 42, 42, 42, 42, 42, 42, 42, 42, 43, 573 43, 44, 45, 45, 46, 46, 47, 47, 48, 48, 574 48, 48, 48, 48, 48, 49, 49, 50, 50, 51, 575 51, 52, 52, 53, 53, 53, 53, 53, 53, 53, 576 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 577 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 578 54, 54, 54, 55, 55, 56, 56, 57, 57, 58, 579 58, 59, 59, 60, 60, 61, 61, 61, 61 580 }; 581 582 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 583 static const yytype_uint8 yyr2[] = 584 { 585 0, 2, 2, 1, 3, 4, 2, 2, 3, 3, 586 2, 2, 2, 2, 2, 4, 0, 2, 8, 2, 587 1, 8, 8, 6, 6, 6, 6, 4, 4, 2, 588 1, 2, 3, 1, 1, 0, 2, 0, 1, 1, 589 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 590 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 591 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 592 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 593 2, 3, 3, 1, 0, 2, 0, 2, 0, 2, 594 0, 3, 0, 0, 3, 1, 1, 1, 1 595 }; 596 597 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 598 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 599 means the default is an error. */ 600 static const yytype_uint8 yydefact[] = 601 { 602 0, 84, 84, 0, 0, 0, 0, 0, 0, 16, 603 0, 0, 0, 3, 53, 54, 55, 56, 57, 58, 604 59, 60, 61, 62, 63, 64, 67, 68, 69, 70, 605 71, 65, 66, 72, 73, 74, 75, 76, 77, 78, 606 0, 0, 83, 92, 92, 7, 37, 37, 38, 39, 607 40, 41, 42, 43, 44, 10, 33, 11, 0, 12, 608 30, 6, 0, 13, 20, 14, 1, 2, 0, 79, 609 80, 0, 0, 4, 93, 0, 8, 9, 34, 0, 610 31, 29, 90, 17, 0, 0, 19, 0, 82, 81, 611 0, 5, 36, 32, 0, 86, 88, 88, 0, 15, 612 91, 0, 89, 0, 48, 0, 0, 27, 28, 0, 613 95, 96, 97, 98, 94, 85, 47, 46, 87, 88, 614 88, 88, 88, 45, 50, 25, 26, 0, 23, 24, 615 49, 52, 88, 88, 51, 88, 21, 22, 18 616 }; 617 618 /* YYDEFGOTO[NTERM-NUM]. */ 619 static const yytype_int16 yydefgoto[] = 620 { 621 -1, 12, 13, 61, 83, 63, 64, 59, 60, 55, 622 79, 76, 56, 124, 117, 131, 135, 41, 42, 43, 623 104, 107, 95, 73, 91, 114 624 }; 625 626 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 627 STATE-NUM. */ 628 #define YYPACT_NINF -96 629 static const yytype_int8 yypact[] = 630 { 631 38, 61, 61, -22, -1, 8, 39, 39, -7, -96, 632 23, 59, 92, -96, -96, -96, -96, -96, -96, -96, 633 -96, -96, -96, -96, -96, -96, -96, -96, -96, -96, 634 -96, -96, -96, -96, -96, -96, -96, -96, -96, 62, 635 61, 79, -96, 96, 96, -96, 80, 80, -96, -96, 636 -96, -96, -96, -96, -96, -13, -96, -13, 39, -7, 637 -96, 82, 1, 23, -96, 81, -96, -96, 61, 79, 638 -96, 61, 83, -96, -96, 84, -96, -96, -96, 39, 639 -13, -96, 85, -96, 5, 87, -96, 88, -96, -96, 640 89, -12, -96, -96, 61, 86, -20, 93, 91, -96, 641 -96, -8, -96, 94, 103, 61, 30, -96, -96, 76, 642 -96, -96, -96, -96, -96, -96, -96, 111, -96, 93, 643 93, 0, 93, -96, 118, -96, -96, 78, -96, -96, 644 -96, 106, 93, 93, -96, 93, -96, -96, -96 645 }; 646 647 /* YYPGOTO[NTERM-NUM]. */ 648 static const yytype_int16 yypgoto[] = 649 { 650 -96, -96, 117, -96, -96, -96, 67, -96, 72, -6, 651 41, 90, 54, -96, -96, -96, -96, 95, -40, 132, 652 -96, -95, -96, 97, -96, -96 653 }; 654 655 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 656 positive, shift that token. If negative, reduce the rule which 657 number is the opposite. If zero, do what YYDEFACT says. 658 If YYTABLE_NINF, syntax error. */ 659 #define YYTABLE_NINF -36 660 static const yytype_int16 yytable[] = 661 { 662 70, 57, 108, -35, -35, -35, -35, -35, 45, 105, 663 -35, -35, 106, -35, -35, -35, -35, 110, 111, 112, 664 113, 78, 78, 58, 125, 126, 128, 129, 88, 105, 665 46, 89, 127, 84, 85, 96, 97, 136, 137, 47, 666 138, 1, 2, 3, 4, 5, 6, 7, 8, 9, 667 10, 11, 80, 62, 102, 48, 49, 50, 51, 52, 668 119, 120, 53, 54, 14, 118, 15, 16, 17, 18, 669 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 670 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 671 65, 39, 66, 40, 68, 1, 2, 3, 4, 5, 672 6, 7, 8, 9, 10, 11, 121, 122, 132, 133, 673 72, 71, 82, 87, 75, 92, 90, 98, 94, 99, 674 100, 103, 105, 109, 116, 115, 123, 130, 134, 67, 675 86, 81, 101, 93, 44, 69, 0, 77, 0, 0, 676 0, 74 677 }; 678 679 static const yytype_int16 yycheck[] = 680 { 681 40, 7, 97, 16, 17, 18, 19, 20, 30, 29, 682 23, 24, 32, 25, 26, 27, 28, 25, 26, 27, 683 28, 34, 34, 30, 119, 120, 121, 122, 68, 29, 684 31, 71, 32, 32, 33, 30, 31, 132, 133, 31, 685 135, 3, 4, 5, 6, 7, 8, 9, 10, 11, 686 12, 13, 58, 30, 94, 16, 17, 18, 19, 20, 687 30, 31, 23, 24, 3, 105, 5, 6, 7, 8, 688 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 689 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 690 31, 30, 0, 32, 32, 3, 4, 5, 6, 7, 691 8, 9, 10, 11, 12, 13, 30, 31, 30, 31, 692 14, 32, 30, 32, 34, 31, 33, 30, 33, 31, 693 31, 35, 29, 32, 21, 31, 15, 9, 22, 12, 694 63, 59, 91, 79, 2, 40, -1, 47, -1, -1, 695 -1, 44 696 }; 697 698 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 699 symbol of state STATE-NUM. */ 700 static const yytype_uint8 yystos[] = 701 { 702 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 703 12, 13, 37, 38, 3, 5, 6, 7, 8, 9, 704 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 705 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 706 32, 53, 54, 55, 55, 30, 31, 31, 16, 17, 707 18, 19, 20, 23, 24, 45, 48, 45, 30, 43, 708 44, 39, 30, 41, 42, 31, 0, 38, 32, 53, 709 54, 32, 14, 59, 59, 34, 47, 47, 34, 46, 710 45, 44, 30, 40, 32, 33, 42, 32, 54, 54, 711 33, 60, 31, 48, 33, 58, 30, 31, 30, 31, 712 31, 46, 54, 35, 56, 29, 32, 57, 57, 32, 713 25, 26, 27, 28, 61, 31, 21, 50, 54, 30, 714 31, 30, 31, 15, 49, 57, 57, 32, 57, 57, 715 9, 51, 30, 31, 22, 52, 57, 57, 57 716 }; 717 718 #define yyerrok (yyerrstatus = 0) 719 #define yyclearin (yychar = YYEMPTY) 720 #define YYEMPTY (-2) 721 #define YYEOF 0 722 723 #define YYACCEPT goto yyacceptlab 724 #define YYABORT goto yyabortlab 725 #define YYERROR goto yyerrorlab 726 727 728 /* Like YYERROR except do call yyerror. This remains here temporarily 729 to ease the transition to the new meaning of YYERROR, for GCC. 730 Once GCC version 2 has supplanted version 1, this can go. */ 731 732 #define YYFAIL goto yyerrlab 733 734 #define YYRECOVERING() (!!yyerrstatus) 735 736 #define YYBACKUP(Token, Value) \ 737 do \ 738 if (yychar == YYEMPTY && yylen == 1) \ 739 { \ 740 yychar = (Token); \ 741 yylval = (Value); \ 742 yytoken = YYTRANSLATE (yychar); \ 743 YYPOPSTACK (1); \ 744 goto yybackup; \ 745 } \ 746 else \ 747 { \ 748 yyerror (YY_("syntax error: cannot back up")); \ 749 YYERROR; \ 750 } \ 751 while (YYID (0)) 752 753 754 #define YYTERROR 1 755 #define YYERRCODE 256 756 757 758 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 759 If N is 0, then set CURRENT to the empty location which ends 760 the previous symbol: RHS[0] (always defined). */ 761 762 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 763 #ifndef YYLLOC_DEFAULT 764 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 765 do \ 766 if (YYID (N)) \ 767 { \ 768 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 769 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 770 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 771 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 772 } \ 773 else \ 774 { \ 775 (Current).first_line = (Current).last_line = \ 776 YYRHSLOC (Rhs, 0).last_line; \ 777 (Current).first_column = (Current).last_column = \ 778 YYRHSLOC (Rhs, 0).last_column; \ 779 } \ 780 while (YYID (0)) 781 #endif 782 783 784 /* YY_LOCATION_PRINT -- Print the location on the stream. 785 This macro was not mandated originally: define only if we know 786 we won't break user code: when these are the locations we know. */ 787 788 #ifndef YY_LOCATION_PRINT 789 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 790 # define YY_LOCATION_PRINT(File, Loc) \ 791 fprintf (File, "%d.%d-%d.%d", \ 792 (Loc).first_line, (Loc).first_column, \ 793 (Loc).last_line, (Loc).last_column) 794 # else 795 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 796 # endif 797 #endif 798 799 800 /* YYLEX -- calling `yylex' with the right arguments. */ 801 802 #ifdef YYLEX_PARAM 803 # define YYLEX yylex (YYLEX_PARAM) 804 #else 805 # define YYLEX yylex () 806 #endif 807 808 /* Enable debugging if requested. */ 809 #if YYDEBUG 810 811 # ifndef YYFPRINTF 812 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 813 # define YYFPRINTF fprintf 814 # endif 815 816 # define YYDPRINTF(Args) \ 817 do { \ 818 if (yydebug) \ 819 YYFPRINTF Args; \ 820 } while (YYID (0)) 821 822 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 823 do { \ 824 if (yydebug) \ 825 { \ 826 YYFPRINTF (stderr, "%s ", Title); \ 827 yy_symbol_print (stderr, \ 828 Type, Value); \ 829 YYFPRINTF (stderr, "\n"); \ 830 } \ 831 } while (YYID (0)) 832 833 834 /*--------------------------------. 835 | Print this symbol on YYOUTPUT. | 836 `--------------------------------*/ 837 838 /*ARGSUSED*/ 839 #if (defined __STDC__ || defined __C99__FUNC__ \ 840 || defined __cplusplus || defined _MSC_VER) 841 static void 842 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 843 #else 844 static void 845 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 846 FILE *yyoutput; 847 int yytype; 848 YYSTYPE const * const yyvaluep; 849 #endif 850 { 851 if (!yyvaluep) 852 return; 853 # ifdef YYPRINT 854 if (yytype < YYNTOKENS) 855 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 856 # else 857 YYUSE (yyoutput); 858 # endif 859 switch (yytype) 860 { 861 default: 862 break; 863 } 864 } 865 866 867 /*--------------------------------. 868 | Print this symbol on YYOUTPUT. | 869 `--------------------------------*/ 870 871 #if (defined __STDC__ || defined __C99__FUNC__ \ 872 || defined __cplusplus || defined _MSC_VER) 873 static void 874 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 875 #else 876 static void 877 yy_symbol_print (yyoutput, yytype, yyvaluep) 878 FILE *yyoutput; 879 int yytype; 880 YYSTYPE const * const yyvaluep; 881 #endif 882 { 883 if (yytype < YYNTOKENS) 884 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 885 else 886 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 887 888 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 889 YYFPRINTF (yyoutput, ")"); 890 } 891 892 /*------------------------------------------------------------------. 893 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 894 | TOP (included). | 895 `------------------------------------------------------------------*/ 896 897 #if (defined __STDC__ || defined __C99__FUNC__ \ 898 || defined __cplusplus || defined _MSC_VER) 899 static void 900 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 901 #else 902 static void 903 yy_stack_print (bottom, top) 904 yytype_int16 *bottom; 905 yytype_int16 *top; 906 #endif 907 { 908 YYFPRINTF (stderr, "Stack now"); 909 for (; bottom <= top; ++bottom) 910 YYFPRINTF (stderr, " %d", *bottom); 911 YYFPRINTF (stderr, "\n"); 912 } 913 914 # define YY_STACK_PRINT(Bottom, Top) \ 915 do { \ 916 if (yydebug) \ 917 yy_stack_print ((Bottom), (Top)); \ 918 } while (YYID (0)) 919 920 921 /*------------------------------------------------. 922 | Report that the YYRULE is going to be reduced. | 923 `------------------------------------------------*/ 924 925 #if (defined __STDC__ || defined __C99__FUNC__ \ 926 || defined __cplusplus || defined _MSC_VER) 927 static void 928 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 929 #else 930 static void 931 yy_reduce_print (yyvsp, yyrule) 932 YYSTYPE *yyvsp; 933 int yyrule; 934 #endif 935 { 936 int yynrhs = yyr2[yyrule]; 937 int yyi; 938 unsigned long int yylno = yyrline[yyrule]; 939 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 940 yyrule - 1, yylno); 941 /* The symbols being reduced. */ 942 for (yyi = 0; yyi < yynrhs; yyi++) 943 { 944 fprintf (stderr, " $%d = ", yyi + 1); 945 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 946 &(yyvsp[(yyi + 1) - (yynrhs)]) 947 ); 948 fprintf (stderr, "\n"); 949 } 950 } 951 952 # define YY_REDUCE_PRINT(Rule) \ 953 do { \ 954 if (yydebug) \ 955 yy_reduce_print (yyvsp, Rule); \ 956 } while (YYID (0)) 957 958 /* Nonzero means print parse trace. It is left uninitialized so that 959 multiple parsers can coexist. */ 960 int yydebug; 961 #else /* !YYDEBUG */ 962 # define YYDPRINTF(Args) 963 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 964 # define YY_STACK_PRINT(Bottom, Top) 965 # define YY_REDUCE_PRINT(Rule) 966 #endif /* !YYDEBUG */ 967 968 969 /* YYINITDEPTH -- initial size of the parser's stacks. */ 970 #ifndef YYINITDEPTH 971 # define YYINITDEPTH 200 972 #endif 973 974 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 975 if the built-in stack extension method is used). 976 977 Do not make this value too large; the results are undefined if 978 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 979 evaluated with infinite-precision integer arithmetic. */ 980 981 #ifndef YYMAXDEPTH 982 # define YYMAXDEPTH 10000 983 #endif 984 985 986 987 #if YYERROR_VERBOSE 988 989 # ifndef yystrlen 990 # if defined __GLIBC__ && defined _STRING_H 991 # define yystrlen strlen 992 # else 993 /* Return the length of YYSTR. */ 994 #if (defined __STDC__ || defined __C99__FUNC__ \ 995 || defined __cplusplus || defined _MSC_VER) 996 static YYSIZE_T 997 yystrlen (const char *yystr) 998 #else 999 static YYSIZE_T 1000 yystrlen (yystr) 1001 const char *yystr; 1002 #endif 1003 { 1004 YYSIZE_T yylen; 1005 for (yylen = 0; yystr[yylen]; yylen++) 1006 continue; 1007 return yylen; 1008 } 1009 # endif 1010 # endif 1011 1012 # ifndef yystpcpy 1013 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1014 # define yystpcpy stpcpy 1015 # else 1016 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1017 YYDEST. */ 1018 #if (defined __STDC__ || defined __C99__FUNC__ \ 1019 || defined __cplusplus || defined _MSC_VER) 1020 static char * 1021 yystpcpy (char *yydest, const char *yysrc) 1022 #else 1023 static char * 1024 yystpcpy (yydest, yysrc) 1025 char *yydest; 1026 const char *yysrc; 1027 #endif 1028 { 1029 char *yyd = yydest; 1030 const char *yys = yysrc; 1031 1032 while ((*yyd++ = *yys++) != '\0') 1033 continue; 1034 1035 return yyd - 1; 1036 } 1037 # endif 1038 # endif 1039 1040 # ifndef yytnamerr 1041 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1042 quotes and backslashes, so that it's suitable for yyerror. The 1043 heuristic is that double-quoting is unnecessary unless the string 1044 contains an apostrophe, a comma, or backslash (other than 1045 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1046 null, do not copy; instead, return the length of what the result 1047 would have been. */ 1048 static YYSIZE_T 1049 yytnamerr (char *yyres, const char *yystr) 1050 { 1051 if (*yystr == '"') 1052 { 1053 YYSIZE_T yyn = 0; 1054 char const *yyp = yystr; 1055 1056 for (;;) 1057 switch (*++yyp) 1058 { 1059 case '\'': 1060 case ',': 1061 goto do_not_strip_quotes; 1062 1063 case '\\': 1064 if (*++yyp != '\\') 1065 goto do_not_strip_quotes; 1066 /* Fall through. */ 1067 default: 1068 if (yyres) 1069 yyres[yyn] = *yyp; 1070 yyn++; 1071 break; 1072 1073 case '"': 1074 if (yyres) 1075 yyres[yyn] = '\0'; 1076 return yyn; 1077 } 1078 do_not_strip_quotes: ; 1079 } 1080 1081 if (! yyres) 1082 return yystrlen (yystr); 1083 1084 return yystpcpy (yyres, yystr) - yyres; 1085 } 1086 # endif 1087 1088 /* Copy into YYRESULT an error message about the unexpected token 1089 YYCHAR while in state YYSTATE. Return the number of bytes copied, 1090 including the terminating null byte. If YYRESULT is null, do not 1091 copy anything; just return the number of bytes that would be 1092 copied. As a special case, return 0 if an ordinary "syntax error" 1093 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1094 size calculation. */ 1095 static YYSIZE_T 1096 yysyntax_error (char *yyresult, int yystate, int yychar) 1097 { 1098 int yyn = yypact[yystate]; 1099 1100 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1101 return 0; 1102 else 1103 { 1104 int yytype = YYTRANSLATE (yychar); 1105 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1106 YYSIZE_T yysize = yysize0; 1107 YYSIZE_T yysize1; 1108 int yysize_overflow = 0; 1109 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1110 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1111 int yyx; 1112 1113 # if 0 1114 /* This is so xgettext sees the translatable formats that are 1115 constructed on the fly. */ 1116 YY_("syntax error, unexpected %s"); 1117 YY_("syntax error, unexpected %s, expecting %s"); 1118 YY_("syntax error, unexpected %s, expecting %s or %s"); 1119 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1120 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1121 # endif 1122 char *yyfmt; 1123 char const *yyf; 1124 static char const yyunexpected[] = "syntax error, unexpected %s"; 1125 static char const yyexpecting[] = ", expecting %s"; 1126 static char const yyor[] = " or %s"; 1127 char yyformat[sizeof yyunexpected 1128 + sizeof yyexpecting - 1 1129 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1130 * (sizeof yyor - 1))]; 1131 char const *yyprefix = yyexpecting; 1132 1133 /* Start YYX at -YYN if negative to avoid negative indexes in 1134 YYCHECK. */ 1135 int yyxbegin = yyn < 0 ? -yyn : 0; 1136 1137 /* Stay within bounds of both yycheck and yytname. */ 1138 int yychecklim = YYLAST - yyn + 1; 1139 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1140 int yycount = 1; 1141 1142 yyarg[0] = yytname[yytype]; 1143 yyfmt = yystpcpy (yyformat, yyunexpected); 1144 1145 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1146 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1147 { 1148 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1149 { 1150 yycount = 1; 1151 yysize = yysize0; 1152 yyformat[sizeof yyunexpected - 1] = '\0'; 1153 break; 1154 } 1155 yyarg[yycount++] = yytname[yyx]; 1156 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1157 yysize_overflow |= (yysize1 < yysize); 1158 yysize = yysize1; 1159 yyfmt = yystpcpy (yyfmt, yyprefix); 1160 yyprefix = yyor; 1161 } 1162 1163 yyf = YY_(yyformat); 1164 yysize1 = yysize + yystrlen (yyf); 1165 yysize_overflow |= (yysize1 < yysize); 1166 yysize = yysize1; 1167 1168 if (yysize_overflow) 1169 return YYSIZE_MAXIMUM; 1170 1171 if (yyresult) 1172 { 1173 /* Avoid sprintf, as that infringes on the user's name space. 1174 Don't have undefined behavior even if the translation 1175 produced a string with the wrong number of "%s"s. */ 1176 char *yyp = yyresult; 1177 int yyi = 0; 1178 while ((*yyp = *yyf) != '\0') 1179 { 1180 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1181 { 1182 yyp += yytnamerr (yyp, yyarg[yyi++]); 1183 yyf += 2; 1184 } 1185 else 1186 { 1187 yyp++; 1188 yyf++; 1189 } 1190 } 1191 } 1192 return yysize; 1193 } 1194 } 1195 #endif /* YYERROR_VERBOSE */ 1196 1197 1198 /*-----------------------------------------------. 1199 | Release the memory associated to this symbol. | 1200 `-----------------------------------------------*/ 1201 1202 /*ARGSUSED*/ 1203 #if (defined __STDC__ || defined __C99__FUNC__ \ 1204 || defined __cplusplus || defined _MSC_VER) 1205 static void 1206 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1207 #else 1208 static void 1209 yydestruct (yymsg, yytype, yyvaluep) 1210 const char *yymsg; 1211 int yytype; 1212 YYSTYPE *yyvaluep; 1213 #endif 1214 { 1215 YYUSE (yyvaluep); 1216 1217 if (!yymsg) 1218 yymsg = "Deleting"; 1219 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1220 1221 switch (yytype) 1222 { 1223 1224 default: 1225 break; 1226 } 1227 } 1228 1229 1230 /* Prevent warnings from -Wmissing-prototypes. */ 1231 1232 #ifdef YYPARSE_PARAM 1233 #if defined __STDC__ || defined __cplusplus 1234 int yyparse (void *YYPARSE_PARAM); 1235 #else 1236 int yyparse (); 1237 #endif 1238 #else /* ! YYPARSE_PARAM */ 1239 #if defined __STDC__ || defined __cplusplus 1240 int yyparse (void); 1241 #else 1242 int yyparse (); 1243 #endif 1244 #endif /* ! YYPARSE_PARAM */ 1245 1246 1247 1248 /* The look-ahead symbol. */ 1249 int yychar; 1250 1251 /* The semantic value of the look-ahead symbol. */ 1252 YYSTYPE yylval; 1253 1254 /* Number of syntax errors so far. */ 1255 int yynerrs; 1256 1257 1258 1259 /*----------. 1260 | yyparse. | 1261 `----------*/ 1262 1263 #ifdef YYPARSE_PARAM 1264 #if (defined __STDC__ || defined __C99__FUNC__ \ 1265 || defined __cplusplus || defined _MSC_VER) 1266 int 1267 yyparse (void *YYPARSE_PARAM) 1268 #else 1269 int 1270 yyparse (YYPARSE_PARAM) 1271 void *YYPARSE_PARAM; 1272 #endif 1273 #else /* ! YYPARSE_PARAM */ 1274 #if (defined __STDC__ || defined __C99__FUNC__ \ 1275 || defined __cplusplus || defined _MSC_VER) 1276 int 1277 yyparse (void) 1278 #else 1279 int 1280 yyparse () 1281 1282 #endif 1283 #endif 1284 { 1285 1286 int yystate; 1287 int yyn; 1288 int yyresult; 1289 /* Number of tokens to shift before error messages enabled. */ 1290 int yyerrstatus; 1291 /* Look-ahead token as an internal (translated) token number. */ 1292 int yytoken = 0; 1293 #if YYERROR_VERBOSE 1294 /* Buffer for error messages, and its allocated size. */ 1295 char yymsgbuf[128]; 1296 char *yymsg = yymsgbuf; 1297 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1298 #endif 1299 1300 /* Three stacks and their tools: 1301 `yyss': related to states, 1302 `yyvs': related to semantic values, 1303 `yyls': related to locations. 1304 1305 Refer to the stacks thru separate pointers, to allow yyoverflow 1306 to reallocate them elsewhere. */ 1307 1308 /* The state stack. */ 1309 yytype_int16 yyssa[YYINITDEPTH]; 1310 yytype_int16 *yyss = yyssa; 1311 yytype_int16 *yyssp; 1312 1313 /* The semantic value stack. */ 1314 YYSTYPE yyvsa[YYINITDEPTH]; 1315 YYSTYPE *yyvs = yyvsa; 1316 YYSTYPE *yyvsp; 1317 1318 1319 1320 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1321 1322 YYSIZE_T yystacksize = YYINITDEPTH; 1323 1324 /* The variables used to return semantic value and location from the 1325 action routines. */ 1326 YYSTYPE yyval; 1327 1328 1329 /* The number of symbols on the RHS of the reduced rule. 1330 Keep to zero when no symbol should be popped. */ 1331 int yylen = 0; 1332 1333 YYDPRINTF ((stderr, "Starting parse\n")); 1334 1335 yystate = 0; 1336 yyerrstatus = 0; 1337 yynerrs = 0; 1338 yychar = YYEMPTY; /* Cause a token to be read. */ 1339 1340 /* Initialize stack pointers. 1341 Waste one element of value and location stack 1342 so that they stay on the same level as the state stack. 1343 The wasted elements are never initialized. */ 1344 1345 yyssp = yyss; 1346 yyvsp = yyvs; 1347 1348 goto yysetstate; 1349 1350 /*------------------------------------------------------------. 1351 | yynewstate -- Push a new state, which is found in yystate. | 1352 `------------------------------------------------------------*/ 1353 yynewstate: 1354 /* In all cases, when you get here, the value and location stacks 1355 have just been pushed. So pushing a state here evens the stacks. */ 1356 yyssp++; 1357 1358 yysetstate: 1359 *yyssp = yystate; 1360 1361 if (yyss + yystacksize - 1 <= yyssp) 1362 { 1363 /* Get the current used size of the three stacks, in elements. */ 1364 YYSIZE_T yysize = yyssp - yyss + 1; 1365 1366 #ifdef yyoverflow 1367 { 1368 /* Give user a chance to reallocate the stack. Use copies of 1369 these so that the &'s don't force the real ones into 1370 memory. */ 1371 YYSTYPE *yyvs1 = yyvs; 1372 yytype_int16 *yyss1 = yyss; 1373 1374 1375 /* Each stack pointer address is followed by the size of the 1376 data in use in that stack, in bytes. This used to be a 1377 conditional around just the two extra args, but that might 1378 be undefined if yyoverflow is a macro. */ 1379 yyoverflow (YY_("memory exhausted"), 1380 &yyss1, yysize * sizeof (*yyssp), 1381 &yyvs1, yysize * sizeof (*yyvsp), 1382 1383 &yystacksize); 1384 1385 yyss = yyss1; 1386 yyvs = yyvs1; 1387 } 1388 #else /* no yyoverflow */ 1389 # ifndef YYSTACK_RELOCATE 1390 goto yyexhaustedlab; 1391 # else 1392 /* Extend the stack our own way. */ 1393 if (YYMAXDEPTH <= yystacksize) 1394 goto yyexhaustedlab; 1395 yystacksize *= 2; 1396 if (YYMAXDEPTH < yystacksize) 1397 yystacksize = YYMAXDEPTH; 1398 1399 { 1400 yytype_int16 *yyss1 = yyss; 1401 union yyalloc *yyptr = 1402 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1403 if (! yyptr) 1404 goto yyexhaustedlab; 1405 YYSTACK_RELOCATE (yyss); 1406 YYSTACK_RELOCATE (yyvs); 1407 1408 # undef YYSTACK_RELOCATE 1409 if (yyss1 != yyssa) 1410 YYSTACK_FREE (yyss1); 1411 } 1412 # endif 1413 #endif /* no yyoverflow */ 1414 1415 yyssp = yyss + yysize - 1; 1416 yyvsp = yyvs + yysize - 1; 1417 1418 1419 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1420 (unsigned long int) yystacksize)); 1421 1422 if (yyss + yystacksize - 1 <= yyssp) 1423 YYABORT; 1424 } 1425 1426 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1427 1428 goto yybackup; 1429 1430 /*-----------. 1431 | yybackup. | 1432 `-----------*/ 1433 yybackup: 1434 1435 /* Do appropriate processing given the current state. Read a 1436 look-ahead token if we need one and don't already have one. */ 1437 1438 /* First try to decide what to do without reference to look-ahead token. */ 1439 yyn = yypact[yystate]; 1440 if (yyn == YYPACT_NINF) 1441 goto yydefault; 1442 1443 /* Not known => get a look-ahead token if don't already have one. */ 1444 1445 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 1446 if (yychar == YYEMPTY) 1447 { 1448 YYDPRINTF ((stderr, "Reading a token: ")); 1449 yychar = YYLEX; 1450 } 1451 1452 if (yychar <= YYEOF) 1453 { 1454 yychar = yytoken = YYEOF; 1455 YYDPRINTF ((stderr, "Now at end of input.\n")); 1456 } 1457 else 1458 { 1459 yytoken = YYTRANSLATE (yychar); 1460 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1461 } 1462 1463 /* If the proper action on seeing token YYTOKEN is to reduce or to 1464 detect an error, take that action. */ 1465 yyn += yytoken; 1466 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1467 goto yydefault; 1468 yyn = yytable[yyn]; 1469 if (yyn <= 0) 1470 { 1471 if (yyn == 0 || yyn == YYTABLE_NINF) 1472 goto yyerrlab; 1473 yyn = -yyn; 1474 goto yyreduce; 1475 } 1476 1477 if (yyn == YYFINAL) 1478 YYACCEPT; 1479 1480 /* Count tokens shifted since error; after three, turn off error 1481 status. */ 1482 if (yyerrstatus) 1483 yyerrstatus--; 1484 1485 /* Shift the look-ahead token. */ 1486 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1487 1488 /* Discard the shifted token unless it is eof. */ 1489 if (yychar != YYEOF) 1490 yychar = YYEMPTY; 1491 1492 yystate = yyn; 1493 *++yyvsp = yylval; 1494 1495 goto yynewstate; 1496 1497 1498 /*-----------------------------------------------------------. 1499 | yydefault -- do the default action for the current state. | 1500 `-----------------------------------------------------------*/ 1501 yydefault: 1502 yyn = yydefact[yystate]; 1503 if (yyn == 0) 1504 goto yyerrlab; 1505 goto yyreduce; 1506 1507 1508 /*-----------------------------. 1509 | yyreduce -- Do a reduction. | 1510 `-----------------------------*/ 1511 yyreduce: 1512 /* yyn is the number of a rule to reduce with. */ 1513 yylen = yyr2[yyn]; 1514 1515 /* If YYLEN is nonzero, implement the default value of the action: 1516 `$$ = $1'. 1517 1518 Otherwise, the following line sets YYVAL to garbage. 1519 This behavior is undocumented and Bison 1520 users should not rely upon it. Assigning to YYVAL 1521 unconditionally makes the parser a bit smaller, and it avoids a 1522 GCC warning that YYVAL may be used uninitialized. */ 1523 yyval = yyvsp[1-yylen]; 1524 1525 1526 YY_REDUCE_PRINT (yyn); 1527 switch (yyn) 1528 { 1529 case 4: 1530 #line 53 "defparse.y" 1531 { def_name ((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].number)); } 1532 break; 1533 1534 case 5: 1535 #line 54 "defparse.y" 1536 { def_library ((yyvsp[(2) - (4)].id), (yyvsp[(3) - (4)].number)); } 1537 break; 1538 1539 case 7: 1540 #line 56 "defparse.y" 1541 { def_description ((yyvsp[(2) - (2)].id));} 1542 break; 1543 1544 case 8: 1545 #line 57 "defparse.y" 1546 { def_stacksize ((yyvsp[(2) - (3)].number), (yyvsp[(3) - (3)].number));} 1547 break; 1548 1549 case 9: 1550 #line 58 "defparse.y" 1551 { def_heapsize ((yyvsp[(2) - (3)].number), (yyvsp[(3) - (3)].number));} 1552 break; 1553 1554 case 10: 1555 #line 59 "defparse.y" 1556 { def_code ((yyvsp[(2) - (2)].number));} 1557 break; 1558 1559 case 11: 1560 #line 60 "defparse.y" 1561 { def_data ((yyvsp[(2) - (2)].number));} 1562 break; 1563 1564 case 14: 1565 #line 63 "defparse.y" 1566 { def_version ((yyvsp[(2) - (2)].number),0);} 1567 break; 1568 1569 case 15: 1570 #line 64 "defparse.y" 1571 { def_version ((yyvsp[(2) - (4)].number),(yyvsp[(4) - (4)].number));} 1572 break; 1573 1574 case 18: 1575 #line 76 "defparse.y" 1576 { def_exports ((yyvsp[(1) - (8)].id), (yyvsp[(2) - (8)].id), (yyvsp[(3) - (8)].number), (yyvsp[(4) - (8)].number), (yyvsp[(5) - (8)].number), (yyvsp[(6) - (8)].number), (yyvsp[(7) - (8)].number), (yyvsp[(8) - (8)].id));} 1577 break; 1578 1579 case 21: 1580 #line 85 "defparse.y" 1581 { def_import ((yyvsp[(1) - (8)].id),(yyvsp[(3) - (8)].id),(yyvsp[(5) - (8)].id),(yyvsp[(7) - (8)].id), 0, (yyvsp[(8) - (8)].id)); } 1582 break; 1583 1584 case 22: 1585 #line 87 "defparse.y" 1586 { def_import ((yyvsp[(1) - (8)].id),(yyvsp[(3) - (8)].id),(yyvsp[(5) - (8)].id), 0,(yyvsp[(7) - (8)].number), (yyvsp[(8) - (8)].id)); } 1587 break; 1588 1589 case 23: 1590 #line 89 "defparse.y" 1591 { def_import ((yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id), 0,(yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); } 1592 break; 1593 1594 case 24: 1595 #line 91 "defparse.y" 1596 { def_import ((yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id), 0, 0,(yyvsp[(5) - (6)].number), (yyvsp[(6) - (6)].id)); } 1597 break; 1598 1599 case 25: 1600 #line 93 "defparse.y" 1601 { def_import ( 0,(yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id),(yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); } 1602 break; 1603 1604 case 26: 1605 #line 95 "defparse.y" 1606 { def_import ( 0,(yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id), 0,(yyvsp[(5) - (6)].number), (yyvsp[(6) - (6)].id)); } 1607 break; 1608 1609 case 27: 1610 #line 97 "defparse.y" 1611 { def_import ( 0,(yyvsp[(1) - (4)].id), 0,(yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); } 1612 break; 1613 1614 case 28: 1615 #line 99 "defparse.y" 1616 { def_import ( 0,(yyvsp[(1) - (4)].id), 0, 0,(yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].id)); } 1617 break; 1618 1619 case 31: 1620 #line 108 "defparse.y" 1621 { def_section ((yyvsp[(1) - (2)].id),(yyvsp[(2) - (2)].number));} 1622 break; 1623 1624 case 36: 1625 #line 120 "defparse.y" 1626 { (yyval.number)=(yyvsp[(2) - (2)].number);} 1627 break; 1628 1629 case 37: 1630 #line 121 "defparse.y" 1631 { (yyval.number)=-1;} 1632 break; 1633 1634 case 38: 1635 #line 125 "defparse.y" 1636 { (yyval.number) = 1; } 1637 break; 1638 1639 case 39: 1640 #line 126 "defparse.y" 1641 { (yyval.number) = 2; } 1642 break; 1643 1644 case 40: 1645 #line 127 "defparse.y" 1646 { (yyval.number) = 4; } 1647 break; 1648 1649 case 41: 1650 #line 128 "defparse.y" 1651 { (yyval.number) = 8; } 1652 break; 1653 1654 case 42: 1655 #line 129 "defparse.y" 1656 { (yyval.number) = 0; } 1657 break; 1658 1659 case 43: 1660 #line 130 "defparse.y" 1661 { (yyval.number) = 0; } 1662 break; 1663 1664 case 44: 1665 #line 131 "defparse.y" 1666 { (yyval.number) = 0; } 1667 break; 1668 1669 case 45: 1670 #line 135 "defparse.y" 1671 {(yyval.number)=1;} 1672 break; 1673 1674 case 46: 1675 #line 136 "defparse.y" 1676 {(yyval.number)=0;} 1677 break; 1678 1679 case 47: 1680 #line 140 "defparse.y" 1681 {(yyval.number)=1;} 1682 break; 1683 1684 case 48: 1685 #line 141 "defparse.y" 1686 {(yyval.number)=0;} 1687 break; 1688 1689 case 49: 1690 #line 145 "defparse.y" 1691 { (yyval.number) = 1; } 1692 break; 1693 1694 case 50: 1695 #line 146 "defparse.y" 1696 { (yyval.number) = 0; } 1697 break; 1698 1699 case 51: 1700 #line 150 "defparse.y" 1701 { (yyval.number) = 1; } 1702 break; 1703 1704 case 52: 1705 #line 151 "defparse.y" 1706 { (yyval.number) = 0; } 1707 break; 1708 1709 case 53: 1710 #line 154 "defparse.y" 1711 { (yyval.id_const) = "NAME"; } 1712 break; 1713 1714 case 54: 1715 #line 159 "defparse.y" 1716 { (yyval.id_const) = "DESCRIPTION"; } 1717 break; 1718 1719 case 55: 1720 #line 160 "defparse.y" 1721 { (yyval.id_const) = "STACKSIZE"; } 1722 break; 1723 1724 case 56: 1725 #line 161 "defparse.y" 1726 { (yyval.id_const) = "HEAPSIZE"; } 1727 break; 1728 1729 case 57: 1730 #line 162 "defparse.y" 1731 { (yyval.id_const) = "CODE"; } 1732 break; 1733 1734 case 58: 1735 #line 163 "defparse.y" 1736 { (yyval.id_const) = "DATA"; } 1737 break; 1738 1739 case 59: 1740 #line 164 "defparse.y" 1741 { (yyval.id_const) = "SECTIONS"; } 1742 break; 1743 1744 case 60: 1745 #line 165 "defparse.y" 1746 { (yyval.id_const) = "EXPORTS"; } 1747 break; 1748 1749 case 61: 1750 #line 166 "defparse.y" 1751 { (yyval.id_const) = "IMPORTS"; } 1752 break; 1753 1754 case 62: 1755 #line 167 "defparse.y" 1756 { (yyval.id_const) = "VERSION"; } 1757 break; 1758 1759 case 63: 1760 #line 168 "defparse.y" 1761 { (yyval.id_const) = "BASE"; } 1762 break; 1763 1764 case 64: 1765 #line 169 "defparse.y" 1766 { (yyval.id_const) = "CONSTANT"; } 1767 break; 1768 1769 case 65: 1770 #line 170 "defparse.y" 1771 { (yyval.id_const) = "NONAME"; } 1772 break; 1773 1774 case 66: 1775 #line 171 "defparse.y" 1776 { (yyval.id_const) = "PRIVATE"; } 1777 break; 1778 1779 case 67: 1780 #line 172 "defparse.y" 1781 { (yyval.id_const) = "READ"; } 1782 break; 1783 1784 case 68: 1785 #line 173 "defparse.y" 1786 { (yyval.id_const) = "WRITE"; } 1787 break; 1788 1789 case 69: 1790 #line 174 "defparse.y" 1791 { (yyval.id_const) = "EXECUTE"; } 1792 break; 1793 1794 case 70: 1795 #line 175 "defparse.y" 1796 { (yyval.id_const) = "SHARED"; } 1797 break; 1798 1799 case 71: 1800 #line 176 "defparse.y" 1801 { (yyval.id_const) = "NONSHARED"; } 1802 break; 1803 1804 case 72: 1805 #line 177 "defparse.y" 1806 { (yyval.id_const) = "SINGLE"; } 1807 break; 1808 1809 case 73: 1810 #line 178 "defparse.y" 1811 { (yyval.id_const) = "MULTIPLE"; } 1812 break; 1813 1814 case 74: 1815 #line 179 "defparse.y" 1816 { (yyval.id_const) = "INITINSTANCE"; } 1817 break; 1818 1819 case 75: 1820 #line 180 "defparse.y" 1821 { (yyval.id_const) = "INITGLOBAL"; } 1822 break; 1823 1824 case 76: 1825 #line 181 "defparse.y" 1826 { (yyval.id_const) = "TERMINSTANCE"; } 1827 break; 1828 1829 case 77: 1830 #line 182 "defparse.y" 1831 { (yyval.id_const) = "TERMGLOBAL"; } 1832 break; 1833 1834 case 78: 1835 #line 185 "defparse.y" 1836 { (yyval.id) = (yyvsp[(1) - (1)].id); } 1837 break; 1838 1839 case 79: 1840 #line 187 "defparse.y" 1841 { 1842 char *name = xmalloc (strlen ((yyvsp[(2) - (2)].id_const)) + 2); 1843 sprintf (name, ".%s", (yyvsp[(2) - (2)].id_const)); 1844 (yyval.id) = name; 1845 } 1846 break; 1847 1848 case 80: 1849 #line 193 "defparse.y" 1850 { 1851 char *name = xmalloc (strlen ((yyvsp[(2) - (2)].id)) + 2); 1852 sprintf (name, ".%s", (yyvsp[(2) - (2)].id)); 1853 (yyval.id) = name; 1854 } 1855 break; 1856 1857 case 81: 1858 #line 199 "defparse.y" 1859 { 1860 char *name = xmalloc (strlen ((yyvsp[(1) - (3)].id_const)) + 1 + strlen ((yyvsp[(3) - (3)].id)) + 1); 1861 sprintf (name, "%s.%s", (yyvsp[(1) - (3)].id_const), (yyvsp[(3) - (3)].id)); 1862 (yyval.id) = name; 1863 } 1864 break; 1865 1866 case 82: 1867 #line 205 "defparse.y" 1868 { 1869 char *name = xmalloc (strlen ((yyvsp[(1) - (3)].id)) + 1 + strlen ((yyvsp[(3) - (3)].id)) + 1); 1870 sprintf (name, "%s.%s", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id)); 1871 (yyval.id) = name; 1872 } 1873 break; 1874 1875 case 83: 1876 #line 211 "defparse.y" 1877 { (yyval.id) =(yyvsp[(1) - (1)].id); } 1878 break; 1879 1880 case 84: 1881 #line 212 "defparse.y" 1882 { (yyval.id)=""; } 1883 break; 1884 1885 case 85: 1886 #line 216 "defparse.y" 1887 { (yyval.number)=(yyvsp[(2) - (2)].number);} 1888 break; 1889 1890 case 86: 1891 #line 217 "defparse.y" 1892 { (yyval.number)=-1;} 1893 break; 1894 1895 case 87: 1896 #line 221 "defparse.y" 1897 { (yyval.id) = (yyvsp[(2) - (2)].id); } 1898 break; 1899 1900 case 88: 1901 #line 222 "defparse.y" 1902 { (yyval.id) = 0; } 1903 break; 1904 1905 case 89: 1906 #line 226 "defparse.y" 1907 { (yyval.id) = (yyvsp[(2) - (2)].id); } 1908 break; 1909 1910 case 90: 1911 #line 227 "defparse.y" 1912 { (yyval.id) = 0; } 1913 break; 1914 1915 case 91: 1916 #line 230 "defparse.y" 1917 { (yyval.number)= (yyvsp[(3) - (3)].number);} 1918 break; 1919 1920 case 92: 1921 #line 231 "defparse.y" 1922 { (yyval.number)=-1;} 1923 break; 1924 1925 1926 /* Line 1267 of yacc.c. */ 1927 #line 1928 "defparse.c" 1928 default: break; 1929 } 1930 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1931 1932 YYPOPSTACK (yylen); 1933 yylen = 0; 1934 YY_STACK_PRINT (yyss, yyssp); 1935 1936 *++yyvsp = yyval; 1937 1938 1939 /* Now `shift' the result of the reduction. Determine what state 1940 that goes to, based on the state we popped back to and the rule 1941 number reduced by. */ 1942 1943 yyn = yyr1[yyn]; 1944 1945 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 1946 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 1947 yystate = yytable[yystate]; 1948 else 1949 yystate = yydefgoto[yyn - YYNTOKENS]; 1950 1951 goto yynewstate; 1952 1953 1954 /*------------------------------------. 1955 | yyerrlab -- here on detecting error | 1956 `------------------------------------*/ 1957 yyerrlab: 1958 /* If not already recovering from an error, report this error. */ 1959 if (!yyerrstatus) 1960 { 1961 ++yynerrs; 1962 #if ! YYERROR_VERBOSE 1963 yyerror (YY_("syntax error")); 1964 #else 1965 { 1966 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1967 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1968 { 1969 YYSIZE_T yyalloc = 2 * yysize; 1970 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1971 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1972 if (yymsg != yymsgbuf) 1973 YYSTACK_FREE (yymsg); 1974 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1975 if (yymsg) 1976 yymsg_alloc = yyalloc; 1977 else 1978 { 1979 yymsg = yymsgbuf; 1980 yymsg_alloc = sizeof yymsgbuf; 1981 } 1982 } 1983 1984 if (0 < yysize && yysize <= yymsg_alloc) 1985 { 1986 (void) yysyntax_error (yymsg, yystate, yychar); 1987 yyerror (yymsg); 1988 } 1989 else 1990 { 1991 yyerror (YY_("syntax error")); 1992 if (yysize != 0) 1993 goto yyexhaustedlab; 1994 } 1995 } 1996 #endif 1997 } 1998 1999 2000 2001 if (yyerrstatus == 3) 2002 { 2003 /* If just tried and failed to reuse look-ahead token after an 2004 error, discard it. */ 2005 2006 if (yychar <= YYEOF) 2007 { 2008 /* Return failure if at end of input. */ 2009 if (yychar == YYEOF) 2010 YYABORT; 2011 } 2012 else 2013 { 2014 yydestruct ("Error: discarding", 2015 yytoken, &yylval); 2016 yychar = YYEMPTY; 2017 } 2018 } 2019 2020 /* Else will try to reuse look-ahead token after shifting the error 2021 token. */ 2022 goto yyerrlab1; 2023 2024 2025 /*---------------------------------------------------. 2026 | yyerrorlab -- error raised explicitly by YYERROR. | 2027 `---------------------------------------------------*/ 2028 yyerrorlab: 2029 2030 /* Pacify compilers like GCC when the user code never invokes 2031 YYERROR and the label yyerrorlab therefore never appears in user 2032 code. */ 2033 if (/*CONSTCOND*/ 0) 2034 goto yyerrorlab; 2035 2036 /* Do not reclaim the symbols of the rule which action triggered 2037 this YYERROR. */ 2038 YYPOPSTACK (yylen); 2039 yylen = 0; 2040 YY_STACK_PRINT (yyss, yyssp); 2041 yystate = *yyssp; 2042 goto yyerrlab1; 2043 2044 2045 /*-------------------------------------------------------------. 2046 | yyerrlab1 -- common code for both syntax error and YYERROR. | 2047 `-------------------------------------------------------------*/ 2048 yyerrlab1: 2049 yyerrstatus = 3; /* Each real token shifted decrements this. */ 2050 2051 for (;;) 2052 { 2053 yyn = yypact[yystate]; 2054 if (yyn != YYPACT_NINF) 2055 { 2056 yyn += YYTERROR; 2057 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 2058 { 2059 yyn = yytable[yyn]; 2060 if (0 < yyn) 2061 break; 2062 } 2063 } 2064 2065 /* Pop the current state because it cannot handle the error token. */ 2066 if (yyssp == yyss) 2067 YYABORT; 2068 2069 2070 yydestruct ("Error: popping", 2071 yystos[yystate], yyvsp); 2072 YYPOPSTACK (1); 2073 yystate = *yyssp; 2074 YY_STACK_PRINT (yyss, yyssp); 2075 } 2076 2077 if (yyn == YYFINAL) 2078 YYACCEPT; 2079 2080 *++yyvsp = yylval; 2081 2082 2083 /* Shift the error token. */ 2084 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 2085 2086 yystate = yyn; 2087 goto yynewstate; 2088 2089 2090 /*-------------------------------------. 2091 | yyacceptlab -- YYACCEPT comes here. | 2092 `-------------------------------------*/ 2093 yyacceptlab: 2094 yyresult = 0; 2095 goto yyreturn; 2096 2097 /*-----------------------------------. 2098 | yyabortlab -- YYABORT comes here. | 2099 `-----------------------------------*/ 2100 yyabortlab: 2101 yyresult = 1; 2102 goto yyreturn; 2103 2104 #ifndef yyoverflow 2105 /*-------------------------------------------------. 2106 | yyexhaustedlab -- memory exhaustion comes here. | 2107 `-------------------------------------------------*/ 2108 yyexhaustedlab: 2109 yyerror (YY_("memory exhausted")); 2110 yyresult = 2; 2111 /* Fall through. */ 2112 #endif 2113 2114 yyreturn: 2115 if (yychar != YYEOF && yychar != YYEMPTY) 2116 yydestruct ("Cleanup: discarding lookahead", 2117 yytoken, &yylval); 2118 /* Do not reclaim the symbols of the rule which action triggered 2119 this YYABORT or YYACCEPT. */ 2120 YYPOPSTACK (yylen); 2121 YY_STACK_PRINT (yyss, yyssp); 2122 while (yyssp != yyss) 2123 { 2124 yydestruct ("Cleanup: popping", 2125 yystos[*yyssp], yyvsp); 2126 YYPOPSTACK (1); 2127 } 2128 #ifndef yyoverflow 2129 if (yyss != yyssa) 2130 YYSTACK_FREE (yyss); 2131 #endif 2132 #if YYERROR_VERBOSE 2133 if (yymsg != yymsgbuf) 2134 YYSTACK_FREE (yymsg); 2135 #endif 2136 /* Make sure YYID is used. */ 2137 return YYID (yyresult); 2138 } 2139 2140 2141 2142