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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [binutils/] [defparse.c] - Blame information for rev 853

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

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

powered by: WebSVN 2.1.0

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