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