OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [binutils-2.20.1/] [binutils/] [arparse.c] - Blame information for rev 861

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.