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