1 /* A Bison parser, made from defparse.y
4 #define YYBISON 1 /* Identify Bison output. */
8 # define DESCRIPTION 259
23 # define NONSHARED 274
27 # define INITINSTANCE 278
28 # define INITGLOBAL 279
29 # define TERMINSTANCE 280
30 # define TERMGLOBAL 281
35 /* defparse.y - parser for .def files */
37 /* Copyright 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
39 This file is part of GNU Binutils.
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.
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.
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. */
65 # define YYSTYPE yystype
66 # define YYSTYPE_IS_TRIVIAL 1
78 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
79 #define YYTRANSLATE(x) ((unsigned)(x) <= 283 ? yytranslate[x] : 55)
81 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
82 static const char yytranslate[] =
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,
116 static const short yyprhs[] =
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
126 static const short yyrhs[] =
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,
153 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
154 static const short yyrline[] =
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
167 #if (YYDEBUG) || defined YYERROR_VERBOSE
169 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
170 static const char *const yytname[] =
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",
185 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
186 static const short yyr1[] =
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
197 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
198 static const short yyr2[] =
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,
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
212 static const short yydefact[] =
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
226 static const short yydefgoto[] =
228 12, 13, 33, 51, 35, 36, 31, 32, 27, 47,
229 44, 28, 89, 82, 92, 15, 71, 62, 41, 58,
233 static const short yypact[] =
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
247 static const short yypgoto[] =
249 -32768, 79,-32768,-32768,-32768, 59,-32768, 62, -7, 34,
250 76, 54,-32768,-32768,-32768, 88,-32768,-32768, 80,-32768,
258 static const short yytable[] =
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,
273 static const short yycheck[] =
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,
287 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
288 #line 3 "/usr/share/bison/bison.simple"
290 /* Skeleton output parser for bison,
292 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
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)
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.
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. */
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. */
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. */
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. */
327 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
329 /* The parser invokes alloca or malloc; define the necessary symbols. */
331 # if YYSTACK_USE_ALLOCA
332 # define YYSTACK_ALLOC alloca
334 # ifndef YYSTACK_USE_ALLOCA
335 # if defined (alloca) || defined (_ALLOCA_H)
336 # define YYSTACK_ALLOC alloca
339 # define YYSTACK_ALLOC __builtin_alloca
345 # ifdef YYSTACK_ALLOC
346 /* Pacify GCC's `empty if-body' warning. */
347 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
349 # if defined (__STDC__) || defined (__cplusplus)
350 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
351 # define YYSIZE_T size_t
353 # define YYSTACK_ALLOC malloc
354 # define YYSTACK_FREE free
356 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
359 #if (! defined (yyoverflow) \
360 && (! defined (__cplusplus) \
361 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
363 /* A type that is properly aligned for any stack member. */
373 /* The size of the maximum gap between one aligned stack and the next. */
374 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
376 /* The size of an array large to enough to hold all stacks, each with
379 # define YYSTACK_BYTES(N) \
380 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
381 + 2 * YYSTACK_GAP_MAX)
383 # define YYSTACK_BYTES(N) \
384 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
388 /* Copy COUNT objects from FROM to TO. The source and destination do
392 # define YYCOPY(To, From, Count) \
393 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
395 # define YYCOPY(To, From, Count) \
398 register YYSIZE_T yyi; \
399 for (yyi = 0; yyi < (Count); yyi++) \
400 (To)[yyi] = (From)[yyi]; \
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
411 # define YYSTACK_RELOCATE(Stack) \
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); \
425 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
426 # define YYSIZE_T __SIZE_TYPE__
428 #if ! defined (YYSIZE_T) && defined (size_t)
429 # define YYSIZE_T size_t
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
437 #if ! defined (YYSIZE_T)
438 # define YYSIZE_T unsigned int
441 #define yyerrok (yyerrstatus = 0)
442 #define yyclearin (yychar = YYEMPTY)
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) \
455 if (yychar == YYEMPTY && yylen == 1) \
459 yychar1 = YYTRANSLATE (yychar); \
465 yyerror ("syntax error: cannot back up"); \
471 #define YYERRCODE 256
474 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
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. */
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;
488 /* YYLEX -- calling `yylex' with the right arguments. */
493 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
495 # define YYLEX yylex (&yylval, &yylloc)
497 # else /* !YYLSP_NEEDED */
499 # define YYLEX yylex (&yylval, YYLEX_PARAM)
501 # define YYLEX yylex (&yylval)
503 # endif /* !YYLSP_NEEDED */
505 # define YYLEX yylex ()
509 /* Enable debugging if requested. */
513 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
514 # define YYFPRINTF fprintf
517 # define YYDPRINTF(Args) \
522 /* Nonzero means print parse trace. It is left uninitialized so that
523 multiple parsers can coexist. */
526 # define YYDPRINTF(Args)
527 #endif /* !YYDEBUG */
529 /* YYINITDEPTH -- initial size of the parser's stacks. */
531 # define YYINITDEPTH 200
534 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
535 if the built-in stack extension method is used).
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. */
546 # define YYMAXDEPTH 10000
549 #ifdef YYERROR_VERBOSE
552 # if defined (__GLIBC__) && defined (_STRING_H)
553 # define yystrlen strlen
555 /* Return the length of YYSTR. */
557 # if defined (__STDC__) || defined (__cplusplus)
558 yystrlen (const char *yystr)
564 register const char *yys = yystr;
566 while (*yys++ != '\0')
569 return yys - yystr - 1;
575 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
576 # define yystpcpy stpcpy
578 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
581 # if defined (__STDC__) || defined (__cplusplus)
582 yystpcpy (char *yydest, const char *yysrc)
584 yystpcpy (yydest, yysrc)
589 register char *yyd = yydest;
590 register const char *yys = yysrc;
592 while ((*yyd++ = *yys++) != '\0')
601 #line 315 "/usr/share/bison/bison.simple"
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. */
611 # if defined (__STDC__) || defined (__cplusplus)
612 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
613 # define YYPARSE_PARAM_DECL
615 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
616 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
618 #else /* !YYPARSE_PARAM */
619 # define YYPARSE_PARAM_ARG
620 # define YYPARSE_PARAM_DECL
621 #endif /* !YYPARSE_PARAM */
623 /* Prevent warning if -Wstrict-prototypes. */
625 # ifdef YYPARSE_PARAM
626 int yyparse (void *);
632 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
633 variables are global, or local to YYPARSE. */
635 #define YY_DECL_NON_LSP_VARIABLES \
636 /* The lookahead symbol. */ \
639 /* The semantic value of the lookahead symbol. */ \
642 /* Number of parse errors so far. */ \
646 # define YY_DECL_VARIABLES \
647 YY_DECL_NON_LSP_VARIABLES \
649 /* Location data for the lookahead symbol. */ \
652 # define YY_DECL_VARIABLES \
653 YY_DECL_NON_LSP_VARIABLES
657 /* If nonreentrant, generate the variables here. */
664 yyparse (YYPARSE_PARAM_ARG)
667 /* If reentrant, generate the variables here. */
672 register int yystate;
675 /* Number of tokens to shift before error messages enabled. */
677 /* Lookahead token as an internal (translated) token number. */
680 /* Three stacks and their tools:
681 `yyss': related to states,
682 `yyvs': related to semantic values,
683 `yyls': related to locations.
685 Refer to the stacks thru separate pointers, to allow yyoverflow
686 to reallocate them elsewhere. */
688 /* The state stack. */
689 short yyssa[YYINITDEPTH];
691 register short *yyssp;
693 /* The semantic value stack. */
694 YYSTYPE yyvsa[YYINITDEPTH];
695 YYSTYPE *yyvs = yyvsa;
696 register YYSTYPE *yyvsp;
699 /* The location stack. */
700 YYLTYPE yylsa[YYINITDEPTH];
701 YYLTYPE *yyls = yylsa;
706 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
708 # define YYPOPSTACK (yyvsp--, yyssp--)
711 YYSIZE_T yystacksize = YYINITDEPTH;
714 /* The variables used to return semantic value and location from the
721 /* When reducing, the number of symbols on the RHS of the reduced
725 YYDPRINTF ((stderr, "Starting parse\n"));
730 yychar = YYEMPTY; /* Cause a token to be read. */
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. */
744 /*------------------------------------------------------------.
745 | yynewstate -- Push a new state, which is found in yystate. |
746 `------------------------------------------------------------*/
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.
756 if (yyssp >= yyss + yystacksize - 1)
758 /* Get the current used size of the three stacks, in elements. */
759 YYSIZE_T yysize = yyssp - yyss + 1;
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
766 YYSTYPE *yyvs1 = yyvs;
769 /* Each stack pointer address is followed by the size of the
770 data in use in that stack, in bytes. */
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),
782 yyoverflow ("parser stack overflow",
783 &yyss1, yysize * sizeof (*yyssp),
784 &yyvs1, yysize * sizeof (*yyvsp),
790 #else /* no yyoverflow */
791 # ifndef YYSTACK_RELOCATE
794 /* Extend the stack our own way. */
795 if (yystacksize >= YYMAXDEPTH)
798 if (yystacksize > YYMAXDEPTH)
799 yystacksize = YYMAXDEPTH;
803 union yyalloc *yyptr =
804 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
807 YYSTACK_RELOCATE (yyss);
808 YYSTACK_RELOCATE (yyvs);
810 YYSTACK_RELOCATE (yyls);
812 # undef YYSTACK_RELOCATE
814 YYSTACK_FREE (yyss1);
817 #endif /* no yyoverflow */
819 yyssp = yyss + yysize - 1;
820 yyvsp = yyvs + yysize - 1;
822 yylsp = yyls + yysize - 1;
825 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
826 (unsigned long int) yystacksize));
828 if (yyssp >= yyss + yystacksize - 1)
832 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
842 /* Do appropriate processing given the current state. */
843 /* Read a lookahead token if we need one and don't already have one. */
846 /* First try to decide what to do without reference to lookahead token. */
848 yyn = yypact[yystate];
852 /* Not known => get a lookahead token if don't already have one. */
854 /* yychar is either YYEMPTY or YYEOF
855 or a valid token in external form. */
857 if (yychar == YYEMPTY)
859 YYDPRINTF ((stderr, "Reading a token: "));
863 /* Convert token to internal form (in yychar1) for indexing tables with */
865 if (yychar <= 0) /* This means end of input. */
868 yychar = YYEOF; /* Don't call YYLEX any more */
870 YYDPRINTF ((stderr, "Now at end of input.\n"));
874 yychar1 = YYTRANSLATE (yychar);
877 /* We have to keep this `#if YYDEBUG', since we use variables
878 which are defined only if `YYDEBUG' is set. */
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. */
886 YYPRINT (stderr, yychar, yylval);
888 YYFPRINTF (stderr, ")\n");
894 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
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,
904 0, or most negative number => error. */
919 /* Shift the lookahead token. */
920 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
921 yychar, yytname[yychar1]));
923 /* Discard the token being shifted unless it is eof. */
932 /* Count tokens shifted since error; after three, turn off error
941 /*-----------------------------------------------------------.
942 | yydefault -- do the default action for the current state. |
943 `-----------------------------------------------------------*/
945 yyn = yydefact[yystate];
951 /*-----------------------------.
952 | yyreduce -- Do a reduction. |
953 `-----------------------------*/
955 /* yyn is the number of a rule to reduce with. */
958 /* If YYLEN is nonzero, implement the default value of the action:
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];
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);
976 /* We have to keep this `#if YYDEBUG', since we use variables which
977 are defined only if `YYDEBUG' is set. */
982 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
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]]);
995 #line 48 "defparse.y"
996 { def_name (yyvsp[-1].id, yyvsp[0].number); }
999 #line 49 "defparse.y"
1000 { def_library (yyvsp[-2].id, yyvsp[-1].number); }
1003 #line 51 "defparse.y"
1004 { def_description (yyvsp[0].id);}
1007 #line 52 "defparse.y"
1008 { def_stacksize (yyvsp[-1].number, yyvsp[0].number);}
1011 #line 53 "defparse.y"
1012 { def_heapsize (yyvsp[-1].number, yyvsp[0].number);}
1015 #line 54 "defparse.y"
1016 { def_code (yyvsp[0].number);}
1019 #line 55 "defparse.y"
1020 { def_data (yyvsp[0].number);}
1023 #line 58 "defparse.y"
1024 { def_version (yyvsp[0].number,0);}
1027 #line 59 "defparse.y"
1028 { def_version (yyvsp[-2].number,yyvsp[0].number);}
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);}
1035 #line 78 "defparse.y"
1036 { def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); }
1039 #line 79 "defparse.y"
1040 { def_import (yyvsp[-6].id,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); }
1043 #line 80 "defparse.y"
1044 { def_import (yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].id, 0); }
1047 #line 81 "defparse.y"
1048 { def_import (yyvsp[-4].id,yyvsp[-2].id, 0, 0,yyvsp[0].number); }
1051 #line 82 "defparse.y"
1052 { def_import ( 0,yyvsp[-4].id,yyvsp[-2].id,yyvsp[0].id, 0); }
1055 #line 83 "defparse.y"
1056 { def_import ( 0,yyvsp[-4].id,yyvsp[-2].id, 0,yyvsp[0].number); }
1059 #line 84 "defparse.y"
1060 { def_import ( 0,yyvsp[-2].id, 0,yyvsp[0].id, 0); }
1063 #line 85 "defparse.y"
1064 { def_import ( 0,yyvsp[-2].id, 0, 0,yyvsp[0].number); }
1067 #line 94 "defparse.y"
1068 { def_section (yyvsp[-1].id,yyvsp[0].number);}
1071 #line 106 "defparse.y"
1072 { yyval.number=yyvsp[0].number;}
1075 #line 107 "defparse.y"
1079 #line 111 "defparse.y"
1080 { yyval.number = 1; }
1083 #line 112 "defparse.y"
1084 { yyval.number = 2; }
1087 #line 113 "defparse.y"
1088 { yyval.number = 4; }
1091 #line 114 "defparse.y"
1092 { yyval.number = 8; }
1095 #line 115 "defparse.y"
1096 { yyval.number = 0; }
1099 #line 116 "defparse.y"
1100 { yyval.number = 0; }
1103 #line 117 "defparse.y"
1104 { yyval.number = 0; }
1107 #line 121 "defparse.y"
1111 #line 122 "defparse.y"
1115 #line 126 "defparse.y"
1119 #line 127 "defparse.y"
1123 #line 131 "defparse.y"
1124 { yyval.number = 1; }
1127 #line 132 "defparse.y"
1128 { yyval.number = 0; }
1131 #line 135 "defparse.y"
1132 { yyval.id =yyvsp[0].id; }
1135 #line 137 "defparse.y"
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);
1143 #line 142 "defparse.y"
1147 #line 146 "defparse.y"
1148 { yyval.number=yyvsp[0].number;}
1151 #line 147 "defparse.y"
1155 #line 151 "defparse.y"
1156 { yyval.id = yyvsp[0].id; }
1159 #line 153 "defparse.y"
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);
1167 #line 158 "defparse.y"
1171 #line 161 "defparse.y"
1172 { yyval.number= yyvsp[0].number;}
1175 #line 162 "defparse.y"
1180 #line 705 "/usr/share/bison/bison.simple"
1192 short *yyssp1 = yyss - 1;
1193 YYFPRINTF (stderr, "state stack now");
1194 while (yyssp1 != yyssp)
1195 YYFPRINTF (stderr, " %d", *++yyssp1);
1196 YYFPRINTF (stderr, "\n");
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. */
1211 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1212 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1213 yystate = yytable[yystate];
1215 yystate = yydefgoto[yyn - YYNTBASE];
1220 /*------------------------------------.
1221 | yyerrlab -- here on detecting error |
1222 `------------------------------------*/
1224 /* If not already recovering from an error, report this error. */
1229 #ifdef YYERROR_VERBOSE
1230 yyn = yypact[yystate];
1232 if (yyn > YYFLAG && yyn < YYLAST)
1234 YYSIZE_T yysize = 0;
1239 /* Start YYX at -YYN if negative to avoid negative indexes in
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);
1250 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1251 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1256 for (yyx = yyn < 0 ? -yyn : 0;
1257 yyx < (int) (sizeof (yytname) / sizeof (char *));
1259 if (yycheck[yyx + yyn] == yyx)
1261 const char *yyq = ! yycount ? ", expecting " : " or ";
1262 yyp = yystpcpy (yyp, yyq);
1263 yyp = yystpcpy (yyp, yytname[yyx]);
1268 YYSTACK_FREE (yymsg);
1271 yyerror ("parse error; also virtual memory exhausted");
1274 #endif /* defined (YYERROR_VERBOSE) */
1275 yyerror ("parse error");
1280 /*--------------------------------------------------.
1281 | yyerrlab1 -- error raised explicitly by an action |
1282 `--------------------------------------------------*/
1284 if (yyerrstatus == 3)
1286 /* If just tried and failed to reuse lookahead token after an
1287 error, discard it. */
1289 /* return failure if at end of input */
1290 if (yychar == YYEOF)
1292 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1293 yychar, yytname[yychar1]));
1297 /* Else will try to reuse lookahead token after shifting the error
1300 yyerrstatus = 3; /* Each real token shifted decrements this */
1305 /*-------------------------------------------------------------------.
1306 | yyerrdefault -- current state does not do anything special for the |
1308 `-------------------------------------------------------------------*/
1311 /* This is wrong; only states that explicitly want error tokens
1312 should shift them. */
1314 /* If its default is to accept any token, ok. Otherwise pop it. */
1315 yyn = yydefact[yystate];
1321 /*---------------------------------------------------------------.
1322 | yyerrpop -- pop the current state because it cannot handle the |
1324 `---------------------------------------------------------------*/
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");
1349 yyn = yypact[yystate];
1354 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1371 YYDPRINTF ((stderr, "Shifting error token, "));
1382 /*-------------------------------------.
1383 | yyacceptlab -- YYACCEPT comes here. |
1384 `-------------------------------------*/
1389 /*-----------------------------------.
1390 | yyabortlab -- YYABORT comes here. |
1391 `-----------------------------------*/
1396 /*---------------------------------------------.
1397 | yyoverflowab -- parser overflow comes here. |
1398 `---------------------------------------------*/
1400 yyerror ("parser stack overflow");
1407 YYSTACK_FREE (yyss);
1411 #line 176 "defparse.y"