~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/builddir-aarch64-linux-gnu/binutils/arparse.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

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