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