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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [binutils/] [defparse.c] - Blame information for rev 6

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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