1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
66 /* Put the tokens into the symbol table, so that GDB and other debuggers
102 #define DESCRIPTION 260
103 #define STACKSIZE 261
117 #define NONSHARED 275
122 #define INITINSTANCE 280
123 #define INITGLOBAL 281
124 #define TERMINSTANCE 282
125 #define TERMGLOBAL 283
132 /* Copy the first part of user declarations. */
134 /* defparse.y - parser for .def files */
136 /* Copyright 1995, 1997, 1998, 1999, 2001, 2004, 2007
137 Free Software Foundation, Inc.
139 This file is part of GNU Binutils.
141 This program is free software; you can redistribute it and/or modify
142 it under the terms of the GNU General Public License as published by
143 the Free Software Foundation; either version 3 of the License, or
144 (at your option) any later version.
146 This program is distributed in the hope that it will be useful,
147 but WITHOUT ANY WARRANTY; without even the implied warranty of
148 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
149 GNU General Public License for more details.
151 You should have received a copy of the GNU General Public License
152 along with this program; if not, write to the Free Software
153 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
154 MA 02110-1301, USA. */
158 #include "libiberty.h"
162 /* Enabling traces. */
167 /* Enabling verbose error messages. */
168 #ifdef YYERROR_VERBOSE
169 # undef YYERROR_VERBOSE
170 # define YYERROR_VERBOSE 1
172 # define YYERROR_VERBOSE 0
175 /* Enabling the token table. */
176 #ifndef YYTOKEN_TABLE
177 # define YYTOKEN_TABLE 0
180 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
181 typedef union YYSTYPE
182 #line 29 "defparse.y"
187 /* Line 187 of yacc.c. */
188 #line 189 "defparse.c"
190 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
191 # define YYSTYPE_IS_DECLARED 1
192 # define YYSTYPE_IS_TRIVIAL 1
197 /* Copy the second part of user declarations. */
200 /* Line 216 of yacc.c. */
201 #line 202 "defparse.c"
208 typedef YYTYPE_UINT8 yytype_uint8
;
210 typedef unsigned char yytype_uint8
;
214 typedef YYTYPE_INT8 yytype_int8
;
215 #elif (defined __STDC__ || defined __C99__FUNC__ \
216 || defined __cplusplus || defined _MSC_VER)
217 typedef signed char yytype_int8
;
219 typedef short int yytype_int8
;
223 typedef YYTYPE_UINT16 yytype_uint16
;
225 typedef unsigned short int yytype_uint16
;
229 typedef YYTYPE_INT16 yytype_int16
;
231 typedef short int yytype_int16
;
235 # ifdef __SIZE_TYPE__
236 # define YYSIZE_T __SIZE_TYPE__
237 # elif defined size_t
238 # define YYSIZE_T size_t
239 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
240 || defined __cplusplus || defined _MSC_VER)
241 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
242 # define YYSIZE_T size_t
244 # define YYSIZE_T unsigned int
248 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
253 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
254 # define YY_(msgid) dgettext ("bison-runtime", msgid)
258 # define YY_(msgid) msgid
262 /* Suppress unused-variable warnings by "using" E. */
263 #if ! defined lint || defined __GNUC__
264 # define YYUSE(e) ((void) (e))
266 # define YYUSE(e) /* empty */
269 /* Identity function, used to suppress warnings about constant conditions. */
273 #if (defined __STDC__ || defined __C99__FUNC__ \
274 || defined __cplusplus || defined _MSC_VER)
287 #if ! defined yyoverflow || YYERROR_VERBOSE
289 /* The parser invokes alloca or malloc; define the necessary symbols. */
291 # ifdef YYSTACK_USE_ALLOCA
292 # if YYSTACK_USE_ALLOCA
294 # define YYSTACK_ALLOC __builtin_alloca
295 # elif defined __BUILTIN_VA_ARG_INCR
296 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
298 # define YYSTACK_ALLOC __alloca
299 # elif defined _MSC_VER
300 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
301 # define alloca _alloca
303 # define YYSTACK_ALLOC alloca
304 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
305 || defined __cplusplus || defined _MSC_VER)
306 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
315 # ifdef YYSTACK_ALLOC
316 /* Pacify GCC's `empty if-body' warning. */
317 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
318 # ifndef YYSTACK_ALLOC_MAXIMUM
319 /* The OS might guarantee only one guard page at the bottom of the stack,
320 and a page size can be as small as 4096 bytes. So we cannot safely
321 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
322 to allow for a few compiler-allocated temporary stack slots. */
323 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
326 # define YYSTACK_ALLOC YYMALLOC
327 # define YYSTACK_FREE YYFREE
328 # ifndef YYSTACK_ALLOC_MAXIMUM
329 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
331 # if (defined __cplusplus && ! defined _STDLIB_H \
332 && ! ((defined YYMALLOC || defined malloc) \
333 && (defined YYFREE || defined free)))
334 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
340 # define YYMALLOC malloc
341 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
342 || defined __cplusplus || defined _MSC_VER)
343 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
348 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
349 || defined __cplusplus || defined _MSC_VER)
350 void free (void *); /* INFRINGES ON USER NAME SPACE */
354 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
357 #if (! defined yyoverflow \
358 && (! defined __cplusplus \
359 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
361 /* A type that is properly aligned for any stack member. */
368 /* The size of the maximum gap between one aligned stack and the next. */
369 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
371 /* The size of an array large to enough to hold all stacks, each with
373 # define YYSTACK_BYTES(N) \
374 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
375 + YYSTACK_GAP_MAXIMUM)
377 /* Copy COUNT objects from FROM to TO. The source and destination do
380 # if defined __GNUC__ && 1 < __GNUC__
381 # define YYCOPY(To, From, Count) \
382 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
384 # define YYCOPY(To, From, Count) \
388 for (yyi = 0; yyi < (Count); yyi++) \
389 (To)[yyi] = (From)[yyi]; \
395 /* Relocate STACK from its old location to the new one. The
396 local variables YYSIZE and YYSTACKSIZE give the old and new number of
397 elements in the stack, and YYPTR gives the new location of the
398 stack. Advance YYPTR to a properly aligned location for the next
400 # define YYSTACK_RELOCATE(Stack) \
403 YYSIZE_T yynewbytes; \
404 YYCOPY (&yyptr->Stack, Stack, yysize); \
405 Stack = &yyptr->Stack; \
406 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
407 yyptr += yynewbytes / sizeof (*yyptr); \
413 /* YYFINAL -- State number of the termination state. */
415 /* YYLAST -- Last index in YYTABLE. */
418 /* YYNTOKENS -- Number of terminals. */
420 /* YYNNTS -- Number of nonterminals. */
422 /* YYNRULES -- Number of rules. */
424 /* YYNRULES -- Number of states. */
427 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
429 #define YYMAXUTOK 285
431 #define YYTRANSLATE(YYX) \
432 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
434 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
435 static const yytype_uint8 yytranslate
[] =
437 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 33, 2, 31, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 32, 2, 2, 34, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
463 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
464 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
465 25, 26, 27, 28, 29, 30
469 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
471 static const yytype_uint8 yyprhs
[] =
473 0, 0, 3, 6, 8, 12, 17, 20, 23, 27,
474 31, 34, 37, 40, 43, 46, 51, 52, 55, 63,
475 66, 68, 76, 84, 90, 96, 102, 108, 112, 116,
476 119, 121, 124, 128, 130, 132, 133, 136, 137, 139,
477 141, 143, 145, 147, 149, 151, 153, 154, 156, 157,
478 159, 160, 162, 163, 165, 169, 170, 173, 174, 177,
479 182, 183, 187, 188, 189, 193, 195, 197, 199
482 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
483 static const yytype_int8 yyrhs
[] =
485 36, 0, -1, 36, 37, -1, 37, -1, 3, 52,
486 55, -1, 4, 52, 55, 56, -1, 11, 38, -1,
487 5, 29, -1, 6, 30, 46, -1, 7, 30, 46,
488 -1, 8, 44, -1, 9, 44, -1, 10, 42, -1,
489 12, 40, -1, 13, 30, -1, 13, 30, 31, 30,
490 -1, -1, 38, 39, -1, 29, 54, 53, 49, 48,
491 50, 51, -1, 40, 41, -1, 41, -1, 29, 32,
492 29, 31, 29, 31, 29, -1, 29, 32, 29, 31,
493 29, 31, 30, -1, 29, 32, 29, 31, 29, -1,
494 29, 32, 29, 31, 30, -1, 29, 31, 29, 31,
495 29, -1, 29, 31, 29, 31, 30, -1, 29, 31,
496 29, -1, 29, 31, 30, -1, 42, 43, -1, 43,
497 -1, 29, 44, -1, 44, 45, 47, -1, 47, -1,
498 33, -1, -1, 33, 30, -1, -1, 16, -1, 17,
499 -1, 18, -1, 19, -1, 20, -1, 23, -1, 24,
500 -1, 15, -1, -1, 21, -1, -1, 9, -1, -1,
501 22, -1, -1, 29, -1, 29, 31, 29, -1, -1,
502 34, 30, -1, -1, 32, 29, -1, 32, 29, 31,
503 29, -1, -1, 14, 32, 30, -1, -1, -1, 56,
504 45, 57, -1, 25, -1, 26, -1, 27, -1, 28,
508 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
509 static const yytype_uint8 yyrline
[] =
511 0, 46, 46, 47, 51, 52, 53, 54, 55, 56,
512 57, 58, 59, 60, 61, 62, 66, 68, 72, 76,
513 77, 81, 82, 83, 84, 85, 86, 87, 88, 92,
514 93, 97, 101, 102, 106, 107, 109, 110, 114, 115,
515 116, 117, 118, 119, 120, 124, 125, 129, 130, 134,
516 135, 139, 140, 143, 144, 150, 154, 155, 159, 160,
517 166, 169, 170, 173, 175, 179, 180, 181, 182
521 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
522 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
523 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
524 static const char *const yytname
[] =
526 "$end", "error", "$undefined", "NAME", "LIBRARY", "DESCRIPTION",
527 "STACKSIZE", "HEAPSIZE", "CODE", "DATA", "SECTIONS", "EXPORTS",
528 "IMPORTS", "VERSIONK", "BASE", "CONSTANT", "READ", "WRITE", "EXECUTE",
529 "SHARED", "NONSHARED", "NONAME", "PRIVATE", "SINGLE", "MULTIPLE",
530 "INITINSTANCE", "INITGLOBAL", "TERMINSTANCE", "TERMGLOBAL", "ID",
531 "NUMBER", "'.'", "'='", "','", "'@'", "$accept", "start", "command",
532 "explist", "expline", "implist", "impline", "seclist", "secline",
533 "attr_list", "opt_comma", "opt_number", "attr", "opt_CONSTANT",
534 "opt_NONAME", "opt_DATA", "opt_PRIVATE", "opt_name", "opt_ordinal",
535 "opt_equal_name", "opt_base", "option_list", "option", 0
540 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
542 static const yytype_uint16 yytoknum
[] =
544 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
545 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
546 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
551 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
552 static const yytype_uint8 yyr1
[] =
554 0, 35, 36, 36, 37, 37, 37, 37, 37, 37,
555 37, 37, 37, 37, 37, 37, 38, 38, 39, 40,
556 40, 41, 41, 41, 41, 41, 41, 41, 41, 42,
557 42, 43, 44, 44, 45, 45, 46, 46, 47, 47,
558 47, 47, 47, 47, 47, 48, 48, 49, 49, 50,
559 50, 51, 51, 52, 52, 52, 53, 53, 54, 54,
560 54, 55, 55, 56, 56, 57, 57, 57, 57
563 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
564 static const yytype_uint8 yyr2
[] =
566 0, 2, 2, 1, 3, 4, 2, 2, 3, 3,
567 2, 2, 2, 2, 2, 4, 0, 2, 7, 2,
568 1, 7, 7, 5, 5, 5, 5, 3, 3, 2,
569 1, 2, 3, 1, 1, 0, 2, 0, 1, 1,
570 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
571 0, 1, 0, 1, 3, 0, 2, 0, 2, 4,
572 0, 3, 0, 0, 3, 1, 1, 1, 1
575 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
576 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
577 means the default is an error. */
578 static const yytype_uint8 yydefact
[] =
580 0, 55, 55, 0, 0, 0, 0, 0, 0, 16,
581 0, 0, 0, 3, 53, 62, 62, 7, 37, 37,
582 38, 39, 40, 41, 42, 43, 44, 10, 33, 11,
583 0, 12, 30, 6, 0, 13, 20, 14, 1, 2,
584 0, 0, 4, 63, 0, 8, 9, 34, 0, 31,
585 29, 60, 17, 0, 0, 19, 0, 54, 0, 5,
586 36, 32, 0, 57, 27, 28, 0, 15, 61, 0,
587 58, 0, 48, 0, 0, 65, 66, 67, 68, 64,
588 0, 56, 47, 46, 25, 26, 23, 24, 59, 45,
589 50, 0, 49, 52, 21, 22, 51, 18
592 /* YYDEFGOTO[NTERM-NUM]. */
593 static const yytype_int8 yydefgoto
[] =
595 -1, 12, 13, 33, 52, 35, 36, 31, 32, 27,
596 48, 45, 28, 90, 83, 93, 97, 15, 72, 63,
600 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
602 #define YYPACT_NINF -26
603 static const yytype_int8 yypact
[] =
605 32, -12, -12, 17, -8, 33, -4, -4, 35, -26,
606 36, 37, 21, -26, 38, 48, 48, -26, 39, 39,
607 -26, -26, -26, -26, -26, -26, -26, -15, -26, -15,
608 -4, 35, -26, 41, -25, 36, -26, 40, -26, -26,
609 44, 34, -26, -26, 45, -26, -26, -26, -4, -15,
610 -26, 42, -26, -19, 47, -26, 49, -26, 50, 22,
611 -26, -26, 52, 43, 51, -26, 53, -26, -26, 26,
612 54, 56, 57, 27, 29, -26, -26, -26, -26, -26,
613 58, -26, -26, 68, -26, -26, 59, -26, -26, -26,
614 79, 31, -26, 46, -26, -26, -26, -26
617 /* YYPGOTO[NTERM-NUM]. */
618 static const yytype_int8 yypgoto
[] =
620 -26, -26, 77, -26, -26, -26, 60, -26, 61, -7,
621 55, 72, 62, -26, -26, -26, -26, 91, -26, -26,
625 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
626 positive, shift that token. If negative, reduce the rule which
627 number is the opposite. If zero, do what YYDEFACT says.
628 If YYTABLE_NINF, syntax error. */
629 #define YYTABLE_NINF -36
630 static const yytype_int8 yytable
[] =
632 29, -35, -35, -35, -35, -35, 53, 54, -35, -35,
633 64, 65, 20, 21, 22, 23, 24, 14, 47, 25,
634 26, 38, 18, 49, 1, 2, 3, 4, 5, 6,
635 7, 8, 9, 10, 11, 1, 2, 3, 4, 5,
636 6, 7, 8, 9, 10, 11, 17, -35, -35, -35,
637 -35, 75, 76, 77, 78, 47, 84, 85, 86, 87,
638 94, 95, 41, 19, 30, 34, 58, 37, 96, 40,
639 51, 56, 44, 57, 62, 60, 66, 71, 82, 67,
640 68, 70, 73, 89, 74, 80, 81, 88, 92, 39,
641 91, 46, 50, 16, 43, 55, 0, 0, 0, 0,
642 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
646 static const yytype_int8 yycheck
[] =
648 7, 16, 17, 18, 19, 20, 31, 32, 23, 24,
649 29, 30, 16, 17, 18, 19, 20, 29, 33, 23,
650 24, 0, 30, 30, 3, 4, 5, 6, 7, 8,
651 9, 10, 11, 12, 13, 3, 4, 5, 6, 7,
652 8, 9, 10, 11, 12, 13, 29, 25, 26, 27,
653 28, 25, 26, 27, 28, 33, 29, 30, 29, 30,
654 29, 30, 14, 30, 29, 29, 32, 30, 22, 31,
655 29, 31, 33, 29, 32, 30, 29, 34, 21, 30,
656 30, 29, 31, 15, 31, 31, 30, 29, 9, 12,
657 31, 19, 31, 2, 16, 35, -1, -1, -1, -1,
658 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
662 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
663 symbol of state STATE-NUM. */
664 static const yytype_uint8 yystos
[] =
666 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
667 12, 13, 36, 37, 29, 52, 52, 29, 30, 30,
668 16, 17, 18, 19, 20, 23, 24, 44, 47, 44,
669 29, 42, 43, 38, 29, 40, 41, 30, 0, 37,
670 31, 14, 55, 55, 33, 46, 46, 33, 45, 44,
671 43, 29, 39, 31, 32, 41, 31, 29, 32, 56,
672 30, 47, 32, 54, 29, 30, 29, 30, 30, 45,
673 29, 34, 53, 31, 31, 25, 26, 27, 28, 57,
674 31, 30, 21, 49, 29, 30, 29, 30, 29, 15,
675 48, 31, 9, 50, 29, 30, 22, 51
678 #define yyerrok (yyerrstatus = 0)
679 #define yyclearin (yychar = YYEMPTY)
683 #define YYACCEPT goto yyacceptlab
684 #define YYABORT goto yyabortlab
685 #define YYERROR goto yyerrorlab
688 /* Like YYERROR except do call yyerror. This remains here temporarily
689 to ease the transition to the new meaning of YYERROR, for GCC.
690 Once GCC version 2 has supplanted version 1, this can go. */
692 #define YYFAIL goto yyerrlab
694 #define YYRECOVERING() (!!yyerrstatus)
696 #define YYBACKUP(Token, Value) \
698 if (yychar == YYEMPTY && yylen == 1) \
702 yytoken = YYTRANSLATE (yychar); \
708 yyerror (YY_("syntax error: cannot back up")); \
715 #define YYERRCODE 256
718 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
719 If N is 0, then set CURRENT to the empty location which ends
720 the previous symbol: RHS[0] (always defined). */
722 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
723 #ifndef YYLLOC_DEFAULT
724 # define YYLLOC_DEFAULT(Current, Rhs, N) \
728 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
729 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
730 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
731 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
735 (Current).first_line = (Current).last_line = \
736 YYRHSLOC (Rhs, 0).last_line; \
737 (Current).first_column = (Current).last_column = \
738 YYRHSLOC (Rhs, 0).last_column; \
744 /* YY_LOCATION_PRINT -- Print the location on the stream.
745 This macro was not mandated originally: define only if we know
746 we won't break user code: when these are the locations we know. */
748 #ifndef YY_LOCATION_PRINT
749 # if YYLTYPE_IS_TRIVIAL
750 # define YY_LOCATION_PRINT(File, Loc) \
751 fprintf (File, "%d.%d-%d.%d", \
752 (Loc).first_line, (Loc).first_column, \
753 (Loc).last_line, (Loc).last_column)
755 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
760 /* YYLEX -- calling `yylex' with the right arguments. */
763 # define YYLEX yylex (YYLEX_PARAM)
765 # define YYLEX yylex ()
768 /* Enable debugging if requested. */
772 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
773 # define YYFPRINTF fprintf
776 # define YYDPRINTF(Args) \
782 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
786 YYFPRINTF (stderr, "%s ", Title); \
787 yy_symbol_print (stderr, \
789 YYFPRINTF (stderr, "\n"); \
794 /*--------------------------------.
795 | Print this symbol on YYOUTPUT. |
796 `--------------------------------*/
799 #if (defined __STDC__ || defined __C99__FUNC__ \
800 || defined __cplusplus || defined _MSC_VER)
802 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
805 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
808 YYSTYPE
const * const yyvaluep
;
814 if (yytype
< YYNTOKENS
)
815 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
827 /*--------------------------------.
828 | Print this symbol on YYOUTPUT. |
829 `--------------------------------*/
831 #if (defined __STDC__ || defined __C99__FUNC__ \
832 || defined __cplusplus || defined _MSC_VER)
834 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
837 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
840 YYSTYPE
const * const yyvaluep
;
843 if (yytype
< YYNTOKENS
)
844 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
846 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
848 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
849 YYFPRINTF (yyoutput
, ")");
852 /*------------------------------------------------------------------.
853 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
855 `------------------------------------------------------------------*/
857 #if (defined __STDC__ || defined __C99__FUNC__ \
858 || defined __cplusplus || defined _MSC_VER)
860 yy_stack_print (yytype_int16
*bottom
, yytype_int16
*top
)
863 yy_stack_print (bottom
, top
)
864 yytype_int16
*bottom
;
868 YYFPRINTF (stderr
, "Stack now");
869 for (; bottom
<= top
; ++bottom
)
870 YYFPRINTF (stderr
, " %d", *bottom
);
871 YYFPRINTF (stderr
, "\n");
874 # define YY_STACK_PRINT(Bottom, Top) \
877 yy_stack_print ((Bottom), (Top)); \
881 /*------------------------------------------------.
882 | Report that the YYRULE is going to be reduced. |
883 `------------------------------------------------*/
885 #if (defined __STDC__ || defined __C99__FUNC__ \
886 || defined __cplusplus || defined _MSC_VER)
888 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
891 yy_reduce_print (yyvsp
, yyrule
)
896 int yynrhs
= yyr2
[yyrule
];
898 unsigned long int yylno
= yyrline
[yyrule
];
899 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
901 /* The symbols being reduced. */
902 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
904 fprintf (stderr
, " $%d = ", yyi
+ 1);
905 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
906 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
908 fprintf (stderr
, "\n");
912 # define YY_REDUCE_PRINT(Rule) \
915 yy_reduce_print (yyvsp, Rule); \
918 /* Nonzero means print parse trace. It is left uninitialized so that
919 multiple parsers can coexist. */
922 # define YYDPRINTF(Args)
923 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
924 # define YY_STACK_PRINT(Bottom, Top)
925 # define YY_REDUCE_PRINT(Rule)
926 #endif /* !YYDEBUG */
929 /* YYINITDEPTH -- initial size of the parser's stacks. */
931 # define YYINITDEPTH 200
934 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
935 if the built-in stack extension method is used).
937 Do not make this value too large; the results are undefined if
938 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
939 evaluated with infinite-precision integer arithmetic. */
942 # define YYMAXDEPTH 10000
950 # if defined __GLIBC__ && defined _STRING_H
951 # define yystrlen strlen
953 /* Return the length of YYSTR. */
954 #if (defined __STDC__ || defined __C99__FUNC__ \
955 || defined __cplusplus || defined _MSC_VER)
957 yystrlen (const char *yystr
)
965 for (yylen
= 0; yystr
[yylen
]; yylen
++)
973 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
974 # define yystpcpy stpcpy
976 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
978 #if (defined __STDC__ || defined __C99__FUNC__ \
979 || defined __cplusplus || defined _MSC_VER)
981 yystpcpy (char *yydest
, const char *yysrc
)
984 yystpcpy (yydest
, yysrc
)
990 const char *yys
= yysrc
;
992 while ((*yyd
++ = *yys
++) != '\0')
1001 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1002 quotes and backslashes, so that it's suitable for yyerror. The
1003 heuristic is that double-quoting is unnecessary unless the string
1004 contains an apostrophe, a comma, or backslash (other than
1005 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1006 null, do not copy; instead, return the length of what the result
1009 yytnamerr (char *yyres
, const char *yystr
)
1014 char const *yyp
= yystr
;
1021 goto do_not_strip_quotes
;
1025 goto do_not_strip_quotes
;
1038 do_not_strip_quotes
: ;
1042 return yystrlen (yystr
);
1044 return yystpcpy (yyres
, yystr
) - yyres
;
1048 /* Copy into YYRESULT an error message about the unexpected token
1049 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1050 including the terminating null byte. If YYRESULT is null, do not
1051 copy anything; just return the number of bytes that would be
1052 copied. As a special case, return 0 if an ordinary "syntax error"
1053 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1054 size calculation. */
1056 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1058 int yyn
= yypact
[yystate
];
1060 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1064 int yytype
= YYTRANSLATE (yychar
);
1065 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1066 YYSIZE_T yysize
= yysize0
;
1068 int yysize_overflow
= 0;
1069 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1070 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1074 /* This is so xgettext sees the translatable formats that are
1075 constructed on the fly. */
1076 YY_("syntax error, unexpected %s");
1077 YY_("syntax error, unexpected %s, expecting %s");
1078 YY_("syntax error, unexpected %s, expecting %s or %s");
1079 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1080 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1084 static char const yyunexpected
[] = "syntax error, unexpected %s";
1085 static char const yyexpecting
[] = ", expecting %s";
1086 static char const yyor
[] = " or %s";
1087 char yyformat
[sizeof yyunexpected
1088 + sizeof yyexpecting
- 1
1089 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1090 * (sizeof yyor
- 1))];
1091 char const *yyprefix
= yyexpecting
;
1093 /* Start YYX at -YYN if negative to avoid negative indexes in
1095 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1097 /* Stay within bounds of both yycheck and yytname. */
1098 int yychecklim
= YYLAST
- yyn
+ 1;
1099 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1102 yyarg
[0] = yytname
[yytype
];
1103 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1105 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1106 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1108 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1112 yyformat
[sizeof yyunexpected
- 1] = '\0';
1115 yyarg
[yycount
++] = yytname
[yyx
];
1116 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1117 yysize_overflow
|= (yysize1
< yysize
);
1119 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1123 yyf
= YY_(yyformat
);
1124 yysize1
= yysize
+ yystrlen (yyf
);
1125 yysize_overflow
|= (yysize1
< yysize
);
1128 if (yysize_overflow
)
1129 return YYSIZE_MAXIMUM
;
1133 /* Avoid sprintf, as that infringes on the user's name space.
1134 Don't have undefined behavior even if the translation
1135 produced a string with the wrong number of "%s"s. */
1136 char *yyp
= yyresult
;
1138 while ((*yyp
= *yyf
) != '\0')
1140 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1142 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1155 #endif /* YYERROR_VERBOSE */
1158 /*-----------------------------------------------.
1159 | Release the memory associated to this symbol. |
1160 `-----------------------------------------------*/
1163 #if (defined __STDC__ || defined __C99__FUNC__ \
1164 || defined __cplusplus || defined _MSC_VER)
1166 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
1169 yydestruct (yymsg
, yytype
, yyvaluep
)
1179 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1190 /* Prevent warnings from -Wmissing-prototypes. */
1192 #ifdef YYPARSE_PARAM
1193 #if defined __STDC__ || defined __cplusplus
1194 int yyparse (void *YYPARSE_PARAM
);
1198 #else /* ! YYPARSE_PARAM */
1199 #if defined __STDC__ || defined __cplusplus
1204 #endif /* ! YYPARSE_PARAM */
1208 /* The look-ahead symbol. */
1211 /* The semantic value of the look-ahead symbol. */
1214 /* Number of syntax errors so far. */
1223 #ifdef YYPARSE_PARAM
1224 #if (defined __STDC__ || defined __C99__FUNC__ \
1225 || defined __cplusplus || defined _MSC_VER)
1227 yyparse (void *YYPARSE_PARAM
)
1230 yyparse (YYPARSE_PARAM
)
1231 void *YYPARSE_PARAM
;
1233 #else /* ! YYPARSE_PARAM */
1234 #if (defined __STDC__ || defined __C99__FUNC__ \
1235 || defined __cplusplus || defined _MSC_VER)
1249 /* Number of tokens to shift before error messages enabled. */
1251 /* Look-ahead token as an internal (translated) token number. */
1254 /* Buffer for error messages, and its allocated size. */
1256 char *yymsg
= yymsgbuf
;
1257 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1260 /* Three stacks and their tools:
1261 `yyss': related to states,
1262 `yyvs': related to semantic values,
1263 `yyls': related to locations.
1265 Refer to the stacks thru separate pointers, to allow yyoverflow
1266 to reallocate them elsewhere. */
1268 /* The state stack. */
1269 yytype_int16 yyssa
[YYINITDEPTH
];
1270 yytype_int16
*yyss
= yyssa
;
1271 yytype_int16
*yyssp
;
1273 /* The semantic value stack. */
1274 YYSTYPE yyvsa
[YYINITDEPTH
];
1275 YYSTYPE
*yyvs
= yyvsa
;
1280 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1282 YYSIZE_T yystacksize
= YYINITDEPTH
;
1284 /* The variables used to return semantic value and location from the
1289 /* The number of symbols on the RHS of the reduced rule.
1290 Keep to zero when no symbol should be popped. */
1293 YYDPRINTF ((stderr
, "Starting parse\n"));
1298 yychar
= YYEMPTY
; /* Cause a token to be read. */
1300 /* Initialize stack pointers.
1301 Waste one element of value and location stack
1302 so that they stay on the same level as the state stack.
1303 The wasted elements are never initialized. */
1310 /*------------------------------------------------------------.
1311 | yynewstate -- Push a new state, which is found in yystate. |
1312 `------------------------------------------------------------*/
1314 /* In all cases, when you get here, the value and location stacks
1315 have just been pushed. So pushing a state here evens the stacks. */
1321 if (yyss
+ yystacksize
- 1 <= yyssp
)
1323 /* Get the current used size of the three stacks, in elements. */
1324 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1328 /* Give user a chance to reallocate the stack. Use copies of
1329 these so that the &'s don't force the real ones into
1331 YYSTYPE
*yyvs1
= yyvs
;
1332 yytype_int16
*yyss1
= yyss
;
1335 /* Each stack pointer address is followed by the size of the
1336 data in use in that stack, in bytes. This used to be a
1337 conditional around just the two extra args, but that might
1338 be undefined if yyoverflow is a macro. */
1339 yyoverflow (YY_("memory exhausted"),
1340 &yyss1
, yysize
* sizeof (*yyssp
),
1341 &yyvs1
, yysize
* sizeof (*yyvsp
),
1348 #else /* no yyoverflow */
1349 # ifndef YYSTACK_RELOCATE
1350 goto yyexhaustedlab
;
1352 /* Extend the stack our own way. */
1353 if (YYMAXDEPTH
<= yystacksize
)
1354 goto yyexhaustedlab
;
1356 if (YYMAXDEPTH
< yystacksize
)
1357 yystacksize
= YYMAXDEPTH
;
1360 yytype_int16
*yyss1
= yyss
;
1361 union yyalloc
*yyptr
=
1362 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1364 goto yyexhaustedlab
;
1365 YYSTACK_RELOCATE (yyss
);
1366 YYSTACK_RELOCATE (yyvs
);
1368 # undef YYSTACK_RELOCATE
1370 YYSTACK_FREE (yyss1
);
1373 #endif /* no yyoverflow */
1375 yyssp
= yyss
+ yysize
- 1;
1376 yyvsp
= yyvs
+ yysize
- 1;
1379 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1380 (unsigned long int) yystacksize
));
1382 if (yyss
+ yystacksize
- 1 <= yyssp
)
1386 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1395 /* Do appropriate processing given the current state. Read a
1396 look-ahead token if we need one and don't already have one. */
1398 /* First try to decide what to do without reference to look-ahead token. */
1399 yyn
= yypact
[yystate
];
1400 if (yyn
== YYPACT_NINF
)
1403 /* Not known => get a look-ahead token if don't already have one. */
1405 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1406 if (yychar
== YYEMPTY
)
1408 YYDPRINTF ((stderr
, "Reading a token: "));
1412 if (yychar
<= YYEOF
)
1414 yychar
= yytoken
= YYEOF
;
1415 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1419 yytoken
= YYTRANSLATE (yychar
);
1420 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
1423 /* If the proper action on seeing token YYTOKEN is to reduce or to
1424 detect an error, take that action. */
1426 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1431 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1440 /* Count tokens shifted since error; after three, turn off error
1445 /* Shift the look-ahead token. */
1446 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
1448 /* Discard the shifted token unless it is eof. */
1449 if (yychar
!= YYEOF
)
1458 /*-----------------------------------------------------------.
1459 | yydefault -- do the default action for the current state. |
1460 `-----------------------------------------------------------*/
1462 yyn
= yydefact
[yystate
];
1468 /*-----------------------------.
1469 | yyreduce -- Do a reduction. |
1470 `-----------------------------*/
1472 /* yyn is the number of a rule to reduce with. */
1475 /* If YYLEN is nonzero, implement the default value of the action:
1478 Otherwise, the following line sets YYVAL to garbage.
1479 This behavior is undocumented and Bison
1480 users should not rely upon it. Assigning to YYVAL
1481 unconditionally makes the parser a bit smaller, and it avoids a
1482 GCC warning that YYVAL may be used uninitialized. */
1483 yyval
= yyvsp
[1-yylen
];
1486 YY_REDUCE_PRINT (yyn
);
1490 #line 51 "defparse.y"
1491 { def_name ((yyvsp
[(2) - (3)].id
), (yyvsp
[(3) - (3)].number
)); }
1495 #line 52 "defparse.y"
1496 { def_library ((yyvsp
[(2) - (4)].id
), (yyvsp
[(3) - (4)].number
)); }
1500 #line 54 "defparse.y"
1501 { def_description ((yyvsp
[(2) - (2)].id
));}
1505 #line 55 "defparse.y"
1506 { def_stacksize ((yyvsp
[(2) - (3)].number
), (yyvsp
[(3) - (3)].number
));}
1510 #line 56 "defparse.y"
1511 { def_heapsize ((yyvsp
[(2) - (3)].number
), (yyvsp
[(3) - (3)].number
));}
1515 #line 57 "defparse.y"
1516 { def_code ((yyvsp
[(2) - (2)].number
));}
1520 #line 58 "defparse.y"
1521 { def_data ((yyvsp
[(2) - (2)].number
));}
1525 #line 61 "defparse.y"
1526 { def_version ((yyvsp
[(2) - (2)].number
),0);}
1530 #line 62 "defparse.y"
1531 { def_version ((yyvsp
[(2) - (4)].number
),(yyvsp
[(4) - (4)].number
));}
1535 #line 73 "defparse.y"
1536 { def_exports ((yyvsp
[(1) - (7)].id
), (yyvsp
[(2) - (7)].id
), (yyvsp
[(3) - (7)].number
), (yyvsp
[(4) - (7)].number
), (yyvsp
[(5) - (7)].number
), (yyvsp
[(6) - (7)].number
), (yyvsp
[(7) - (7)].number
));}
1540 #line 81 "defparse.y"
1541 { def_import ((yyvsp
[(1) - (7)].id
),(yyvsp
[(3) - (7)].id
),(yyvsp
[(5) - (7)].id
),(yyvsp
[(7) - (7)].id
), 0); }
1545 #line 82 "defparse.y"
1546 { def_import ((yyvsp
[(1) - (7)].id
),(yyvsp
[(3) - (7)].id
),(yyvsp
[(5) - (7)].id
), 0,(yyvsp
[(7) - (7)].number
)); }
1550 #line 83 "defparse.y"
1551 { def_import ((yyvsp
[(1) - (5)].id
),(yyvsp
[(3) - (5)].id
), 0,(yyvsp
[(5) - (5)].id
), 0); }
1555 #line 84 "defparse.y"
1556 { def_import ((yyvsp
[(1) - (5)].id
),(yyvsp
[(3) - (5)].id
), 0, 0,(yyvsp
[(5) - (5)].number
)); }
1560 #line 85 "defparse.y"
1561 { def_import ( 0,(yyvsp
[(1) - (5)].id
),(yyvsp
[(3) - (5)].id
),(yyvsp
[(5) - (5)].id
), 0); }
1565 #line 86 "defparse.y"
1566 { def_import ( 0,(yyvsp
[(1) - (5)].id
),(yyvsp
[(3) - (5)].id
), 0,(yyvsp
[(5) - (5)].number
)); }
1570 #line 87 "defparse.y"
1571 { def_import ( 0,(yyvsp
[(1) - (3)].id
), 0,(yyvsp
[(3) - (3)].id
), 0); }
1575 #line 88 "defparse.y"
1576 { def_import ( 0,(yyvsp
[(1) - (3)].id
), 0, 0,(yyvsp
[(3) - (3)].number
)); }
1580 #line 97 "defparse.y"
1581 { def_section ((yyvsp
[(1) - (2)].id
),(yyvsp
[(2) - (2)].number
));}
1585 #line 109 "defparse.y"
1586 { (yyval
.number
)=(yyvsp
[(2) - (2)].number
);}
1590 #line 110 "defparse.y"
1591 { (yyval
.number
)=-1;}
1595 #line 114 "defparse.y"
1596 { (yyval
.number
) = 1; }
1600 #line 115 "defparse.y"
1601 { (yyval
.number
) = 2; }
1605 #line 116 "defparse.y"
1606 { (yyval
.number
) = 4; }
1610 #line 117 "defparse.y"
1611 { (yyval
.number
) = 8; }
1615 #line 118 "defparse.y"
1616 { (yyval
.number
) = 0; }
1620 #line 119 "defparse.y"
1621 { (yyval
.number
) = 0; }
1625 #line 120 "defparse.y"
1626 { (yyval
.number
) = 0; }
1630 #line 124 "defparse.y"
1635 #line 125 "defparse.y"
1640 #line 129 "defparse.y"
1645 #line 130 "defparse.y"
1650 #line 134 "defparse.y"
1651 { (yyval
.number
) = 1; }
1655 #line 135 "defparse.y"
1656 { (yyval
.number
) = 0; }
1660 #line 139 "defparse.y"
1661 { (yyval
.number
) = 1; }
1665 #line 140 "defparse.y"
1666 { (yyval
.number
) = 0; }
1670 #line 143 "defparse.y"
1671 { (yyval
.id
) =(yyvsp
[(1) - (1)].id
); }
1675 #line 145 "defparse.y"
1677 char *name
= xmalloc (strlen ((yyvsp
[(1) - (3)].id
)) + 1 + strlen ((yyvsp
[(3) - (3)].id
)) + 1);
1678 sprintf (name
, "%s.%s", (yyvsp
[(1) - (3)].id
), (yyvsp
[(3) - (3)].id
));
1684 #line 150 "defparse.y"
1689 #line 154 "defparse.y"
1690 { (yyval
.number
)=(yyvsp
[(2) - (2)].number
);}
1694 #line 155 "defparse.y"
1695 { (yyval
.number
)=-1;}
1699 #line 159 "defparse.y"
1700 { (yyval
.id
) = (yyvsp
[(2) - (2)].id
); }
1704 #line 161 "defparse.y"
1706 char *name
= xmalloc (strlen ((yyvsp
[(2) - (4)].id
)) + 1 + strlen ((yyvsp
[(4) - (4)].id
)) + 1);
1707 sprintf (name
, "%s.%s", (yyvsp
[(2) - (4)].id
), (yyvsp
[(4) - (4)].id
));
1713 #line 166 "defparse.y"
1718 #line 169 "defparse.y"
1719 { (yyval
.number
)= (yyvsp
[(3) - (3)].number
);}
1723 #line 170 "defparse.y"
1724 { (yyval
.number
)=-1;}
1728 /* Line 1267 of yacc.c. */
1729 #line 1730 "defparse.c"
1732 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
1736 YY_STACK_PRINT (yyss
, yyssp
);
1741 /* Now `shift' the result of the reduction. Determine what state
1742 that goes to, based on the state we popped back to and the rule
1743 number reduced by. */
1747 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1748 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1749 yystate
= yytable
[yystate
];
1751 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1756 /*------------------------------------.
1757 | yyerrlab -- here on detecting error |
1758 `------------------------------------*/
1760 /* If not already recovering from an error, report this error. */
1764 #if ! YYERROR_VERBOSE
1765 yyerror (YY_("syntax error"));
1768 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
1769 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
1771 YYSIZE_T yyalloc
= 2 * yysize
;
1772 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
1773 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
1774 if (yymsg
!= yymsgbuf
)
1775 YYSTACK_FREE (yymsg
);
1776 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
1778 yymsg_alloc
= yyalloc
;
1782 yymsg_alloc
= sizeof yymsgbuf
;
1786 if (0 < yysize
&& yysize
<= yymsg_alloc
)
1788 (void) yysyntax_error (yymsg
, yystate
, yychar
);
1793 yyerror (YY_("syntax error"));
1795 goto yyexhaustedlab
;
1803 if (yyerrstatus
== 3)
1805 /* If just tried and failed to reuse look-ahead token after an
1806 error, discard it. */
1808 if (yychar
<= YYEOF
)
1810 /* Return failure if at end of input. */
1811 if (yychar
== YYEOF
)
1816 yydestruct ("Error: discarding",
1822 /* Else will try to reuse look-ahead token after shifting the error
1827 /*---------------------------------------------------.
1828 | yyerrorlab -- error raised explicitly by YYERROR. |
1829 `---------------------------------------------------*/
1832 /* Pacify compilers like GCC when the user code never invokes
1833 YYERROR and the label yyerrorlab therefore never appears in user
1835 if (/*CONSTCOND*/ 0)
1838 /* Do not reclaim the symbols of the rule which action triggered
1842 YY_STACK_PRINT (yyss
, yyssp
);
1847 /*-------------------------------------------------------------.
1848 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1849 `-------------------------------------------------------------*/
1851 yyerrstatus
= 3; /* Each real token shifted decrements this. */
1855 yyn
= yypact
[yystate
];
1856 if (yyn
!= YYPACT_NINF
)
1859 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
1867 /* Pop the current state because it cannot handle the error token. */
1872 yydestruct ("Error: popping",
1873 yystos
[yystate
], yyvsp
);
1876 YY_STACK_PRINT (yyss
, yyssp
);
1885 /* Shift the error token. */
1886 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
1892 /*-------------------------------------.
1893 | yyacceptlab -- YYACCEPT comes here. |
1894 `-------------------------------------*/
1899 /*-----------------------------------.
1900 | yyabortlab -- YYABORT comes here. |
1901 `-----------------------------------*/
1907 /*-------------------------------------------------.
1908 | yyexhaustedlab -- memory exhaustion comes here. |
1909 `-------------------------------------------------*/
1911 yyerror (YY_("memory exhausted"));
1917 if (yychar
!= YYEOF
&& yychar
!= YYEMPTY
)
1918 yydestruct ("Cleanup: discarding lookahead",
1920 /* Do not reclaim the symbols of the rule which action triggered
1921 this YYABORT or YYACCEPT. */
1923 YY_STACK_PRINT (yyss
, yyssp
);
1924 while (yyssp
!= yyss
)
1926 yydestruct ("Cleanup: popping",
1927 yystos
[*yyssp
], yyvsp
);
1932 YYSTACK_FREE (yyss
);
1935 if (yymsg
!= yymsgbuf
)
1936 YYSTACK_FREE (yymsg
);
1938 /* Make sure YYID is used. */
1939 return YYID (yyresult
);