1/* A Bison parser, made by GNU Bison 3.0.  */
2
3/* Bison implementation for Yacc-like parsers in C
4
5   Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6
7   This program is free software: you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20/* As a special exception, you may create a larger work that contains
21   part or all of the Bison parser skeleton and distribute that work
22   under terms of your choice, so long as that work isn't itself a
23   parser generator using the skeleton or a modified version thereof
24   as a parser skeleton.  Alternatively, if you modify or redistribute
25   the parser skeleton itself, you may (at your option) remove this
26   special exception, which will cause the skeleton and the resulting
27   Bison output files to be licensed under the GNU General Public
28   License without this special exception.
29
30   This special exception was added by the Free Software Foundation in
31   version 2.2 of Bison.  */
32
33/* C LALR(1) parser skeleton written by Richard Stallman, by
34   simplifying the original so-called "semantic" parser.  */
35
36/* All symbols defined below should begin with yy or YY, to avoid
37   infringing on user name space.  This should be done even for local
38   variables, as they might otherwise be expanded by user macros.
39   There are some unavoidable exceptions within include files to
40   define necessary library symbols; they are noted "INFRINGES ON
41   USER NAME SPACE" below.  */
42
43/* Identify Bison output.  */
44#define YYBISON 1
45
46/* Bison version.  */
47#define YYBISON_VERSION "3.0"
48
49/* Skeleton name.  */
50#define YYSKELETON_NAME "yacc.c"
51
52/* Pure parsers.  */
53#define YYPURE 0
54
55/* Push parsers.  */
56#define YYPUSH 0
57
58/* Pull parsers.  */
59#define YYPULL 1
60
61
62
63
64/* Copy the first part of user declarations.  */
65#line 1 "arparse.y" /* yacc.c:339  */
66
67/* arparse.y - Strange script language parser */
68
69/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
70
71   This file is part of GNU Binutils.
72
73   This program is free software; you can redistribute it and/or modify
74   it under the terms of the GNU General Public License as published by
75   the Free Software Foundation; either version 3 of the License, or
76   (at your option) any later version.
77
78   This program is distributed in the hope that it will be useful,
79   but WITHOUT ANY WARRANTY; without even the implied warranty of
80   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
81   GNU General Public License for more details.
82
83   You should have received a copy of the GNU General Public License
84   along with this program; if not, write to the Free Software
85   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
86   MA 02110-1301, USA.  */
87
88
89/* Contributed by Steve Chamberlain
90   		  sac@cygnus.com
91
92*/
93#define DONTDECLARE_MALLOC
94#include "sysdep.h"
95#include "bfd.h"
96#include "arsup.h"
97extern int verbose;
98extern int yylex (void);
99static int yyerror (const char *);
100
101#line 102 "arparse.c" /* yacc.c:339  */
102
103# ifndef YY_NULL
104#  if defined __cplusplus && 201103L <= __cplusplus
105#   define YY_NULL nullptr
106#  else
107#   define YY_NULL 0
108#  endif
109# endif
110
111/* Enabling verbose error messages.  */
112#ifdef YYERROR_VERBOSE
113# undef YYERROR_VERBOSE
114# define YYERROR_VERBOSE 1
115#else
116# define YYERROR_VERBOSE 0
117#endif
118
119/* In a future release of Bison, this section will be replaced
120   by #include "y.tab.h".  */
121#ifndef YY_YY_ARPARSE_H_INCLUDED
122# define YY_YY_ARPARSE_H_INCLUDED
123/* Debug traces.  */
124#ifndef YYDEBUG
125# define YYDEBUG 0
126#endif
127#if YYDEBUG
128extern int yydebug;
129#endif
130
131/* Token type.  */
132#ifndef YYTOKENTYPE
133# define YYTOKENTYPE
134  enum yytokentype
135  {
136    NEWLINE = 258,
137    VERBOSE = 259,
138    FILENAME = 260,
139    ADDLIB = 261,
140    LIST = 262,
141    ADDMOD = 263,
142    CLEAR = 264,
143    CREATE = 265,
144    DELETE = 266,
145    DIRECTORY = 267,
146    END = 268,
147    EXTRACT = 269,
148    FULLDIR = 270,
149    HELP = 271,
150    QUIT = 272,
151    REPLACE = 273,
152    SAVE = 274,
153    OPEN = 275
154  };
155#endif
156/* Tokens.  */
157#define NEWLINE 258
158#define VERBOSE 259
159#define FILENAME 260
160#define ADDLIB 261
161#define LIST 262
162#define ADDMOD 263
163#define CLEAR 264
164#define CREATE 265
165#define DELETE 266
166#define DIRECTORY 267
167#define END 268
168#define EXTRACT 269
169#define FULLDIR 270
170#define HELP 271
171#define QUIT 272
172#define REPLACE 273
173#define SAVE 274
174#define OPEN 275
175
176/* Value type.  */
177#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
178typedef union YYSTYPE YYSTYPE;
179union YYSTYPE
180{
181#line 37 "arparse.y" /* yacc.c:355  */
182
183  char *name;
184struct list *list ;
185
186
187#line 188 "arparse.c" /* yacc.c:355  */
188};
189# define YYSTYPE_IS_TRIVIAL 1
190# define YYSTYPE_IS_DECLARED 1
191#endif
192
193
194extern YYSTYPE yylval;
195
196int yyparse (void);
197
198#endif /* !YY_YY_ARPARSE_H_INCLUDED  */
199
200/* Copy the second part of user declarations.  */
201
202#line 203 "arparse.c" /* yacc.c:358  */
203
204#ifdef short
205# undef short
206#endif
207
208#ifdef YYTYPE_UINT8
209typedef YYTYPE_UINT8 yytype_uint8;
210#else
211typedef unsigned char yytype_uint8;
212#endif
213
214#ifdef YYTYPE_INT8
215typedef YYTYPE_INT8 yytype_int8;
216#else
217typedef signed char yytype_int8;
218#endif
219
220#ifdef YYTYPE_UINT16
221typedef YYTYPE_UINT16 yytype_uint16;
222#else
223typedef unsigned short int yytype_uint16;
224#endif
225
226#ifdef YYTYPE_INT16
227typedef YYTYPE_INT16 yytype_int16;
228#else
229typedef short int yytype_int16;
230#endif
231
232#ifndef YYSIZE_T
233# ifdef __SIZE_TYPE__
234#  define YYSIZE_T __SIZE_TYPE__
235# elif defined size_t
236#  define YYSIZE_T size_t
237# elif ! defined YYSIZE_T
238#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
239#  define YYSIZE_T size_t
240# else
241#  define YYSIZE_T unsigned int
242# endif
243#endif
244
245#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
246
247#ifndef YY_
248# if defined YYENABLE_NLS && YYENABLE_NLS
249#  if ENABLE_NLS
250#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
251#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
252#  endif
253# endif
254# ifndef YY_
255#  define YY_(Msgid) Msgid
256# endif
257#endif
258
259#ifndef __attribute__
260/* This feature is available in gcc versions 2.5 and later.  */
261# if (! defined __GNUC__ || __GNUC__ < 2 \
262      || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
263#  define __attribute__(Spec) /* empty */
264# endif
265#endif
266
267/* Suppress unused-variable warnings by "using" E.  */
268#if ! defined lint || defined __GNUC__
269# define YYUSE(E) ((void) (E))
270#else
271# define YYUSE(E) /* empty */
272#endif
273
274#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
275/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
276# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
277    _Pragma ("GCC diagnostic push") \
278    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
279    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
280# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
281    _Pragma ("GCC diagnostic pop")
282#else
283# define YY_INITIAL_VALUE(Value) Value
284#endif
285#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
286# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
287# define YY_IGNORE_MAYBE_UNINITIALIZED_END
288#endif
289#ifndef YY_INITIAL_VALUE
290# define YY_INITIAL_VALUE(Value) /* Nothing. */
291#endif
292
293
294#if ! defined yyoverflow || YYERROR_VERBOSE
295
296/* The parser invokes alloca or malloc; define the necessary symbols.  */
297
298# ifdef YYSTACK_USE_ALLOCA
299#  if YYSTACK_USE_ALLOCA
300#   ifdef __GNUC__
301#    define YYSTACK_ALLOC __builtin_alloca
302#   elif defined __BUILTIN_VA_ARG_INCR
303#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
304#   elif defined _AIX
305#    define YYSTACK_ALLOC __alloca
306#   elif defined _MSC_VER
307#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
308#    define alloca _alloca
309#   else
310#    define YYSTACK_ALLOC alloca
311#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
312#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
313      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
314#     ifndef EXIT_SUCCESS
315#      define EXIT_SUCCESS 0
316#     endif
317#    endif
318#   endif
319#  endif
320# endif
321
322# ifdef YYSTACK_ALLOC
323   /* Pacify GCC's 'empty if-body' warning.  */
324#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
325#  ifndef YYSTACK_ALLOC_MAXIMUM
326    /* The OS might guarantee only one guard page at the bottom of the stack,
327       and a page size can be as small as 4096 bytes.  So we cannot safely
328       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
329       to allow for a few compiler-allocated temporary stack slots.  */
330#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
331#  endif
332# else
333#  define YYSTACK_ALLOC YYMALLOC
334#  define YYSTACK_FREE YYFREE
335#  ifndef YYSTACK_ALLOC_MAXIMUM
336#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
337#  endif
338#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
339       && ! ((defined YYMALLOC || defined malloc) \
340             && (defined YYFREE || defined free)))
341#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
342#   ifndef EXIT_SUCCESS
343#    define EXIT_SUCCESS 0
344#   endif
345#  endif
346#  ifndef YYMALLOC
347#   define YYMALLOC malloc
348#   if ! defined malloc && ! defined EXIT_SUCCESS
349void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
350#   endif
351#  endif
352#  ifndef YYFREE
353#   define YYFREE free
354#   if ! defined free && ! defined EXIT_SUCCESS
355void free (void *); /* INFRINGES ON USER NAME SPACE */
356#   endif
357#  endif
358# endif
359#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
360
361
362#if (! defined yyoverflow \
363     && (! defined __cplusplus \
364         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
365
366/* A type that is properly aligned for any stack member.  */
367union yyalloc
368{
369  yytype_int16 yyss_alloc;
370  YYSTYPE yyvs_alloc;
371};
372
373/* The size of the maximum gap between one aligned stack and the next.  */
374# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
375
376/* The size of an array large to enough to hold all stacks, each with
377   N elements.  */
378# define YYSTACK_BYTES(N) \
379     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
380      + YYSTACK_GAP_MAXIMUM)
381
382# define YYCOPY_NEEDED 1
383
384/* Relocate STACK from its old location to the new one.  The
385   local variables YYSIZE and YYSTACKSIZE give the old and new number of
386   elements in the stack, and YYPTR gives the new location of the
387   stack.  Advance YYPTR to a properly aligned location for the next
388   stack.  */
389# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
390    do                                                                  \
391      {                                                                 \
392        YYSIZE_T yynewbytes;                                            \
393        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
394        Stack = &yyptr->Stack_alloc;                                    \
395        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
396        yyptr += yynewbytes / sizeof (*yyptr);                          \
397      }                                                                 \
398    while (0)
399
400#endif
401
402#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
403/* Copy COUNT objects from SRC to DST.  The source and destination do
404   not overlap.  */
405# ifndef YYCOPY
406#  if defined __GNUC__ && 1 < __GNUC__
407#   define YYCOPY(Dst, Src, Count) \
408      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
409#  else
410#   define YYCOPY(Dst, Src, Count)              \
411      do                                        \
412        {                                       \
413          YYSIZE_T yyi;                         \
414          for (yyi = 0; yyi < (Count); yyi++)   \
415            (Dst)[yyi] = (Src)[yyi];            \
416        }                                       \
417      while (0)
418#  endif
419# endif
420#endif /* !YYCOPY_NEEDED */
421
422/* YYFINAL -- State number of the termination state.  */
423#define YYFINAL  3
424/* YYLAST -- Last index in YYTABLE.  */
425#define YYLAST   34
426
427/* YYNTOKENS -- Number of terminals.  */
428#define YYNTOKENS  24
429/* YYNNTS -- Number of nonterminals.  */
430#define YYNNTS  22
431/* YYNRULES -- Number of rules.  */
432#define YYNRULES  42
433/* YYNSTATES -- Number of states.  */
434#define YYNSTATES  53
435
436/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
437   by yylex, with out-of-bounds checking.  */
438#define YYUNDEFTOK  2
439#define YYMAXUTOK   275
440
441#define YYTRANSLATE(YYX)                                                \
442  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
443
444/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
445   as returned by yylex, without out-of-bounds checking.  */
446static const yytype_uint8 yytranslate[] =
447{
448       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
449       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
450       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
451       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
452      21,    22,     2,     2,    23,     2,     2,     2,     2,     2,
453       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
454       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
455       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
456       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
457       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
458       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
459       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
460       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
461       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
462       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
463       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
464       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
465       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
466       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
467       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
468       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
469       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
470       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
471       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
472       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
474       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
475      15,    16,    17,    18,    19,    20
476};
477
478#if YYDEBUG
479  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
480static const yytype_uint8 yyrline[] =
481{
482       0,    68,    68,    68,    72,    73,    77,    81,    82,    83,
483      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
484      94,    95,    96,   101,   106,   111,   116,   120,   125,   130,
485     137,   142,   148,   152,   159,   161,   165,   168,   172,   178,
486     183,   184,   189
487};
488#endif
489
490#if YYDEBUG || YYERROR_VERBOSE || 0
491/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
492   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
493static const char *const yytname[] =
494{
495  "$end", "error", "$undefined", "NEWLINE", "VERBOSE", "FILENAME",
496  "ADDLIB", "LIST", "ADDMOD", "CLEAR", "CREATE", "DELETE", "DIRECTORY",
497  "END", "EXTRACT", "FULLDIR", "HELP", "QUIT", "REPLACE", "SAVE", "OPEN",
498  "'('", "')'", "','", "$accept", "start", "$@1", "session",
499  "command_line", "command", "extract_command", "replace_command",
500  "clear_command", "delete_command", "addmod_command", "list_command",
501  "save_command", "open_command", "create_command", "addlib_command",
502  "directory_command", "optional_filename", "modulelist", "modulename",
503  "optcomma", "verbose_command", YY_NULL
504};
505#endif
506
507# ifdef YYPRINT
508/* YYTOKNUM[NUM] -- (External) token number corresponding to the
509   (internal) symbol number NUM (which must be that of a token).  */
510static const yytype_uint16 yytoknum[] =
511{
512       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
513     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
514     275,    40,    41,    44
515};
516# endif
517
518#define YYPACT_NINF -14
519
520#define yypact_value_is_default(Yystate) \
521  (!!((Yystate) == (-14)))
522
523#define YYTABLE_NINF -42
524
525#define yytable_value_is_error(Yytable_value) \
526  0
527
528  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
529     STATE-NUM.  */
530static const yytype_int8 yypact[] =
531{
532     -14,     1,   -14,   -14,     5,   -14,   -14,   -14,     2,   -14,
533     -14,   -14,    21,   -14,    22,   -14,   -14,   -14,   -14,    23,
534     -14,    26,   -14,   -14,   -14,   -14,   -14,   -14,   -14,   -14,
535     -14,   -14,   -14,   -14,    10,    -3,   -14,    -3,    10,    -3,
536      -3,   -14,   -14,   -14,   -14,   -14,    27,    28,    -1,   -14,
537     -14,   -14,   -14
538};
539
540  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
541     Performed when YYTABLE does not specify something else to do.  Zero
542     means the default is an error.  */
543static const yytype_uint8 yydefact[] =
544{
545       2,     0,     5,     1,     0,    20,    42,    21,     0,    28,
546      39,    25,     0,    39,     0,    19,    39,    39,    29,     0,
547       4,     0,    15,    16,    12,    17,    13,    18,    14,     7,
548       8,    11,    10,     9,    37,    27,    31,    26,    37,    23,
549      24,    30,     6,    39,    32,    40,     0,    35,    41,    38,
550      34,    33,    36
551};
552
553  /* YYPGOTO[NTERM-NUM].  */
554static const yytype_int8 yypgoto[] =
555{
556     -14,   -14,   -14,   -14,   -14,   -14,   -14,   -14,   -14,   -14,
557     -14,   -14,   -14,   -14,   -14,   -14,   -14,   -14,    -4,   -13,
558     -14,   -14
559};
560
561  /* YYDEFGOTO[NTERM-NUM].  */
562static const yytype_int8 yydefgoto[] =
563{
564      -1,     1,     2,     4,    20,    21,    22,    23,    24,    25,
565      26,    27,    28,    29,    30,    31,    32,    51,    44,    35,
566      46,    33
567};
568
569  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
570     positive, shift that token.  If negative, reduce the rule whose
571     number is the opposite.  If YYTABLE_NINF, syntax error.  */
572static const yytype_int8 yytable[] =
573{
574      37,     3,   -41,    39,    40,    -3,     5,    34,   -22,     6,
575       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
576      45,    52,    45,    17,    18,    19,    36,    38,    41,    42,
577      48,    43,    49,    50,    47
578};
579
580static const yytype_uint8 yycheck[] =
581{
582      13,     0,     5,    16,    17,     0,     1,     5,     3,     4,
583       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
584      23,    22,    23,    18,    19,    20,     5,     5,     5,     3,
585      43,    21,     5,     5,    38
586};
587
588  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
589     symbol of state STATE-NUM.  */
590static const yytype_uint8 yystos[] =
591{
592       0,    25,    26,     0,    27,     1,     4,     5,     6,     7,
593       8,     9,    10,    11,    12,    13,    14,    18,    19,    20,
594      28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
595      38,    39,    40,    45,     5,    43,     5,    43,     5,    43,
596      43,     5,     3,    21,    42,    23,    44,    42,    43,     5,
597       5,    41,    22
598};
599
600  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
601static const yytype_uint8 yyr1[] =
602{
603       0,    24,    26,    25,    27,    27,    28,    29,    29,    29,
604      29,    29,    29,    29,    29,    29,    29,    29,    29,    29,
605      29,    29,    29,    30,    31,    32,    33,    34,    35,    36,
606      37,    38,    39,    40,    41,    41,    42,    42,    43,    43,
607      44,    44,    45
608};
609
610  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
611static const yytype_uint8 yyr2[] =
612{
613       0,     2,     0,     2,     2,     0,     2,     1,     1,     1,
614       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
615       1,     1,     0,     2,     2,     1,     2,     2,     1,     1,
616       2,     2,     3,     4,     1,     0,     3,     0,     3,     0,
617       1,     0,     1
618};
619
620
621#define yyerrok         (yyerrstatus = 0)
622#define yyclearin       (yychar = YYEMPTY)
623#define YYEMPTY         (-2)
624#define YYEOF           0
625
626#define YYACCEPT        goto yyacceptlab
627#define YYABORT         goto yyabortlab
628#define YYERROR         goto yyerrorlab
629
630
631#define YYRECOVERING()  (!!yyerrstatus)
632
633#define YYBACKUP(Token, Value)                                  \
634do                                                              \
635  if (yychar == YYEMPTY)                                        \
636    {                                                           \
637      yychar = (Token);                                         \
638      yylval = (Value);                                         \
639      YYPOPSTACK (yylen);                                       \
640      yystate = *yyssp;                                         \
641      goto yybackup;                                            \
642    }                                                           \
643  else                                                          \
644    {                                                           \
645      yyerror (YY_("syntax error: cannot back up")); \
646      YYERROR;                                                  \
647    }                                                           \
648while (0)
649
650/* Error token number */
651#define YYTERROR        1
652#define YYERRCODE       256
653
654
655
656/* Enable debugging if requested.  */
657#if YYDEBUG
658
659# ifndef YYFPRINTF
660#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
661#  define YYFPRINTF fprintf
662# endif
663
664# define YYDPRINTF(Args)                        \
665do {                                            \
666  if (yydebug)                                  \
667    YYFPRINTF Args;                             \
668} while (0)
669
670/* This macro is provided for backward compatibility. */
671#ifndef YY_LOCATION_PRINT
672# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
673#endif
674
675
676# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
677do {                                                                      \
678  if (yydebug)                                                            \
679    {                                                                     \
680      YYFPRINTF (stderr, "%s ", Title);                                   \
681      yy_symbol_print (stderr,                                            \
682                  Type, Value); \
683      YYFPRINTF (stderr, "\n");                                           \
684    }                                                                     \
685} while (0)
686
687
688/*----------------------------------------.
689| Print this symbol's value on YYOUTPUT.  |
690`----------------------------------------*/
691
692static void
693yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
694{
695  FILE *yyo = yyoutput;
696  YYUSE (yyo);
697  if (!yyvaluep)
698    return;
699# ifdef YYPRINT
700  if (yytype < YYNTOKENS)
701    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
702# endif
703  YYUSE (yytype);
704}
705
706
707/*--------------------------------.
708| Print this symbol on YYOUTPUT.  |
709`--------------------------------*/
710
711static void
712yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
713{
714  YYFPRINTF (yyoutput, "%s %s (",
715             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
716
717  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
718  YYFPRINTF (yyoutput, ")");
719}
720
721/*------------------------------------------------------------------.
722| yy_stack_print -- Print the state stack from its BOTTOM up to its |
723| TOP (included).                                                   |
724`------------------------------------------------------------------*/
725
726static void
727yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
728{
729  YYFPRINTF (stderr, "Stack now");
730  for (; yybottom <= yytop; yybottom++)
731    {
732      int yybot = *yybottom;
733      YYFPRINTF (stderr, " %d", yybot);
734    }
735  YYFPRINTF (stderr, "\n");
736}
737
738# define YY_STACK_PRINT(Bottom, Top)                            \
739do {                                                            \
740  if (yydebug)                                                  \
741    yy_stack_print ((Bottom), (Top));                           \
742} while (0)
743
744
745/*------------------------------------------------.
746| Report that the YYRULE is going to be reduced.  |
747`------------------------------------------------*/
748
749static void
750yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
751{
752  unsigned long int yylno = yyrline[yyrule];
753  int yynrhs = yyr2[yyrule];
754  int yyi;
755  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
756             yyrule - 1, yylno);
757  /* The symbols being reduced.  */
758  for (yyi = 0; yyi < yynrhs; yyi++)
759    {
760      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
761      yy_symbol_print (stderr,
762                       yystos[yyssp[yyi + 1 - yynrhs]],
763                       &(yyvsp[(yyi + 1) - (yynrhs)])
764                                              );
765      YYFPRINTF (stderr, "\n");
766    }
767}
768
769# define YY_REDUCE_PRINT(Rule)          \
770do {                                    \
771  if (yydebug)                          \
772    yy_reduce_print (yyssp, yyvsp, Rule); \
773} while (0)
774
775/* Nonzero means print parse trace.  It is left uninitialized so that
776   multiple parsers can coexist.  */
777int yydebug;
778#else /* !YYDEBUG */
779# define YYDPRINTF(Args)
780# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
781# define YY_STACK_PRINT(Bottom, Top)
782# define YY_REDUCE_PRINT(Rule)
783#endif /* !YYDEBUG */
784
785
786/* YYINITDEPTH -- initial size of the parser's stacks.  */
787#ifndef YYINITDEPTH
788# define YYINITDEPTH 200
789#endif
790
791/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
792   if the built-in stack extension method is used).
793
794   Do not make this value too large; the results are undefined if
795   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
796   evaluated with infinite-precision integer arithmetic.  */
797
798#ifndef YYMAXDEPTH
799# define YYMAXDEPTH 10000
800#endif
801
802
803#if YYERROR_VERBOSE
804
805# ifndef yystrlen
806#  if defined __GLIBC__ && defined _STRING_H
807#   define yystrlen strlen
808#  else
809/* Return the length of YYSTR.  */
810static YYSIZE_T
811yystrlen (const char *yystr)
812{
813  YYSIZE_T yylen;
814  for (yylen = 0; yystr[yylen]; yylen++)
815    continue;
816  return yylen;
817}
818#  endif
819# endif
820
821# ifndef yystpcpy
822#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
823#   define yystpcpy stpcpy
824#  else
825/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
826   YYDEST.  */
827static char *
828yystpcpy (char *yydest, const char *yysrc)
829{
830  char *yyd = yydest;
831  const char *yys = yysrc;
832
833  while ((*yyd++ = *yys++) != '\0')
834    continue;
835
836  return yyd - 1;
837}
838#  endif
839# endif
840
841# ifndef yytnamerr
842/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
843   quotes and backslashes, so that it's suitable for yyerror.  The
844   heuristic is that double-quoting is unnecessary unless the string
845   contains an apostrophe, a comma, or backslash (other than
846   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
847   null, do not copy; instead, return the length of what the result
848   would have been.  */
849static YYSIZE_T
850yytnamerr (char *yyres, const char *yystr)
851{
852  if (*yystr == '"')
853    {
854      YYSIZE_T yyn = 0;
855      char const *yyp = yystr;
856
857      for (;;)
858        switch (*++yyp)
859          {
860          case '\'':
861          case ',':
862            goto do_not_strip_quotes;
863
864          case '\\':
865            if (*++yyp != '\\')
866              goto do_not_strip_quotes;
867            /* Fall through.  */
868          default:
869            if (yyres)
870              yyres[yyn] = *yyp;
871            yyn++;
872            break;
873
874          case '"':
875            if (yyres)
876              yyres[yyn] = '\0';
877            return yyn;
878          }
879    do_not_strip_quotes: ;
880    }
881
882  if (! yyres)
883    return yystrlen (yystr);
884
885  return yystpcpy (yyres, yystr) - yyres;
886}
887# endif
888
889/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
890   about the unexpected token YYTOKEN for the state stack whose top is
891   YYSSP.
892
893   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
894   not large enough to hold the message.  In that case, also set
895   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
896   required number of bytes is too large to store.  */
897static int
898yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
899                yytype_int16 *yyssp, int yytoken)
900{
901  YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
902  YYSIZE_T yysize = yysize0;
903  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
904  /* Internationalized format string. */
905  const char *yyformat = YY_NULL;
906  /* Arguments of yyformat. */
907  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
908  /* Number of reported tokens (one for the "unexpected", one per
909     "expected"). */
910  int yycount = 0;
911
912  /* There are many possibilities here to consider:
913     - If this state is a consistent state with a default action, then
914       the only way this function was invoked is if the default action
915       is an error action.  In that case, don't check for expected
916       tokens because there are none.
917     - The only way there can be no lookahead present (in yychar) is if
918       this state is a consistent state with a default action.  Thus,
919       detecting the absence of a lookahead is sufficient to determine
920       that there is no unexpected or expected token to report.  In that
921       case, just report a simple "syntax error".
922     - Don't assume there isn't a lookahead just because this state is a
923       consistent state with a default action.  There might have been a
924       previous inconsistent state, consistent state with a non-default
925       action, or user semantic action that manipulated yychar.
926     - Of course, the expected token list depends on states to have
927       correct lookahead information, and it depends on the parser not
928       to perform extra reductions after fetching a lookahead from the
929       scanner and before detecting a syntax error.  Thus, state merging
930       (from LALR or IELR) and default reductions corrupt the expected
931       token list.  However, the list is correct for canonical LR with
932       one exception: it will still contain any token that will not be
933       accepted due to an error action in a later state.
934  */
935  if (yytoken != YYEMPTY)
936    {
937      int yyn = yypact[*yyssp];
938      yyarg[yycount++] = yytname[yytoken];
939      if (!yypact_value_is_default (yyn))
940        {
941          /* Start YYX at -YYN if negative to avoid negative indexes in
942             YYCHECK.  In other words, skip the first -YYN actions for
943             this state because they are default actions.  */
944          int yyxbegin = yyn < 0 ? -yyn : 0;
945          /* Stay within bounds of both yycheck and yytname.  */
946          int yychecklim = YYLAST - yyn + 1;
947          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
948          int yyx;
949
950          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
951            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
952                && !yytable_value_is_error (yytable[yyx + yyn]))
953              {
954                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
955                  {
956                    yycount = 1;
957                    yysize = yysize0;
958                    break;
959                  }
960                yyarg[yycount++] = yytname[yyx];
961                {
962                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
963                  if (! (yysize <= yysize1
964                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
965                    return 2;
966                  yysize = yysize1;
967                }
968              }
969        }
970    }
971
972  switch (yycount)
973    {
974# define YYCASE_(N, S)                      \
975      case N:                               \
976        yyformat = S;                       \
977      break
978      YYCASE_(0, YY_("syntax error"));
979      YYCASE_(1, YY_("syntax error, unexpected %s"));
980      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
981      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
982      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
983      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
984# undef YYCASE_
985    }
986
987  {
988    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
989    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
990      return 2;
991    yysize = yysize1;
992  }
993
994  if (*yymsg_alloc < yysize)
995    {
996      *yymsg_alloc = 2 * yysize;
997      if (! (yysize <= *yymsg_alloc
998             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
999        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1000      return 1;
1001    }
1002
1003  /* Avoid sprintf, as that infringes on the user's name space.
1004     Don't have undefined behavior even if the translation
1005     produced a string with the wrong number of "%s"s.  */
1006  {
1007    char *yyp = *yymsg;
1008    int yyi = 0;
1009    while ((*yyp = *yyformat) != '\0')
1010      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1011        {
1012          yyp += yytnamerr (yyp, yyarg[yyi++]);
1013          yyformat += 2;
1014        }
1015      else
1016        {
1017          yyp++;
1018          yyformat++;
1019        }
1020  }
1021  return 0;
1022}
1023#endif /* YYERROR_VERBOSE */
1024
1025/*-----------------------------------------------.
1026| Release the memory associated to this symbol.  |
1027`-----------------------------------------------*/
1028
1029static void
1030yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1031{
1032  YYUSE (yyvaluep);
1033  if (!yymsg)
1034    yymsg = "Deleting";
1035  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1036
1037  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1038  YYUSE (yytype);
1039  YY_IGNORE_MAYBE_UNINITIALIZED_END
1040}
1041
1042
1043
1044
1045/* The lookahead symbol.  */
1046int yychar;
1047
1048/* The semantic value of the lookahead symbol.  */
1049YYSTYPE yylval;
1050/* Number of syntax errors so far.  */
1051int yynerrs;
1052
1053
1054/*----------.
1055| yyparse.  |
1056`----------*/
1057
1058int
1059yyparse (void)
1060{
1061    int yystate;
1062    /* Number of tokens to shift before error messages enabled.  */
1063    int yyerrstatus;
1064
1065    /* The stacks and their tools:
1066       'yyss': related to states.
1067       'yyvs': related to semantic values.
1068
1069       Refer to the stacks through separate pointers, to allow yyoverflow
1070       to reallocate them elsewhere.  */
1071
1072    /* The state stack.  */
1073    yytype_int16 yyssa[YYINITDEPTH];
1074    yytype_int16 *yyss;
1075    yytype_int16 *yyssp;
1076
1077    /* The semantic value stack.  */
1078    YYSTYPE yyvsa[YYINITDEPTH];
1079    YYSTYPE *yyvs;
1080    YYSTYPE *yyvsp;
1081
1082    YYSIZE_T yystacksize;
1083
1084  int yyn;
1085  int yyresult;
1086  /* Lookahead token as an internal (translated) token number.  */
1087  int yytoken = 0;
1088  /* The variables used to return semantic value and location from the
1089     action routines.  */
1090  YYSTYPE yyval;
1091
1092#if YYERROR_VERBOSE
1093  /* Buffer for error messages, and its allocated size.  */
1094  char yymsgbuf[128];
1095  char *yymsg = yymsgbuf;
1096  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1097#endif
1098
1099#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1100
1101  /* The number of symbols on the RHS of the reduced rule.
1102     Keep to zero when no symbol should be popped.  */
1103  int yylen = 0;
1104
1105  yyssp = yyss = yyssa;
1106  yyvsp = yyvs = yyvsa;
1107  yystacksize = YYINITDEPTH;
1108
1109  YYDPRINTF ((stderr, "Starting parse\n"));
1110
1111  yystate = 0;
1112  yyerrstatus = 0;
1113  yynerrs = 0;
1114  yychar = YYEMPTY; /* Cause a token to be read.  */
1115  goto yysetstate;
1116
1117/*------------------------------------------------------------.
1118| yynewstate -- Push a new state, which is found in yystate.  |
1119`------------------------------------------------------------*/
1120 yynewstate:
1121  /* In all cases, when you get here, the value and location stacks
1122     have just been pushed.  So pushing a state here evens the stacks.  */
1123  yyssp++;
1124
1125 yysetstate:
1126  *yyssp = yystate;
1127
1128  if (yyss + yystacksize - 1 <= yyssp)
1129    {
1130      /* Get the current used size of the three stacks, in elements.  */
1131      YYSIZE_T yysize = yyssp - yyss + 1;
1132
1133#ifdef yyoverflow
1134      {
1135        /* Give user a chance to reallocate the stack.  Use copies of
1136           these so that the &'s don't force the real ones into
1137           memory.  */
1138        YYSTYPE *yyvs1 = yyvs;
1139        yytype_int16 *yyss1 = yyss;
1140
1141        /* Each stack pointer address is followed by the size of the
1142           data in use in that stack, in bytes.  This used to be a
1143           conditional around just the two extra args, but that might
1144           be undefined if yyoverflow is a macro.  */
1145        yyoverflow (YY_("memory exhausted"),
1146                    &yyss1, yysize * sizeof (*yyssp),
1147                    &yyvs1, yysize * sizeof (*yyvsp),
1148                    &yystacksize);
1149
1150        yyss = yyss1;
1151        yyvs = yyvs1;
1152      }
1153#else /* no yyoverflow */
1154# ifndef YYSTACK_RELOCATE
1155      goto yyexhaustedlab;
1156# else
1157      /* Extend the stack our own way.  */
1158      if (YYMAXDEPTH <= yystacksize)
1159        goto yyexhaustedlab;
1160      yystacksize *= 2;
1161      if (YYMAXDEPTH < yystacksize)
1162        yystacksize = YYMAXDEPTH;
1163
1164      {
1165        yytype_int16 *yyss1 = yyss;
1166        union yyalloc *yyptr =
1167          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1168        if (! yyptr)
1169          goto yyexhaustedlab;
1170        YYSTACK_RELOCATE (yyss_alloc, yyss);
1171        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1172#  undef YYSTACK_RELOCATE
1173        if (yyss1 != yyssa)
1174          YYSTACK_FREE (yyss1);
1175      }
1176# endif
1177#endif /* no yyoverflow */
1178
1179      yyssp = yyss + yysize - 1;
1180      yyvsp = yyvs + yysize - 1;
1181
1182      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1183                  (unsigned long int) yystacksize));
1184
1185      if (yyss + yystacksize - 1 <= yyssp)
1186        YYABORT;
1187    }
1188
1189  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1190
1191  if (yystate == YYFINAL)
1192    YYACCEPT;
1193
1194  goto yybackup;
1195
1196/*-----------.
1197| yybackup.  |
1198`-----------*/
1199yybackup:
1200
1201  /* Do appropriate processing given the current state.  Read a
1202     lookahead token if we need one and don't already have one.  */
1203
1204  /* First try to decide what to do without reference to lookahead token.  */
1205  yyn = yypact[yystate];
1206  if (yypact_value_is_default (yyn))
1207    goto yydefault;
1208
1209  /* Not known => get a lookahead token if don't already have one.  */
1210
1211  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1212  if (yychar == YYEMPTY)
1213    {
1214      YYDPRINTF ((stderr, "Reading a token: "));
1215      yychar = yylex ();
1216    }
1217
1218  if (yychar <= YYEOF)
1219    {
1220      yychar = yytoken = YYEOF;
1221      YYDPRINTF ((stderr, "Now at end of input.\n"));
1222    }
1223  else
1224    {
1225      yytoken = YYTRANSLATE (yychar);
1226      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1227    }
1228
1229  /* If the proper action on seeing token YYTOKEN is to reduce or to
1230     detect an error, take that action.  */
1231  yyn += yytoken;
1232  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1233    goto yydefault;
1234  yyn = yytable[yyn];
1235  if (yyn <= 0)
1236    {
1237      if (yytable_value_is_error (yyn))
1238        goto yyerrlab;
1239      yyn = -yyn;
1240      goto yyreduce;
1241    }
1242
1243  /* Count tokens shifted since error; after three, turn off error
1244     status.  */
1245  if (yyerrstatus)
1246    yyerrstatus--;
1247
1248  /* Shift the lookahead token.  */
1249  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1250
1251  /* Discard the shifted token.  */
1252  yychar = YYEMPTY;
1253
1254  yystate = yyn;
1255  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1256  *++yyvsp = yylval;
1257  YY_IGNORE_MAYBE_UNINITIALIZED_END
1258
1259  goto yynewstate;
1260
1261
1262/*-----------------------------------------------------------.
1263| yydefault -- do the default action for the current state.  |
1264`-----------------------------------------------------------*/
1265yydefault:
1266  yyn = yydefact[yystate];
1267  if (yyn == 0)
1268    goto yyerrlab;
1269  goto yyreduce;
1270
1271
1272/*-----------------------------.
1273| yyreduce -- Do a reduction.  |
1274`-----------------------------*/
1275yyreduce:
1276  /* yyn is the number of a rule to reduce with.  */
1277  yylen = yyr2[yyn];
1278
1279  /* If YYLEN is nonzero, implement the default value of the action:
1280     '$$ = $1'.
1281
1282     Otherwise, the following line sets YYVAL to garbage.
1283     This behavior is undocumented and Bison
1284     users should not rely upon it.  Assigning to YYVAL
1285     unconditionally makes the parser a bit smaller, and it avoids a
1286     GCC warning that YYVAL may be used uninitialized.  */
1287  yyval = yyvsp[1-yylen];
1288
1289
1290  YY_REDUCE_PRINT (yyn);
1291  switch (yyn)
1292    {
1293        case 2:
1294#line 68 "arparse.y" /* yacc.c:1661  */
1295    { prompt(); }
1296#line 1297 "arparse.c" /* yacc.c:1661  */
1297    break;
1298
1299  case 6:
1300#line 77 "arparse.y" /* yacc.c:1661  */
1301    { prompt(); }
1302#line 1303 "arparse.c" /* yacc.c:1661  */
1303    break;
1304
1305  case 19:
1306#line 93 "arparse.y" /* yacc.c:1661  */
1307    { ar_end(); return 0; }
1308#line 1309 "arparse.c" /* yacc.c:1661  */
1309    break;
1310
1311  case 21:
1312#line 95 "arparse.y" /* yacc.c:1661  */
1313    { yyerror("foo"); }
1314#line 1315 "arparse.c" /* yacc.c:1661  */
1315    break;
1316
1317  case 23:
1318#line 102 "arparse.y" /* yacc.c:1661  */
1319    { ar_extract((yyvsp[0].list)); }
1320#line 1321 "arparse.c" /* yacc.c:1661  */
1321    break;
1322
1323  case 24:
1324#line 107 "arparse.y" /* yacc.c:1661  */
1325    { ar_replace((yyvsp[0].list)); }
1326#line 1327 "arparse.c" /* yacc.c:1661  */
1327    break;
1328
1329  case 25:
1330#line 112 "arparse.y" /* yacc.c:1661  */
1331    { ar_clear(); }
1332#line 1333 "arparse.c" /* yacc.c:1661  */
1333    break;
1334
1335  case 26:
1336#line 117 "arparse.y" /* yacc.c:1661  */
1337    { ar_delete((yyvsp[0].list)); }
1338#line 1339 "arparse.c" /* yacc.c:1661  */
1339    break;
1340
1341  case 27:
1342#line 121 "arparse.y" /* yacc.c:1661  */
1343    { ar_addmod((yyvsp[0].list)); }
1344#line 1345 "arparse.c" /* yacc.c:1661  */
1345    break;
1346
1347  case 28:
1348#line 126 "arparse.y" /* yacc.c:1661  */
1349    { ar_list(); }
1350#line 1351 "arparse.c" /* yacc.c:1661  */
1351    break;
1352
1353  case 29:
1354#line 131 "arparse.y" /* yacc.c:1661  */
1355    { ar_save(); }
1356#line 1357 "arparse.c" /* yacc.c:1661  */
1357    break;
1358
1359  case 30:
1360#line 138 "arparse.y" /* yacc.c:1661  */
1361    { ar_open((yyvsp[0].name),0); }
1362#line 1363 "arparse.c" /* yacc.c:1661  */
1363    break;
1364
1365  case 31:
1366#line 143 "arparse.y" /* yacc.c:1661  */
1367    { ar_open((yyvsp[0].name),1); }
1368#line 1369 "arparse.c" /* yacc.c:1661  */
1369    break;
1370
1371  case 32:
1372#line 149 "arparse.y" /* yacc.c:1661  */
1373    { ar_addlib((yyvsp[-1].name),(yyvsp[0].list)); }
1374#line 1375 "arparse.c" /* yacc.c:1661  */
1375    break;
1376
1377  case 33:
1378#line 153 "arparse.y" /* yacc.c:1661  */
1379    { ar_directory((yyvsp[-2].name), (yyvsp[-1].list), (yyvsp[0].name)); }
1380#line 1381 "arparse.c" /* yacc.c:1661  */
1381    break;
1382
1383  case 34:
1384#line 160 "arparse.y" /* yacc.c:1661  */
1385    { (yyval.name) = (yyvsp[0].name); }
1386#line 1387 "arparse.c" /* yacc.c:1661  */
1387    break;
1388
1389  case 35:
1390#line 161 "arparse.y" /* yacc.c:1661  */
1391    { (yyval.name) = 0; }
1392#line 1393 "arparse.c" /* yacc.c:1661  */
1393    break;
1394
1395  case 36:
1396#line 166 "arparse.y" /* yacc.c:1661  */
1397    { (yyval.list) = (yyvsp[-1].list); }
1398#line 1399 "arparse.c" /* yacc.c:1661  */
1399    break;
1400
1401  case 37:
1402#line 168 "arparse.y" /* yacc.c:1661  */
1403    { (yyval.list) = 0; }
1404#line 1405 "arparse.c" /* yacc.c:1661  */
1405    break;
1406
1407  case 38:
1408#line 173 "arparse.y" /* yacc.c:1661  */
1409    { 	struct list *n  = (struct list *) malloc(sizeof(struct list));
1410			n->next = (yyvsp[-2].list);
1411			n->name = (yyvsp[0].name);
1412			(yyval.list) = n;
1413		 }
1414#line 1415 "arparse.c" /* yacc.c:1661  */
1415    break;
1416
1417  case 39:
1418#line 178 "arparse.y" /* yacc.c:1661  */
1419    { (yyval.list) = 0; }
1420#line 1421 "arparse.c" /* yacc.c:1661  */
1421    break;
1422
1423  case 42:
1424#line 190 "arparse.y" /* yacc.c:1661  */
1425    { verbose = !verbose; }
1426#line 1427 "arparse.c" /* yacc.c:1661  */
1427    break;
1428
1429
1430#line 1431 "arparse.c" /* yacc.c:1661  */
1431      default: break;
1432    }
1433  /* User semantic actions sometimes alter yychar, and that requires
1434     that yytoken be updated with the new translation.  We take the
1435     approach of translating immediately before every use of yytoken.
1436     One alternative is translating here after every semantic action,
1437     but that translation would be missed if the semantic action invokes
1438     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1439     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1440     incorrect destructor might then be invoked immediately.  In the
1441     case of YYERROR or YYBACKUP, subsequent parser actions might lead
1442     to an incorrect destructor call or verbose syntax error message
1443     before the lookahead is translated.  */
1444  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1445
1446  YYPOPSTACK (yylen);
1447  yylen = 0;
1448  YY_STACK_PRINT (yyss, yyssp);
1449
1450  *++yyvsp = yyval;
1451
1452  /* Now 'shift' the result of the reduction.  Determine what state
1453     that goes to, based on the state we popped back to and the rule
1454     number reduced by.  */
1455
1456  yyn = yyr1[yyn];
1457
1458  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1459  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1460    yystate = yytable[yystate];
1461  else
1462    yystate = yydefgoto[yyn - YYNTOKENS];
1463
1464  goto yynewstate;
1465
1466
1467/*--------------------------------------.
1468| yyerrlab -- here on detecting error.  |
1469`--------------------------------------*/
1470yyerrlab:
1471  /* Make sure we have latest lookahead translation.  See comments at
1472     user semantic actions for why this is necessary.  */
1473  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1474
1475  /* If not already recovering from an error, report this error.  */
1476  if (!yyerrstatus)
1477    {
1478      ++yynerrs;
1479#if ! YYERROR_VERBOSE
1480      yyerror (YY_("syntax error"));
1481#else
1482# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1483                                        yyssp, yytoken)
1484      {
1485        char const *yymsgp = YY_("syntax error");
1486        int yysyntax_error_status;
1487        yysyntax_error_status = YYSYNTAX_ERROR;
1488        if (yysyntax_error_status == 0)
1489          yymsgp = yymsg;
1490        else if (yysyntax_error_status == 1)
1491          {
1492            if (yymsg != yymsgbuf)
1493              YYSTACK_FREE (yymsg);
1494            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1495            if (!yymsg)
1496              {
1497                yymsg = yymsgbuf;
1498                yymsg_alloc = sizeof yymsgbuf;
1499                yysyntax_error_status = 2;
1500              }
1501            else
1502              {
1503                yysyntax_error_status = YYSYNTAX_ERROR;
1504                yymsgp = yymsg;
1505              }
1506          }
1507        yyerror (yymsgp);
1508        if (yysyntax_error_status == 2)
1509          goto yyexhaustedlab;
1510      }
1511# undef YYSYNTAX_ERROR
1512#endif
1513    }
1514
1515
1516
1517  if (yyerrstatus == 3)
1518    {
1519      /* If just tried and failed to reuse lookahead token after an
1520         error, discard it.  */
1521
1522      if (yychar <= YYEOF)
1523        {
1524          /* Return failure if at end of input.  */
1525          if (yychar == YYEOF)
1526            YYABORT;
1527        }
1528      else
1529        {
1530          yydestruct ("Error: discarding",
1531                      yytoken, &yylval);
1532          yychar = YYEMPTY;
1533        }
1534    }
1535
1536  /* Else will try to reuse lookahead token after shifting the error
1537     token.  */
1538  goto yyerrlab1;
1539
1540
1541/*---------------------------------------------------.
1542| yyerrorlab -- error raised explicitly by YYERROR.  |
1543`---------------------------------------------------*/
1544yyerrorlab:
1545
1546  /* Pacify compilers like GCC when the user code never invokes
1547     YYERROR and the label yyerrorlab therefore never appears in user
1548     code.  */
1549  if (/*CONSTCOND*/ 0)
1550     goto yyerrorlab;
1551
1552  /* Do not reclaim the symbols of the rule whose action triggered
1553     this YYERROR.  */
1554  YYPOPSTACK (yylen);
1555  yylen = 0;
1556  YY_STACK_PRINT (yyss, yyssp);
1557  yystate = *yyssp;
1558  goto yyerrlab1;
1559
1560
1561/*-------------------------------------------------------------.
1562| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1563`-------------------------------------------------------------*/
1564yyerrlab1:
1565  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1566
1567  for (;;)
1568    {
1569      yyn = yypact[yystate];
1570      if (!yypact_value_is_default (yyn))
1571        {
1572          yyn += YYTERROR;
1573          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1574            {
1575              yyn = yytable[yyn];
1576              if (0 < yyn)
1577                break;
1578            }
1579        }
1580
1581      /* Pop the current state because it cannot handle the error token.  */
1582      if (yyssp == yyss)
1583        YYABORT;
1584
1585
1586      yydestruct ("Error: popping",
1587                  yystos[yystate], yyvsp);
1588      YYPOPSTACK (1);
1589      yystate = *yyssp;
1590      YY_STACK_PRINT (yyss, yyssp);
1591    }
1592
1593  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1594  *++yyvsp = yylval;
1595  YY_IGNORE_MAYBE_UNINITIALIZED_END
1596
1597
1598  /* Shift the error token.  */
1599  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1600
1601  yystate = yyn;
1602  goto yynewstate;
1603
1604
1605/*-------------------------------------.
1606| yyacceptlab -- YYACCEPT comes here.  |
1607`-------------------------------------*/
1608yyacceptlab:
1609  yyresult = 0;
1610  goto yyreturn;
1611
1612/*-----------------------------------.
1613| yyabortlab -- YYABORT comes here.  |
1614`-----------------------------------*/
1615yyabortlab:
1616  yyresult = 1;
1617  goto yyreturn;
1618
1619#if !defined yyoverflow || YYERROR_VERBOSE
1620/*-------------------------------------------------.
1621| yyexhaustedlab -- memory exhaustion comes here.  |
1622`-------------------------------------------------*/
1623yyexhaustedlab:
1624  yyerror (YY_("memory exhausted"));
1625  yyresult = 2;
1626  /* Fall through.  */
1627#endif
1628
1629yyreturn:
1630  if (yychar != YYEMPTY)
1631    {
1632      /* Make sure we have latest lookahead translation.  See comments at
1633         user semantic actions for why this is necessary.  */
1634      yytoken = YYTRANSLATE (yychar);
1635      yydestruct ("Cleanup: discarding lookahead",
1636                  yytoken, &yylval);
1637    }
1638  /* Do not reclaim the symbols of the rule whose action triggered
1639     this YYABORT or YYACCEPT.  */
1640  YYPOPSTACK (yylen);
1641  YY_STACK_PRINT (yyss, yyssp);
1642  while (yyssp != yyss)
1643    {
1644      yydestruct ("Cleanup: popping",
1645                  yystos[*yyssp], yyvsp);
1646      YYPOPSTACK (1);
1647    }
1648#ifndef yyoverflow
1649  if (yyss != yyssa)
1650    YYSTACK_FREE (yyss);
1651#endif
1652#if YYERROR_VERBOSE
1653  if (yymsg != yymsgbuf)
1654    YYSTACK_FREE (yymsg);
1655#endif
1656  return yyresult;
1657}
1658#line 194 "arparse.y" /* yacc.c:1906  */
1659
1660
1661static int
1662yyerror (const char *x ATTRIBUTE_UNUSED)
1663{
1664  extern int linenumber;
1665
1666  printf (_("Syntax error in archive script, line %d\n"), linenumber + 1);
1667  return 0;
1668}
1669