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