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
103 #define DESCRIPTION 260
104 #define STACKSIZE 261
118 #define NONSHARED 275
123 #define INITINSTANCE 280
124 #define INITGLOBAL 281
125 #define TERMINSTANCE 282
126 #define TERMGLOBAL 283
134 /* Copy the first part of user declarations. */
136 /* defparse.y - parser for .def files */
138 /* Copyright (C) 1995-2014 Free Software Foundation, Inc.
140 This file is part of GNU Binutils.
142 This program is free software; you can redistribute it and/or modify
143 it under the terms of the GNU General Public License as published by
144 the Free Software Foundation; either version 3 of the License, or
145 (at your option) any later version.
147 This program is distributed in the hope that it will be useful,
148 but WITHOUT ANY WARRANTY; without even the implied warranty of
149 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
150 GNU General Public License for more details.
152 You should have received a copy of the GNU General Public License
153 along with this program; if not, write to the Free Software
154 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
155 MA 02110-1301, USA. */
159 #include "libiberty.h"
163 /* Enabling traces. */
168 /* Enabling verbose error messages. */
169 #ifdef YYERROR_VERBOSE
170 # undef YYERROR_VERBOSE
171 # define YYERROR_VERBOSE 1
173 # define YYERROR_VERBOSE 0
176 /* Enabling the token table. */
177 #ifndef YYTOKEN_TABLE
178 # define YYTOKEN_TABLE 0
181 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
182 typedef union YYSTYPE
183 #line 28 "defparse.y"
186 const char *id_const;
189 /* Line 193 of yacc.c. */
190 #line 191 "defparse.c"
192 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
193 # define YYSTYPE_IS_DECLARED 1
194 # define YYSTYPE_IS_TRIVIAL 1
199 /* Copy the second part of user declarations. */
202 /* Line 216 of yacc.c. */
203 #line 204 "defparse.c"
210 typedef YYTYPE_UINT8 yytype_uint8;
212 typedef unsigned char yytype_uint8;
216 typedef YYTYPE_INT8 yytype_int8;
217 #elif (defined __STDC__ || defined __C99__FUNC__ \
218 || defined __cplusplus || defined _MSC_VER)
219 typedef signed char yytype_int8;
221 typedef short int yytype_int8;
225 typedef YYTYPE_UINT16 yytype_uint16;
227 typedef unsigned short int yytype_uint16;
231 typedef YYTYPE_INT16 yytype_int16;
233 typedef short int yytype_int16;
237 # ifdef __SIZE_TYPE__
238 # define YYSIZE_T __SIZE_TYPE__
239 # elif defined size_t
240 # define YYSIZE_T size_t
241 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
242 || defined __cplusplus || defined _MSC_VER)
243 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
244 # define YYSIZE_T size_t
246 # define YYSIZE_T unsigned int
250 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
253 # if defined YYENABLE_NLS && YYENABLE_NLS
255 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
256 # define YY_(msgid) dgettext ("bison-runtime", msgid)
260 # define YY_(msgid) msgid
264 /* Suppress unused-variable warnings by "using" E. */
265 #if ! defined lint || defined __GNUC__
266 # define YYUSE(e) ((void) (e))
268 # define YYUSE(e) /* empty */
271 /* Identity function, used to suppress warnings about constant conditions. */
275 #if (defined __STDC__ || defined __C99__FUNC__ \
276 || defined __cplusplus || defined _MSC_VER)
289 #if ! defined yyoverflow || YYERROR_VERBOSE
291 /* The parser invokes alloca or malloc; define the necessary symbols. */
293 # ifdef YYSTACK_USE_ALLOCA
294 # if YYSTACK_USE_ALLOCA
296 # define YYSTACK_ALLOC __builtin_alloca
297 # elif defined __BUILTIN_VA_ARG_INCR
298 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
300 # define YYSTACK_ALLOC __alloca
301 # elif defined _MSC_VER
302 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
303 # define alloca _alloca
305 # define YYSTACK_ALLOC alloca
306 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
307 || defined __cplusplus || defined _MSC_VER)
308 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
317 # ifdef YYSTACK_ALLOC
318 /* Pacify GCC's `empty if-body' warning. */
319 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
320 # ifndef YYSTACK_ALLOC_MAXIMUM
321 /* The OS might guarantee only one guard page at the bottom of the stack,
322 and a page size can be as small as 4096 bytes. So we cannot safely
323 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
324 to allow for a few compiler-allocated temporary stack slots. */
325 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
328 # define YYSTACK_ALLOC YYMALLOC
329 # define YYSTACK_FREE YYFREE
330 # ifndef YYSTACK_ALLOC_MAXIMUM
331 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
333 # if (defined __cplusplus && ! defined _STDLIB_H \
334 && ! ((defined YYMALLOC || defined malloc) \
335 && (defined YYFREE || defined free)))
336 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
342 # define YYMALLOC malloc
343 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
344 || defined __cplusplus || defined _MSC_VER)
345 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
350 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
351 || defined __cplusplus || defined _MSC_VER)
352 void free (void *); /* INFRINGES ON USER NAME SPACE */
356 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
359 #if (! defined yyoverflow \
360 && (! defined __cplusplus \
361 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
363 /* A type that is properly aligned for any stack member. */
370 /* The size of the maximum gap between one aligned stack and the next. */
371 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
373 /* The size of an array large to enough to hold all stacks, each with
375 # define YYSTACK_BYTES(N) \
376 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
377 + YYSTACK_GAP_MAXIMUM)
379 /* Copy COUNT objects from FROM to TO. The source and destination do
382 # if defined __GNUC__ && 1 < __GNUC__
383 # define YYCOPY(To, From, Count) \
384 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
386 # define YYCOPY(To, From, Count) \
390 for (yyi = 0; yyi < (Count); yyi++) \
391 (To)[yyi] = (From)[yyi]; \
397 /* Relocate STACK from its old location to the new one. The
398 local variables YYSIZE and YYSTACKSIZE give the old and new number of
399 elements in the stack, and YYPTR gives the new location of the
400 stack. Advance YYPTR to a properly aligned location for the next
402 # define YYSTACK_RELOCATE(Stack) \
405 YYSIZE_T yynewbytes; \
406 YYCOPY (&yyptr->Stack, Stack, yysize); \
407 Stack = &yyptr->Stack; \
408 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
409 yyptr += yynewbytes / sizeof (*yyptr); \
415 /* YYFINAL -- State number of the termination state. */
417 /* YYLAST -- Last index in YYTABLE. */
420 /* YYNTOKENS -- Number of terminals. */
422 /* YYNNTS -- Number of nonterminals. */
424 /* YYNRULES -- Number of rules. */
426 /* YYNRULES -- Number of states. */
427 #define YYNSTATES 139
429 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
431 #define YYMAXUTOK 286
433 #define YYTRANSLATE(YYX) \
434 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
436 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
437 static const yytype_uint8 yytranslate[] =
439 0, 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, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 34, 2, 32, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 33, 2, 2, 35, 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, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
465 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
466 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
467 25, 26, 27, 28, 29, 30, 31
471 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
473 static const yytype_uint16 yyprhs[] =
475 0, 0, 3, 6, 8, 12, 17, 20, 23, 27,
476 31, 34, 37, 40, 43, 46, 51, 52, 55, 64,
477 67, 69, 78, 87, 94, 101, 108, 115, 120, 125,
478 128, 130, 133, 137, 139, 141, 142, 145, 146, 148,
479 150, 152, 154, 156, 158, 160, 162, 163, 165, 166,
480 168, 169, 171, 172, 174, 176, 178, 180, 182, 184,
481 186, 188, 190, 192, 194, 196, 198, 200, 202, 204,
482 206, 208, 210, 212, 214, 216, 218, 220, 222, 224,
483 227, 230, 234, 238, 240, 241, 244, 245, 248, 249,
484 252, 253, 257, 258, 259, 263, 265, 267, 269
487 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
488 static const yytype_int8 yyrhs[] =
490 37, 0, -1, 37, 38, -1, 38, -1, 3, 55,
491 59, -1, 4, 55, 59, 60, -1, 11, 39, -1,
492 5, 30, -1, 6, 31, 47, -1, 7, 31, 47,
493 -1, 8, 45, -1, 9, 45, -1, 10, 43, -1,
494 12, 41, -1, 13, 31, -1, 13, 31, 32, 31,
495 -1, -1, 39, 40, -1, 30, 58, 56, 50, 49,
496 51, 52, 57, -1, 41, 42, -1, 42, -1, 30,
497 33, 30, 32, 30, 32, 30, 57, -1, 30, 33,
498 30, 32, 30, 32, 31, 57, -1, 30, 33, 30,
499 32, 30, 57, -1, 30, 33, 30, 32, 31, 57,
500 -1, 30, 32, 30, 32, 30, 57, -1, 30, 32,
501 30, 32, 31, 57, -1, 30, 32, 30, 57, -1,
502 30, 32, 31, 57, -1, 43, 44, -1, 44, -1,
503 30, 45, -1, 45, 46, 48, -1, 48, -1, 34,
504 -1, -1, 34, 31, -1, -1, 16, -1, 17, -1,
505 18, -1, 19, -1, 20, -1, 23, -1, 24, -1,
506 15, -1, -1, 21, -1, -1, 9, -1, -1, 22,
507 -1, -1, 3, -1, 5, -1, 6, -1, 7, -1,
508 8, -1, 9, -1, 10, -1, 11, -1, 12, -1,
509 13, -1, 14, -1, 15, -1, 21, -1, 22, -1,
510 16, -1, 17, -1, 18, -1, 19, -1, 20, -1,
511 23, -1, 24, -1, 25, -1, 26, -1, 27, -1,
512 28, -1, 30, -1, 32, 53, -1, 32, 54, -1,
513 53, 32, 54, -1, 30, 32, 54, -1, 54, -1,
514 -1, 35, 31, -1, -1, 29, 54, -1, -1, 33,
515 54, -1, -1, 14, 33, 31, -1, -1, -1, 60,
516 46, 61, -1, 25, -1, 26, -1, 27, -1, 28,
520 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
521 static const yytype_uint8 yyrline[] =
523 0, 48, 48, 49, 53, 54, 55, 56, 57, 58,
524 59, 60, 61, 62, 63, 64, 68, 70, 74, 79,
525 80, 84, 86, 88, 90, 92, 94, 96, 98, 103,
526 104, 108, 112, 113, 117, 118, 120, 121, 125, 126,
527 127, 128, 129, 130, 131, 135, 136, 140, 141, 145,
528 146, 150, 151, 154, 159, 160, 161, 162, 163, 164,
529 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
530 175, 176, 177, 178, 179, 180, 181, 182, 185, 186,
531 192, 198, 204, 211, 212, 216, 217, 221, 222, 226,
532 227, 230, 231, 234, 236, 240, 241, 242, 243
536 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
537 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
538 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
539 static const char *const yytname[] =
541 "$end", "error", "$undefined", "NAME", "LIBRARY", "DESCRIPTION",
542 "STACKSIZE", "HEAPSIZE", "CODE", "DATA", "SECTIONS", "EXPORTS",
543 "IMPORTS", "VERSIONK", "BASE", "CONSTANT", "READ", "WRITE", "EXECUTE",
544 "SHARED", "NONSHARED", "NONAME", "PRIVATE", "SINGLE", "MULTIPLE",
545 "INITINSTANCE", "INITGLOBAL", "TERMINSTANCE", "TERMGLOBAL", "EQUAL",
546 "ID", "NUMBER", "'.'", "'='", "','", "'@'", "$accept", "start",
547 "command", "explist", "expline", "implist", "impline", "seclist",
548 "secline", "attr_list", "opt_comma", "opt_number", "attr",
549 "opt_CONSTANT", "opt_NONAME", "opt_DATA", "opt_PRIVATE",
550 "keyword_as_name", "opt_name2", "opt_name", "opt_ordinal",
551 "opt_import_name", "opt_equal_name", "opt_base", "option_list", "option", 0
556 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
558 static const yytype_uint16 yytoknum[] =
560 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
561 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
562 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
563 285, 286, 46, 61, 44, 64
567 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
568 static const yytype_uint8 yyr1[] =
570 0, 36, 37, 37, 38, 38, 38, 38, 38, 38,
571 38, 38, 38, 38, 38, 38, 39, 39, 40, 41,
572 41, 42, 42, 42, 42, 42, 42, 42, 42, 43,
573 43, 44, 45, 45, 46, 46, 47, 47, 48, 48,
574 48, 48, 48, 48, 48, 49, 49, 50, 50, 51,
575 51, 52, 52, 53, 53, 53, 53, 53, 53, 53,
576 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
577 53, 53, 53, 53, 53, 53, 53, 53, 54, 54,
578 54, 54, 54, 55, 55, 56, 56, 57, 57, 58,
579 58, 59, 59, 60, 60, 61, 61, 61, 61
582 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
583 static const yytype_uint8 yyr2[] =
585 0, 2, 2, 1, 3, 4, 2, 2, 3, 3,
586 2, 2, 2, 2, 2, 4, 0, 2, 8, 2,
587 1, 8, 8, 6, 6, 6, 6, 4, 4, 2,
588 1, 2, 3, 1, 1, 0, 2, 0, 1, 1,
589 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
590 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
591 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
592 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
593 2, 3, 3, 1, 0, 2, 0, 2, 0, 2,
594 0, 3, 0, 0, 3, 1, 1, 1, 1
597 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
598 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
599 means the default is an error. */
600 static const yytype_uint8 yydefact[] =
602 0, 84, 84, 0, 0, 0, 0, 0, 0, 16,
603 0, 0, 0, 3, 53, 54, 55, 56, 57, 58,
604 59, 60, 61, 62, 63, 64, 67, 68, 69, 70,
605 71, 65, 66, 72, 73, 74, 75, 76, 77, 78,
606 0, 0, 83, 92, 92, 7, 37, 37, 38, 39,
607 40, 41, 42, 43, 44, 10, 33, 11, 0, 12,
608 30, 6, 0, 13, 20, 14, 1, 2, 0, 79,
609 80, 0, 0, 4, 93, 0, 8, 9, 34, 0,
610 31, 29, 90, 17, 0, 0, 19, 0, 82, 81,
611 0, 5, 36, 32, 0, 86, 88, 88, 0, 15,
612 91, 0, 89, 0, 48, 0, 0, 27, 28, 0,
613 95, 96, 97, 98, 94, 85, 47, 46, 87, 88,
614 88, 88, 88, 45, 50, 25, 26, 0, 23, 24,
615 49, 52, 88, 88, 51, 88, 21, 22, 18
618 /* YYDEFGOTO[NTERM-NUM]. */
619 static const yytype_int16 yydefgoto[] =
621 -1, 12, 13, 61, 83, 63, 64, 59, 60, 55,
622 79, 76, 56, 124, 117, 131, 135, 41, 42, 43,
623 104, 107, 95, 73, 91, 114
626 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
628 #define YYPACT_NINF -96
629 static const yytype_int8 yypact[] =
631 38, 61, 61, -22, -1, 8, 39, 39, -7, -96,
632 23, 59, 92, -96, -96, -96, -96, -96, -96, -96,
633 -96, -96, -96, -96, -96, -96, -96, -96, -96, -96,
634 -96, -96, -96, -96, -96, -96, -96, -96, -96, 62,
635 61, 79, -96, 96, 96, -96, 80, 80, -96, -96,
636 -96, -96, -96, -96, -96, -13, -96, -13, 39, -7,
637 -96, 82, 1, 23, -96, 81, -96, -96, 61, 79,
638 -96, 61, 83, -96, -96, 84, -96, -96, -96, 39,
639 -13, -96, 85, -96, 5, 87, -96, 88, -96, -96,
640 89, -12, -96, -96, 61, 86, -20, 93, 91, -96,
641 -96, -8, -96, 94, 103, 61, 30, -96, -96, 76,
642 -96, -96, -96, -96, -96, -96, -96, 111, -96, 93,
643 93, 0, 93, -96, 118, -96, -96, 78, -96, -96,
644 -96, 106, 93, 93, -96, 93, -96, -96, -96
647 /* YYPGOTO[NTERM-NUM]. */
648 static const yytype_int16 yypgoto[] =
650 -96, -96, 117, -96, -96, -96, 67, -96, 72, -6,
651 41, 90, 54, -96, -96, -96, -96, 95, -40, 132,
652 -96, -95, -96, 97, -96, -96
655 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
656 positive, shift that token. If negative, reduce the rule which
657 number is the opposite. If zero, do what YYDEFACT says.
658 If YYTABLE_NINF, syntax error. */
659 #define YYTABLE_NINF -36
660 static const yytype_int16 yytable[] =
662 70, 57, 108, -35, -35, -35, -35, -35, 45, 105,
663 -35, -35, 106, -35, -35, -35, -35, 110, 111, 112,
664 113, 78, 78, 58, 125, 126, 128, 129, 88, 105,
665 46, 89, 127, 84, 85, 96, 97, 136, 137, 47,
666 138, 1, 2, 3, 4, 5, 6, 7, 8, 9,
667 10, 11, 80, 62, 102, 48, 49, 50, 51, 52,
668 119, 120, 53, 54, 14, 118, 15, 16, 17, 18,
669 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
670 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
671 65, 39, 66, 40, 68, 1, 2, 3, 4, 5,
672 6, 7, 8, 9, 10, 11, 121, 122, 132, 133,
673 72, 71, 82, 87, 75, 92, 90, 98, 94, 99,
674 100, 103, 105, 109, 116, 115, 123, 130, 134, 67,
675 86, 81, 101, 93, 44, 69, 0, 77, 0, 0,
679 static const yytype_int16 yycheck[] =
681 40, 7, 97, 16, 17, 18, 19, 20, 30, 29,
682 23, 24, 32, 25, 26, 27, 28, 25, 26, 27,
683 28, 34, 34, 30, 119, 120, 121, 122, 68, 29,
684 31, 71, 32, 32, 33, 30, 31, 132, 133, 31,
685 135, 3, 4, 5, 6, 7, 8, 9, 10, 11,
686 12, 13, 58, 30, 94, 16, 17, 18, 19, 20,
687 30, 31, 23, 24, 3, 105, 5, 6, 7, 8,
688 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
689 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
690 31, 30, 0, 32, 32, 3, 4, 5, 6, 7,
691 8, 9, 10, 11, 12, 13, 30, 31, 30, 31,
692 14, 32, 30, 32, 34, 31, 33, 30, 33, 31,
693 31, 35, 29, 32, 21, 31, 15, 9, 22, 12,
694 63, 59, 91, 79, 2, 40, -1, 47, -1, -1,
698 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
699 symbol of state STATE-NUM. */
700 static const yytype_uint8 yystos[] =
702 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
703 12, 13, 37, 38, 3, 5, 6, 7, 8, 9,
704 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
705 20, 21, 22, 23, 24, 25, 26, 27, 28, 30,
706 32, 53, 54, 55, 55, 30, 31, 31, 16, 17,
707 18, 19, 20, 23, 24, 45, 48, 45, 30, 43,
708 44, 39, 30, 41, 42, 31, 0, 38, 32, 53,
709 54, 32, 14, 59, 59, 34, 47, 47, 34, 46,
710 45, 44, 30, 40, 32, 33, 42, 32, 54, 54,
711 33, 60, 31, 48, 33, 58, 30, 31, 30, 31,
712 31, 46, 54, 35, 56, 29, 32, 57, 57, 32,
713 25, 26, 27, 28, 61, 31, 21, 50, 54, 30,
714 31, 30, 31, 15, 49, 57, 57, 32, 57, 57,
715 9, 51, 30, 31, 22, 52, 57, 57, 57
718 #define yyerrok (yyerrstatus = 0)
719 #define yyclearin (yychar = YYEMPTY)
723 #define YYACCEPT goto yyacceptlab
724 #define YYABORT goto yyabortlab
725 #define YYERROR goto yyerrorlab
728 /* Like YYERROR except do call yyerror. This remains here temporarily
729 to ease the transition to the new meaning of YYERROR, for GCC.
730 Once GCC version 2 has supplanted version 1, this can go. */
732 #define YYFAIL goto yyerrlab
734 #define YYRECOVERING() (!!yyerrstatus)
736 #define YYBACKUP(Token, Value) \
738 if (yychar == YYEMPTY && yylen == 1) \
742 yytoken = YYTRANSLATE (yychar); \
748 yyerror (YY_("syntax error: cannot back up")); \
755 #define YYERRCODE 256
758 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
759 If N is 0, then set CURRENT to the empty location which ends
760 the previous symbol: RHS[0] (always defined). */
762 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
763 #ifndef YYLLOC_DEFAULT
764 # define YYLLOC_DEFAULT(Current, Rhs, N) \
768 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
769 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
770 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
771 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
775 (Current).first_line = (Current).last_line = \
776 YYRHSLOC (Rhs, 0).last_line; \
777 (Current).first_column = (Current).last_column = \
778 YYRHSLOC (Rhs, 0).last_column; \
784 /* YY_LOCATION_PRINT -- Print the location on the stream.
785 This macro was not mandated originally: define only if we know
786 we won't break user code: when these are the locations we know. */
788 #ifndef YY_LOCATION_PRINT
789 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
790 # define YY_LOCATION_PRINT(File, Loc) \
791 fprintf (File, "%d.%d-%d.%d", \
792 (Loc).first_line, (Loc).first_column, \
793 (Loc).last_line, (Loc).last_column)
795 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
800 /* YYLEX -- calling `yylex' with the right arguments. */
803 # define YYLEX yylex (YYLEX_PARAM)
805 # define YYLEX yylex ()
808 /* Enable debugging if requested. */
812 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
813 # define YYFPRINTF fprintf
816 # define YYDPRINTF(Args) \
822 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
826 YYFPRINTF (stderr, "%s ", Title); \
827 yy_symbol_print (stderr, \
829 YYFPRINTF (stderr, "\n"); \
834 /*--------------------------------.
835 | Print this symbol on YYOUTPUT. |
836 `--------------------------------*/
839 #if (defined __STDC__ || defined __C99__FUNC__ \
840 || defined __cplusplus || defined _MSC_VER)
842 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
845 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
848 YYSTYPE const * const yyvaluep;
854 if (yytype < YYNTOKENS)
855 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
867 /*--------------------------------.
868 | Print this symbol on YYOUTPUT. |
869 `--------------------------------*/
871 #if (defined __STDC__ || defined __C99__FUNC__ \
872 || defined __cplusplus || defined _MSC_VER)
874 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
877 yy_symbol_print (yyoutput, yytype, yyvaluep)
880 YYSTYPE const * const yyvaluep;
883 if (yytype < YYNTOKENS)
884 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
886 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
888 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
889 YYFPRINTF (yyoutput, ")");
892 /*------------------------------------------------------------------.
893 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
895 `------------------------------------------------------------------*/
897 #if (defined __STDC__ || defined __C99__FUNC__ \
898 || defined __cplusplus || defined _MSC_VER)
900 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
903 yy_stack_print (bottom, top)
904 yytype_int16 *bottom;
908 YYFPRINTF (stderr, "Stack now");
909 for (; bottom <= top; ++bottom)
910 YYFPRINTF (stderr, " %d", *bottom);
911 YYFPRINTF (stderr, "\n");
914 # define YY_STACK_PRINT(Bottom, Top) \
917 yy_stack_print ((Bottom), (Top)); \
921 /*------------------------------------------------.
922 | Report that the YYRULE is going to be reduced. |
923 `------------------------------------------------*/
925 #if (defined __STDC__ || defined __C99__FUNC__ \
926 || defined __cplusplus || defined _MSC_VER)
928 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
931 yy_reduce_print (yyvsp, yyrule)
936 int yynrhs = yyr2[yyrule];
938 unsigned long int yylno = yyrline[yyrule];
939 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
941 /* The symbols being reduced. */
942 for (yyi = 0; yyi < yynrhs; yyi++)
944 fprintf (stderr, " $%d = ", yyi + 1);
945 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
946 &(yyvsp[(yyi + 1) - (yynrhs)])
948 fprintf (stderr, "\n");
952 # define YY_REDUCE_PRINT(Rule) \
955 yy_reduce_print (yyvsp, Rule); \
958 /* Nonzero means print parse trace. It is left uninitialized so that
959 multiple parsers can coexist. */
962 # define YYDPRINTF(Args)
963 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
964 # define YY_STACK_PRINT(Bottom, Top)
965 # define YY_REDUCE_PRINT(Rule)
966 #endif /* !YYDEBUG */
969 /* YYINITDEPTH -- initial size of the parser's stacks. */
971 # define YYINITDEPTH 200
974 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
975 if the built-in stack extension method is used).
977 Do not make this value too large; the results are undefined if
978 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
979 evaluated with infinite-precision integer arithmetic. */
982 # define YYMAXDEPTH 10000
990 # if defined __GLIBC__ && defined _STRING_H
991 # define yystrlen strlen
993 /* Return the length of YYSTR. */
994 #if (defined __STDC__ || defined __C99__FUNC__ \
995 || defined __cplusplus || defined _MSC_VER)
997 yystrlen (const char *yystr)
1005 for (yylen = 0; yystr[yylen]; yylen++)
1013 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1014 # define yystpcpy stpcpy
1016 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1018 #if (defined __STDC__ || defined __C99__FUNC__ \
1019 || defined __cplusplus || defined _MSC_VER)
1021 yystpcpy (char *yydest, const char *yysrc)
1024 yystpcpy (yydest, yysrc)
1030 const char *yys = yysrc;
1032 while ((*yyd++ = *yys++) != '\0')
1041 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1042 quotes and backslashes, so that it's suitable for yyerror. The
1043 heuristic is that double-quoting is unnecessary unless the string
1044 contains an apostrophe, a comma, or backslash (other than
1045 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1046 null, do not copy; instead, return the length of what the result
1049 yytnamerr (char *yyres, const char *yystr)
1054 char const *yyp = yystr;
1061 goto do_not_strip_quotes;
1065 goto do_not_strip_quotes;
1078 do_not_strip_quotes: ;
1082 return yystrlen (yystr);
1084 return yystpcpy (yyres, yystr) - yyres;
1088 /* Copy into YYRESULT an error message about the unexpected token
1089 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1090 including the terminating null byte. If YYRESULT is null, do not
1091 copy anything; just return the number of bytes that would be
1092 copied. As a special case, return 0 if an ordinary "syntax error"
1093 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1094 size calculation. */
1096 yysyntax_error (char *yyresult, int yystate, int yychar)
1098 int yyn = yypact[yystate];
1100 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1104 int yytype = YYTRANSLATE (yychar);
1105 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1106 YYSIZE_T yysize = yysize0;
1108 int yysize_overflow = 0;
1109 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1110 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1114 /* This is so xgettext sees the translatable formats that are
1115 constructed on the fly. */
1116 YY_("syntax error, unexpected %s");
1117 YY_("syntax error, unexpected %s, expecting %s");
1118 YY_("syntax error, unexpected %s, expecting %s or %s");
1119 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1120 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1124 static char const yyunexpected[] = "syntax error, unexpected %s";
1125 static char const yyexpecting[] = ", expecting %s";
1126 static char const yyor[] = " or %s";
1127 char yyformat[sizeof yyunexpected
1128 + sizeof yyexpecting - 1
1129 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1130 * (sizeof yyor - 1))];
1131 char const *yyprefix = yyexpecting;
1133 /* Start YYX at -YYN if negative to avoid negative indexes in
1135 int yyxbegin = yyn < 0 ? -yyn : 0;
1137 /* Stay within bounds of both yycheck and yytname. */
1138 int yychecklim = YYLAST - yyn + 1;
1139 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1142 yyarg[0] = yytname[yytype];
1143 yyfmt = yystpcpy (yyformat, yyunexpected);
1145 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1146 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1148 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1152 yyformat[sizeof yyunexpected - 1] = '\0';
1155 yyarg[yycount++] = yytname[yyx];
1156 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1157 yysize_overflow |= (yysize1 < yysize);
1159 yyfmt = yystpcpy (yyfmt, yyprefix);
1163 yyf = YY_(yyformat);
1164 yysize1 = yysize + yystrlen (yyf);
1165 yysize_overflow |= (yysize1 < yysize);
1168 if (yysize_overflow)
1169 return YYSIZE_MAXIMUM;
1173 /* Avoid sprintf, as that infringes on the user's name space.
1174 Don't have undefined behavior even if the translation
1175 produced a string with the wrong number of "%s"s. */
1176 char *yyp = yyresult;
1178 while ((*yyp = *yyf) != '\0')
1180 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1182 yyp += yytnamerr (yyp, yyarg[yyi++]);
1195 #endif /* YYERROR_VERBOSE */
1198 /*-----------------------------------------------.
1199 | Release the memory associated to this symbol. |
1200 `-----------------------------------------------*/
1203 #if (defined __STDC__ || defined __C99__FUNC__ \
1204 || defined __cplusplus || defined _MSC_VER)
1206 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1209 yydestruct (yymsg, yytype, yyvaluep)
1219 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1230 /* Prevent warnings from -Wmissing-prototypes. */
1232 #ifdef YYPARSE_PARAM
1233 #if defined __STDC__ || defined __cplusplus
1234 int yyparse (void *YYPARSE_PARAM);
1238 #else /* ! YYPARSE_PARAM */
1239 #if defined __STDC__ || defined __cplusplus
1244 #endif /* ! YYPARSE_PARAM */
1248 /* The look-ahead symbol. */
1251 /* The semantic value of the look-ahead symbol. */
1254 /* Number of syntax errors so far. */
1263 #ifdef YYPARSE_PARAM
1264 #if (defined __STDC__ || defined __C99__FUNC__ \
1265 || defined __cplusplus || defined _MSC_VER)
1267 yyparse (void *YYPARSE_PARAM)
1270 yyparse (YYPARSE_PARAM)
1271 void *YYPARSE_PARAM;
1273 #else /* ! YYPARSE_PARAM */
1274 #if (defined __STDC__ || defined __C99__FUNC__ \
1275 || defined __cplusplus || defined _MSC_VER)
1289 /* Number of tokens to shift before error messages enabled. */
1291 /* Look-ahead token as an internal (translated) token number. */
1294 /* Buffer for error messages, and its allocated size. */
1296 char *yymsg = yymsgbuf;
1297 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1300 /* Three stacks and their tools:
1301 `yyss': related to states,
1302 `yyvs': related to semantic values,
1303 `yyls': related to locations.
1305 Refer to the stacks thru separate pointers, to allow yyoverflow
1306 to reallocate them elsewhere. */
1308 /* The state stack. */
1309 yytype_int16 yyssa[YYINITDEPTH];
1310 yytype_int16 *yyss = yyssa;
1311 yytype_int16 *yyssp;
1313 /* The semantic value stack. */
1314 YYSTYPE yyvsa[YYINITDEPTH];
1315 YYSTYPE *yyvs = yyvsa;
1320 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1322 YYSIZE_T yystacksize = YYINITDEPTH;
1324 /* The variables used to return semantic value and location from the
1329 /* The number of symbols on the RHS of the reduced rule.
1330 Keep to zero when no symbol should be popped. */
1333 YYDPRINTF ((stderr, "Starting parse\n"));
1338 yychar = YYEMPTY; /* Cause a token to be read. */
1340 /* Initialize stack pointers.
1341 Waste one element of value and location stack
1342 so that they stay on the same level as the state stack.
1343 The wasted elements are never initialized. */
1350 /*------------------------------------------------------------.
1351 | yynewstate -- Push a new state, which is found in yystate. |
1352 `------------------------------------------------------------*/
1354 /* In all cases, when you get here, the value and location stacks
1355 have just been pushed. So pushing a state here evens the stacks. */
1361 if (yyss + yystacksize - 1 <= yyssp)
1363 /* Get the current used size of the three stacks, in elements. */
1364 YYSIZE_T yysize = yyssp - yyss + 1;
1368 /* Give user a chance to reallocate the stack. Use copies of
1369 these so that the &'s don't force the real ones into
1371 YYSTYPE *yyvs1 = yyvs;
1372 yytype_int16 *yyss1 = yyss;
1375 /* Each stack pointer address is followed by the size of the
1376 data in use in that stack, in bytes. This used to be a
1377 conditional around just the two extra args, but that might
1378 be undefined if yyoverflow is a macro. */
1379 yyoverflow (YY_("memory exhausted"),
1380 &yyss1, yysize * sizeof (*yyssp),
1381 &yyvs1, yysize * sizeof (*yyvsp),
1388 #else /* no yyoverflow */
1389 # ifndef YYSTACK_RELOCATE
1390 goto yyexhaustedlab;
1392 /* Extend the stack our own way. */
1393 if (YYMAXDEPTH <= yystacksize)
1394 goto yyexhaustedlab;
1396 if (YYMAXDEPTH < yystacksize)
1397 yystacksize = YYMAXDEPTH;
1400 yytype_int16 *yyss1 = yyss;
1401 union yyalloc *yyptr =
1402 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1404 goto yyexhaustedlab;
1405 YYSTACK_RELOCATE (yyss);
1406 YYSTACK_RELOCATE (yyvs);
1408 # undef YYSTACK_RELOCATE
1410 YYSTACK_FREE (yyss1);
1413 #endif /* no yyoverflow */
1415 yyssp = yyss + yysize - 1;
1416 yyvsp = yyvs + yysize - 1;
1419 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1420 (unsigned long int) yystacksize));
1422 if (yyss + yystacksize - 1 <= yyssp)
1426 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1435 /* Do appropriate processing given the current state. Read a
1436 look-ahead token if we need one and don't already have one. */
1438 /* First try to decide what to do without reference to look-ahead token. */
1439 yyn = yypact[yystate];
1440 if (yyn == YYPACT_NINF)
1443 /* Not known => get a look-ahead token if don't already have one. */
1445 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1446 if (yychar == YYEMPTY)
1448 YYDPRINTF ((stderr, "Reading a token: "));
1452 if (yychar <= YYEOF)
1454 yychar = yytoken = YYEOF;
1455 YYDPRINTF ((stderr, "Now at end of input.\n"));
1459 yytoken = YYTRANSLATE (yychar);
1460 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1463 /* If the proper action on seeing token YYTOKEN is to reduce or to
1464 detect an error, take that action. */
1466 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1471 if (yyn == 0 || yyn == YYTABLE_NINF)
1480 /* Count tokens shifted since error; after three, turn off error
1485 /* Shift the look-ahead token. */
1486 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1488 /* Discard the shifted token unless it is eof. */
1489 if (yychar != YYEOF)
1498 /*-----------------------------------------------------------.
1499 | yydefault -- do the default action for the current state. |
1500 `-----------------------------------------------------------*/
1502 yyn = yydefact[yystate];
1508 /*-----------------------------.
1509 | yyreduce -- Do a reduction. |
1510 `-----------------------------*/
1512 /* yyn is the number of a rule to reduce with. */
1515 /* If YYLEN is nonzero, implement the default value of the action:
1518 Otherwise, the following line sets YYVAL to garbage.
1519 This behavior is undocumented and Bison
1520 users should not rely upon it. Assigning to YYVAL
1521 unconditionally makes the parser a bit smaller, and it avoids a
1522 GCC warning that YYVAL may be used uninitialized. */
1523 yyval = yyvsp[1-yylen];
1526 YY_REDUCE_PRINT (yyn);
1530 #line 53 "defparse.y"
1531 { def_name ((yyvsp[(2) - (3)].id), (yyvsp[(3) - (3)].number)); }
1535 #line 54 "defparse.y"
1536 { def_library ((yyvsp[(2) - (4)].id), (yyvsp[(3) - (4)].number)); }
1540 #line 56 "defparse.y"
1541 { def_description ((yyvsp[(2) - (2)].id));}
1545 #line 57 "defparse.y"
1546 { def_stacksize ((yyvsp[(2) - (3)].number), (yyvsp[(3) - (3)].number));}
1550 #line 58 "defparse.y"
1551 { def_heapsize ((yyvsp[(2) - (3)].number), (yyvsp[(3) - (3)].number));}
1555 #line 59 "defparse.y"
1556 { def_code ((yyvsp[(2) - (2)].number));}
1560 #line 60 "defparse.y"
1561 { def_data ((yyvsp[(2) - (2)].number));}
1565 #line 63 "defparse.y"
1566 { def_version ((yyvsp[(2) - (2)].number),0);}
1570 #line 64 "defparse.y"
1571 { def_version ((yyvsp[(2) - (4)].number),(yyvsp[(4) - (4)].number));}
1575 #line 76 "defparse.y"
1576 { def_exports ((yyvsp[(1) - (8)].id), (yyvsp[(2) - (8)].id), (yyvsp[(3) - (8)].number), (yyvsp[(4) - (8)].number), (yyvsp[(5) - (8)].number), (yyvsp[(6) - (8)].number), (yyvsp[(7) - (8)].number), (yyvsp[(8) - (8)].id));}
1580 #line 85 "defparse.y"
1581 { def_import ((yyvsp[(1) - (8)].id),(yyvsp[(3) - (8)].id),(yyvsp[(5) - (8)].id),(yyvsp[(7) - (8)].id), 0, (yyvsp[(8) - (8)].id)); }
1585 #line 87 "defparse.y"
1586 { def_import ((yyvsp[(1) - (8)].id),(yyvsp[(3) - (8)].id),(yyvsp[(5) - (8)].id), 0,(yyvsp[(7) - (8)].number), (yyvsp[(8) - (8)].id)); }
1590 #line 89 "defparse.y"
1591 { def_import ((yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id), 0,(yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); }
1595 #line 91 "defparse.y"
1596 { def_import ((yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id), 0, 0,(yyvsp[(5) - (6)].number), (yyvsp[(6) - (6)].id)); }
1600 #line 93 "defparse.y"
1601 { def_import ( 0,(yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id),(yyvsp[(5) - (6)].id), 0, (yyvsp[(6) - (6)].id)); }
1605 #line 95 "defparse.y"
1606 { def_import ( 0,(yyvsp[(1) - (6)].id),(yyvsp[(3) - (6)].id), 0,(yyvsp[(5) - (6)].number), (yyvsp[(6) - (6)].id)); }
1610 #line 97 "defparse.y"
1611 { def_import ( 0,(yyvsp[(1) - (4)].id), 0,(yyvsp[(3) - (4)].id), 0, (yyvsp[(4) - (4)].id)); }
1615 #line 99 "defparse.y"
1616 { def_import ( 0,(yyvsp[(1) - (4)].id), 0, 0,(yyvsp[(3) - (4)].number), (yyvsp[(4) - (4)].id)); }
1620 #line 108 "defparse.y"
1621 { def_section ((yyvsp[(1) - (2)].id),(yyvsp[(2) - (2)].number));}
1625 #line 120 "defparse.y"
1626 { (yyval.number)=(yyvsp[(2) - (2)].number);}
1630 #line 121 "defparse.y"
1631 { (yyval.number)=-1;}
1635 #line 125 "defparse.y"
1636 { (yyval.number) = 1; }
1640 #line 126 "defparse.y"
1641 { (yyval.number) = 2; }
1645 #line 127 "defparse.y"
1646 { (yyval.number) = 4; }
1650 #line 128 "defparse.y"
1651 { (yyval.number) = 8; }
1655 #line 129 "defparse.y"
1656 { (yyval.number) = 0; }
1660 #line 130 "defparse.y"
1661 { (yyval.number) = 0; }
1665 #line 131 "defparse.y"
1666 { (yyval.number) = 0; }
1670 #line 135 "defparse.y"
1675 #line 136 "defparse.y"
1680 #line 140 "defparse.y"
1685 #line 141 "defparse.y"
1690 #line 145 "defparse.y"
1691 { (yyval.number) = 1; }
1695 #line 146 "defparse.y"
1696 { (yyval.number) = 0; }
1700 #line 150 "defparse.y"
1701 { (yyval.number) = 1; }
1705 #line 151 "defparse.y"
1706 { (yyval.number) = 0; }
1710 #line 154 "defparse.y"
1711 { (yyval.id_const) = "NAME"; }
1715 #line 159 "defparse.y"
1716 { (yyval.id_const) = "DESCRIPTION"; }
1720 #line 160 "defparse.y"
1721 { (yyval.id_const) = "STACKSIZE"; }
1725 #line 161 "defparse.y"
1726 { (yyval.id_const) = "HEAPSIZE"; }
1730 #line 162 "defparse.y"
1731 { (yyval.id_const) = "CODE"; }
1735 #line 163 "defparse.y"
1736 { (yyval.id_const) = "DATA"; }
1740 #line 164 "defparse.y"
1741 { (yyval.id_const) = "SECTIONS"; }
1745 #line 165 "defparse.y"
1746 { (yyval.id_const) = "EXPORTS"; }
1750 #line 166 "defparse.y"
1751 { (yyval.id_const) = "IMPORTS"; }
1755 #line 167 "defparse.y"
1756 { (yyval.id_const) = "VERSION"; }
1760 #line 168 "defparse.y"
1761 { (yyval.id_const) = "BASE"; }
1765 #line 169 "defparse.y"
1766 { (yyval.id_const) = "CONSTANT"; }
1770 #line 170 "defparse.y"
1771 { (yyval.id_const) = "NONAME"; }
1775 #line 171 "defparse.y"
1776 { (yyval.id_const) = "PRIVATE"; }
1780 #line 172 "defparse.y"
1781 { (yyval.id_const) = "READ"; }
1785 #line 173 "defparse.y"
1786 { (yyval.id_const) = "WRITE"; }
1790 #line 174 "defparse.y"
1791 { (yyval.id_const) = "EXECUTE"; }
1795 #line 175 "defparse.y"
1796 { (yyval.id_const) = "SHARED"; }
1800 #line 176 "defparse.y"
1801 { (yyval.id_const) = "NONSHARED"; }
1805 #line 177 "defparse.y"
1806 { (yyval.id_const) = "SINGLE"; }
1810 #line 178 "defparse.y"
1811 { (yyval.id_const) = "MULTIPLE"; }
1815 #line 179 "defparse.y"
1816 { (yyval.id_const) = "INITINSTANCE"; }
1820 #line 180 "defparse.y"
1821 { (yyval.id_const) = "INITGLOBAL"; }
1825 #line 181 "defparse.y"
1826 { (yyval.id_const) = "TERMINSTANCE"; }
1830 #line 182 "defparse.y"
1831 { (yyval.id_const) = "TERMGLOBAL"; }
1835 #line 185 "defparse.y"
1836 { (yyval.id) = (yyvsp[(1) - (1)].id); }
1840 #line 187 "defparse.y"
1842 char *name = xmalloc (strlen ((yyvsp[(2) - (2)].id_const)) + 2);
1843 sprintf (name, ".%s", (yyvsp[(2) - (2)].id_const));
1849 #line 193 "defparse.y"
1851 char *name = xmalloc (strlen ((yyvsp[(2) - (2)].id)) + 2);
1852 sprintf (name, ".%s", (yyvsp[(2) - (2)].id));
1858 #line 199 "defparse.y"
1860 char *name = xmalloc (strlen ((yyvsp[(1) - (3)].id_const)) + 1 + strlen ((yyvsp[(3) - (3)].id)) + 1);
1861 sprintf (name, "%s.%s", (yyvsp[(1) - (3)].id_const), (yyvsp[(3) - (3)].id));
1867 #line 205 "defparse.y"
1869 char *name = xmalloc (strlen ((yyvsp[(1) - (3)].id)) + 1 + strlen ((yyvsp[(3) - (3)].id)) + 1);
1870 sprintf (name, "%s.%s", (yyvsp[(1) - (3)].id), (yyvsp[(3) - (3)].id));
1876 #line 211 "defparse.y"
1877 { (yyval.id) =(yyvsp[(1) - (1)].id); }
1881 #line 212 "defparse.y"
1886 #line 216 "defparse.y"
1887 { (yyval.number)=(yyvsp[(2) - (2)].number);}
1891 #line 217 "defparse.y"
1892 { (yyval.number)=-1;}
1896 #line 221 "defparse.y"
1897 { (yyval.id) = (yyvsp[(2) - (2)].id); }
1901 #line 222 "defparse.y"
1906 #line 226 "defparse.y"
1907 { (yyval.id) = (yyvsp[(2) - (2)].id); }
1911 #line 227 "defparse.y"
1916 #line 230 "defparse.y"
1917 { (yyval.number)= (yyvsp[(3) - (3)].number);}
1921 #line 231 "defparse.y"
1922 { (yyval.number)=-1;}
1926 /* Line 1267 of yacc.c. */
1927 #line 1928 "defparse.c"
1930 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1934 YY_STACK_PRINT (yyss, yyssp);
1939 /* Now `shift' the result of the reduction. Determine what state
1940 that goes to, based on the state we popped back to and the rule
1941 number reduced by. */
1945 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1946 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1947 yystate = yytable[yystate];
1949 yystate = yydefgoto[yyn - YYNTOKENS];
1954 /*------------------------------------.
1955 | yyerrlab -- here on detecting error |
1956 `------------------------------------*/
1958 /* If not already recovering from an error, report this error. */
1962 #if ! YYERROR_VERBOSE
1963 yyerror (YY_("syntax error"));
1966 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1967 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1969 YYSIZE_T yyalloc = 2 * yysize;
1970 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1971 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1972 if (yymsg != yymsgbuf)
1973 YYSTACK_FREE (yymsg);
1974 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1976 yymsg_alloc = yyalloc;
1980 yymsg_alloc = sizeof yymsgbuf;
1984 if (0 < yysize && yysize <= yymsg_alloc)
1986 (void) yysyntax_error (yymsg, yystate, yychar);
1991 yyerror (YY_("syntax error"));
1993 goto yyexhaustedlab;
2001 if (yyerrstatus == 3)
2003 /* If just tried and failed to reuse look-ahead token after an
2004 error, discard it. */
2006 if (yychar <= YYEOF)
2008 /* Return failure if at end of input. */
2009 if (yychar == YYEOF)
2014 yydestruct ("Error: discarding",
2020 /* Else will try to reuse look-ahead token after shifting the error
2025 /*---------------------------------------------------.
2026 | yyerrorlab -- error raised explicitly by YYERROR. |
2027 `---------------------------------------------------*/
2030 /* Pacify compilers like GCC when the user code never invokes
2031 YYERROR and the label yyerrorlab therefore never appears in user
2033 if (/*CONSTCOND*/ 0)
2036 /* Do not reclaim the symbols of the rule which action triggered
2040 YY_STACK_PRINT (yyss, yyssp);
2045 /*-------------------------------------------------------------.
2046 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2047 `-------------------------------------------------------------*/
2049 yyerrstatus = 3; /* Each real token shifted decrements this. */
2053 yyn = yypact[yystate];
2054 if (yyn != YYPACT_NINF)
2057 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2065 /* Pop the current state because it cannot handle the error token. */
2070 yydestruct ("Error: popping",
2071 yystos[yystate], yyvsp);
2074 YY_STACK_PRINT (yyss, yyssp);
2083 /* Shift the error token. */
2084 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2090 /*-------------------------------------.
2091 | yyacceptlab -- YYACCEPT comes here. |
2092 `-------------------------------------*/
2097 /*-----------------------------------.
2098 | yyabortlab -- YYABORT comes here. |
2099 `-----------------------------------*/
2105 /*-------------------------------------------------.
2106 | yyexhaustedlab -- memory exhaustion comes here. |
2107 `-------------------------------------------------*/
2109 yyerror (YY_("memory exhausted"));
2115 if (yychar != YYEOF && yychar != YYEMPTY)
2116 yydestruct ("Cleanup: discarding lookahead",
2118 /* Do not reclaim the symbols of the rule which action triggered
2119 this YYABORT or YYACCEPT. */
2121 YY_STACK_PRINT (yyss, yyssp);
2122 while (yyssp != yyss)
2124 yydestruct ("Cleanup: popping",
2125 yystos[*yyssp], yyvsp);
2130 YYSTACK_FREE (yyss);
2133 if (yymsg != yymsgbuf)
2134 YYSTACK_FREE (yymsg);
2136 /* Make sure YYID is used. */
2137 return YYID (yyresult);