Wolfgang Thallergcc16 merge934c3885 months agoHistory
1597 lines · 49.9 KB · C
RawDownload
/* A Bison parser, made by GNU Bison 3.8.2.  */ /* Bison implementation for Yacc-like parsers in C    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,   Inc.    This program is free software: you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation, either version 3 of the License, or   (at your option) any later version.    This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.    You should have received a copy of the GNU General Public License   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */ /* As a special exception, you may create a larger work that contains   part or all of the Bison parser skeleton and distribute that work   under terms of your choice, so long as that work isn't itself a   parser generator using the skeleton or a modified version thereof   as a parser skeleton.  Alternatively, if you modify or redistribute   the parser skeleton itself, you may (at your option) remove this   special exception, which will cause the skeleton and the resulting   Bison output files to be licensed under the GNU General Public   License without this special exception.    This special exception was added by the Free Software Foundation in   version 2.2 of Bison.  */ /* C LALR(1) parser skeleton written by Richard Stallman, by   simplifying the original so-called "semantic" parser.  */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,   especially those whose name start with YY_ or yy_.  They are   private implementation details that can be changed or removed.  */ /* All symbols defined below should begin with yy or YY, to avoid   infringing on user name space.  This should be done even for local   variables, as they might otherwise be expanded by user macros.   There are some unavoidable exceptions within include files to   define necessary library symbols; they are noted "INFRINGES ON   USER NAME SPACE" below.  */ /* Identify Bison output, and Bison version.  */#define YYBISON 30802 /* Bison version string.  */#define YYBISON_VERSION "3.8.2" /* Skeleton name.  */#define YYSKELETON_NAME "yacc.c" /* Pure parsers.  */#define YYPURE 0 /* Push parsers.  */#define YYPUSH 0 /* Pull parsers.  */#define YYPULL 1    /* First part of user prologue.  */#line 1 "arparse.y" /* arparse.y - Strange script language parser */ /* Copyright (C) 1992-2026 Free Software Foundation, Inc.    This file is part of GNU Binutils.    This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 3 of the License, or   (at your option) any later version.    This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.    You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,   MA 02110-1301, USA.  */  /* Contributed by Steve Chamberlain   		  sac@cygnus.com */#define DONTDECLARE_MALLOC#include "sysdep.h"#include "bfd.h"#include "arsup.h"extern int verbose;extern int yylex (void);static void yyerror (const char *); #line 107 "arparse.c" # ifndef YY_CAST#  ifdef __cplusplus#   define YY_CAST(Type, Val) static_cast<Type> (Val)#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)#  else#   define YY_CAST(Type, Val) ((Type) (Val))#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))#  endif# endif# ifndef YY_NULLPTR#  if defined __cplusplus#   if 201103L <= __cplusplus#    define YY_NULLPTR nullptr#   else#    define YY_NULLPTR 0#   endif#  else#   define YY_NULLPTR ((void*)0)#  endif# endif /* Use api.header.include to #include this header   instead of duplicating it here.  */#ifndef YY_YY_ARPARSE_H_INCLUDED# define YY_YY_ARPARSE_H_INCLUDED/* Debug traces.  */#ifndef YYDEBUG# define YYDEBUG 0#endif#if YYDEBUGextern int yydebug;#endif /* Token kinds.  */#ifndef YYTOKENTYPE# define YYTOKENTYPE  enum yytokentype  {    YYEMPTY = -2,    YYEOF = 0,                     /* "end of file"  */    YYerror = 256,                 /* error  */    YYUNDEF = 257,                 /* "invalid token"  */    NEWLINE = 258,                 /* NEWLINE  */    VERBOSE = 259,                 /* VERBOSE  */    FILENAME = 260,                /* FILENAME  */    ADDLIB = 261,                  /* ADDLIB  */    LIST = 262,                    /* LIST  */    ADDMOD = 263,                  /* ADDMOD  */    CLEAR = 264,                   /* CLEAR  */    CREATE = 265,                  /* CREATE  */    DELETE = 266,                  /* DELETE  */    DIRECTORY = 267,               /* DIRECTORY  */    END = 268,                     /* END  */    EXTRACT = 269,                 /* EXTRACT  */    FULLDIR = 270,                 /* FULLDIR  */    HELP = 271,                    /* HELP  */    QUIT = 272,                    /* QUIT  */    REPLACE = 273,                 /* REPLACE  */    SAVE = 274,                    /* SAVE  */    OPEN = 275                     /* OPEN  */  };  typedef enum yytokentype yytoken_kind_t;#endif/* Token kinds.  */#define YYEMPTY -2#define YYEOF 0#define YYerror 256#define YYUNDEF 257#define NEWLINE 258#define VERBOSE 259#define FILENAME 260#define ADDLIB 261#define LIST 262#define ADDMOD 263#define CLEAR 264#define CREATE 265#define DELETE 266#define DIRECTORY 267#define END 268#define EXTRACT 269#define FULLDIR 270#define HELP 271#define QUIT 272#define REPLACE 273#define SAVE 274#define OPEN 275 /* Value type.  */#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLAREDunion YYSTYPE{#line 37 "arparse.y"   char *name;struct list *list ;  #line 206 "arparse.c" };typedef union YYSTYPE YYSTYPE;# define YYSTYPE_IS_TRIVIAL 1# define YYSTYPE_IS_DECLARED 1#endif  extern YYSTYPE yylval;  int yyparse (void);  #endif /* !YY_YY_ARPARSE_H_INCLUDED  *//* Symbol kind.  */enum yysymbol_kind_t{  YYSYMBOL_YYEMPTY = -2,  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */  YYSYMBOL_YYerror = 1,                    /* error  */  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */  YYSYMBOL_NEWLINE = 3,                    /* NEWLINE  */  YYSYMBOL_VERBOSE = 4,                    /* VERBOSE  */  YYSYMBOL_FILENAME = 5,                   /* FILENAME  */  YYSYMBOL_ADDLIB = 6,                     /* ADDLIB  */  YYSYMBOL_LIST = 7,                       /* LIST  */  YYSYMBOL_ADDMOD = 8,                     /* ADDMOD  */  YYSYMBOL_CLEAR = 9,                      /* CLEAR  */  YYSYMBOL_CREATE = 10,                    /* CREATE  */  YYSYMBOL_DELETE = 11,                    /* DELETE  */  YYSYMBOL_DIRECTORY = 12,                 /* DIRECTORY  */  YYSYMBOL_END = 13,                       /* END  */  YYSYMBOL_EXTRACT = 14,                   /* EXTRACT  */  YYSYMBOL_FULLDIR = 15,                   /* FULLDIR  */  YYSYMBOL_HELP = 16,                      /* HELP  */  YYSYMBOL_QUIT = 17,                      /* QUIT  */  YYSYMBOL_REPLACE = 18,                   /* REPLACE  */  YYSYMBOL_SAVE = 19,                      /* SAVE  */  YYSYMBOL_OPEN = 20,                      /* OPEN  */  YYSYMBOL_21_ = 21,                       /* '('  */  YYSYMBOL_22_ = 22,                       /* ')'  */  YYSYMBOL_23_ = 23,                       /* ','  */  YYSYMBOL_YYACCEPT = 24,                  /* $accept  */  YYSYMBOL_start = 25,                     /* start  */  YYSYMBOL_26_1 = 26,                      /* $@1  */  YYSYMBOL_session = 27,                   /* session  */  YYSYMBOL_command_line = 28,              /* command_line  */  YYSYMBOL_command = 29,                   /* command  */  YYSYMBOL_extract_command = 30,           /* extract_command  */  YYSYMBOL_replace_command = 31,           /* replace_command  */  YYSYMBOL_clear_command = 32,             /* clear_command  */  YYSYMBOL_delete_command = 33,            /* delete_command  */  YYSYMBOL_addmod_command = 34,            /* addmod_command  */  YYSYMBOL_list_command = 35,              /* list_command  */  YYSYMBOL_save_command = 36,              /* save_command  */  YYSYMBOL_open_command = 37,              /* open_command  */  YYSYMBOL_create_command = 38,            /* create_command  */  YYSYMBOL_addlib_command = 39,            /* addlib_command  */  YYSYMBOL_directory_command = 40,         /* directory_command  */  YYSYMBOL_optional_filename = 41,         /* optional_filename  */  YYSYMBOL_modulelist = 42,                /* modulelist  */  YYSYMBOL_modulename = 43,                /* modulename  */  YYSYMBOL_optcomma = 44,                  /* optcomma  */  YYSYMBOL_verbose_command = 45            /* verbose_command  */};typedef enum yysymbol_kind_t yysymbol_kind_t;    #ifdef short# undef short#endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure   <limits.h> and (if available) <stdint.h> are included   so that the code can choose integer types of a good width.  */ #ifndef __PTRDIFF_MAX__# include <limits.h> /* INFRINGES ON USER NAME SPACE */# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */#  define YY_STDINT_H# endif#endif /* Narrow types that promote to a signed type and that can represent a   signed or unsigned integer of at least N bits.  In tables they can   save space and decrease cache pressure.  Promoting to a signed type   helps avoid bugs in integer arithmetic.  */ #ifdef __INT_LEAST8_MAX__typedef __INT_LEAST8_TYPE__ yytype_int8;#elif defined YY_STDINT_Htypedef int_least8_t yytype_int8;#elsetypedef signed char yytype_int8;#endif #ifdef __INT_LEAST16_MAX__typedef __INT_LEAST16_TYPE__ yytype_int16;#elif defined YY_STDINT_Htypedef int_least16_t yytype_int16;#elsetypedef short yytype_int16;#endif /* Work around bug in HP-UX 11.23, which defines these macros   incorrectly for preprocessor constants.  This workaround can likely   be removed in 2023, as HPE has promised support for HP-UX 11.23   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */#ifdef __hpux# undef UINT_LEAST8_MAX# undef UINT_LEAST16_MAX# define UINT_LEAST8_MAX 255# define UINT_LEAST16_MAX 65535#endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__typedef __UINT_LEAST8_TYPE__ yytype_uint8;#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \       && UINT_LEAST8_MAX <= INT_MAX)typedef uint_least8_t yytype_uint8;#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAXtypedef unsigned char yytype_uint8;#elsetypedef short yytype_uint8;#endif #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__typedef __UINT_LEAST16_TYPE__ yytype_uint16;#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \       && UINT_LEAST16_MAX <= INT_MAX)typedef uint_least16_t yytype_uint16;#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAXtypedef unsigned short yytype_uint16;#elsetypedef int yytype_uint16;#endif #ifndef YYPTRDIFF_T# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__#  define YYPTRDIFF_T __PTRDIFF_TYPE__#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__# elif defined PTRDIFF_MAX#  ifndef ptrdiff_t#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */#  endif#  define YYPTRDIFF_T ptrdiff_t#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX# else#  define YYPTRDIFF_T long#  define YYPTRDIFF_MAXIMUM LONG_MAX# endif#endif #ifndef YYSIZE_T# ifdef __SIZE_TYPE__#  define YYSIZE_T __SIZE_TYPE__# elif defined size_t#  define YYSIZE_T size_t# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */#  define YYSIZE_T size_t# else#  define YYSIZE_T unsigned# endif#endif #define YYSIZE_MAXIMUM                                  \  YY_CAST (YYPTRDIFF_T,                                 \           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \            ? YYPTRDIFF_MAXIMUM                         \            : YY_CAST (YYSIZE_T, -1))) #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))  /* Stored state numbers (used for stacks). */typedef yytype_int8 yy_state_t; /* State numbers in computations.  */typedef int yy_state_fast_t; #ifndef YY_# if defined YYENABLE_NLS && YYENABLE_NLS#  if ENABLE_NLS#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)#  endif# endif# ifndef YY_#  define YY_(Msgid) Msgid# endif#endif  #ifndef YY_ATTRIBUTE_PURE# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))# else#  define YY_ATTRIBUTE_PURE# endif#endif #ifndef YY_ATTRIBUTE_UNUSED# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))# else#  define YY_ATTRIBUTE_UNUSED# endif#endif /* Suppress unused-variable warnings by "using" E.  */#if ! defined lint || defined __GNUC__# define YY_USE(E) ((void) (E))#else# define YY_USE(E) /* empty */#endif /* Suppress an incorrect diagnostic about yylval being uninitialized.  */#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__# if __GNUC__ * 100 + __GNUC_MINOR__ < 407#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \    _Pragma ("GCC diagnostic push")                                     \    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")# else#  define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                           \    _Pragma ("GCC diagnostic push")                                     \    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")# endif# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \    _Pragma ("GCC diagnostic pop")#else# define YY_INITIAL_VALUE(Value) Value#endif#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN# define YY_IGNORE_MAYBE_UNINITIALIZED_END#endif#ifndef YY_INITIAL_VALUE# define YY_INITIAL_VALUE(Value) /* Nothing. */#endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__# define YY_IGNORE_USELESS_CAST_BEGIN                          \    _Pragma ("GCC diagnostic push")                            \    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")# define YY_IGNORE_USELESS_CAST_END            \    _Pragma ("GCC diagnostic pop")#endif#ifndef YY_IGNORE_USELESS_CAST_BEGIN# define YY_IGNORE_USELESS_CAST_BEGIN# define YY_IGNORE_USELESS_CAST_END#endif  #define YY_ASSERT(E) ((void) (0 && (E))) #if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols.  */ # ifdef YYSTACK_USE_ALLOCA#  if YYSTACK_USE_ALLOCA#   ifdef __GNUC__#    define YYSTACK_ALLOC __builtin_alloca#   elif defined __BUILTIN_VA_ARG_INCR#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */#   elif defined _AIX#    define YYSTACK_ALLOC __alloca#   elif defined _MSC_VER#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */#    define alloca _alloca#   else#    define YYSTACK_ALLOC alloca#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */#     ifndef EXIT_SUCCESS#      define EXIT_SUCCESS 0#     endif#    endif#   endif#  endif# endif # ifdef YYSTACK_ALLOC   /* Pacify GCC's 'empty if-body' warning.  */#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)#  ifndef YYSTACK_ALLOC_MAXIMUM    /* The OS might guarantee only one guard page at the bottom of the stack,

Lines 1–500 of 1597.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t