1 /* A Bison parser, made by GNU Bison 2.4.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 2009, 2010 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 3 of the License, or
11 (at your option) any later version.
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, see <http://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
44 /* Identify Bison output. */
48 #define YYBISON_VERSION "2.4.3"
51 #define YYSKELETON_NAME "yacc.c"
62 /* Using locations. */
63 #define YYLSP_NEEDED 0
67 /* Copy the first part of user declarations. */
77 extern int yylex(void);
78 extern void print_error(char const *fmt, ...);
79 extern void yyerror(char const *s);
81 extern struct boot_info *the_boot_info;
82 extern int treesource_error;
84 static unsigned long long eval_literal(const char *s, int base, int bits);
88 /* Enabling traces. */
93 /* Enabling verbose error messages. */
94 #ifdef YYERROR_VERBOSE
95 # undef YYERROR_VERBOSE
96 # define YYERROR_VERBOSE 1
98 # define YYERROR_VERBOSE 0
101 /* Enabling the token table. */
102 #ifndef YYTOKEN_TABLE
103 # define YYTOKEN_TABLE 0
110 /* Put the tokens into the symbol table, so that GDB and other debuggers
115 DT_PROPNODENAME = 260,
128 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
129 typedef union YYSTYPE
142 struct property *prop;
143 struct property *proplist;
145 struct node *nodelist;
146 struct reserve_info *re;
151 # define YYSTYPE_IS_TRIVIAL 1
152 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
153 # define YYSTYPE_IS_DECLARED 1
157 /* Copy the second part of user declarations. */
166 typedef YYTYPE_UINT8 yytype_uint8;
168 typedef unsigned char yytype_uint8;
172 typedef YYTYPE_INT8 yytype_int8;
173 #elif (defined __STDC__ || defined __C99__FUNC__ \
174 || defined __cplusplus || defined _MSC_VER)
175 typedef signed char yytype_int8;
177 typedef short int yytype_int8;
181 typedef YYTYPE_UINT16 yytype_uint16;
183 typedef unsigned short int yytype_uint16;
187 typedef YYTYPE_INT16 yytype_int16;
189 typedef short int yytype_int16;
193 # ifdef __SIZE_TYPE__
194 # define YYSIZE_T __SIZE_TYPE__
195 # elif defined size_t
196 # define YYSIZE_T size_t
197 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
198 || defined __cplusplus || defined _MSC_VER)
199 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
200 # define YYSIZE_T size_t
202 # define YYSIZE_T unsigned int
206 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
209 # if defined YYENABLE_NLS && YYENABLE_NLS
211 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
212 # define YY_(msgid) dgettext ("bison-runtime", msgid)
216 # define YY_(msgid) msgid
220 /* Suppress unused-variable warnings by "using" E. */
221 #if ! defined lint || defined __GNUC__
222 # define YYUSE(e) ((void) (e))
224 # define YYUSE(e) /* empty */
227 /* Identity function, used to suppress warnings about constant conditions. */
231 #if (defined __STDC__ || defined __C99__FUNC__ \
232 || defined __cplusplus || defined _MSC_VER)
245 #if ! defined yyoverflow || YYERROR_VERBOSE
247 /* The parser invokes alloca or malloc; define the necessary symbols. */
249 # ifdef YYSTACK_USE_ALLOCA
250 # if YYSTACK_USE_ALLOCA
252 # define YYSTACK_ALLOC __builtin_alloca
253 # elif defined __BUILTIN_VA_ARG_INCR
254 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
256 # define YYSTACK_ALLOC __alloca
257 # elif defined _MSC_VER
258 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
259 # define alloca _alloca
261 # define YYSTACK_ALLOC alloca
262 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
263 || defined __cplusplus || defined _MSC_VER)
264 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
273 # ifdef YYSTACK_ALLOC
274 /* Pacify GCC's `empty if-body' warning. */
275 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
276 # ifndef YYSTACK_ALLOC_MAXIMUM
277 /* The OS might guarantee only one guard page at the bottom of the stack,
278 and a page size can be as small as 4096 bytes. So we cannot safely
279 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
280 to allow for a few compiler-allocated temporary stack slots. */
281 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
284 # define YYSTACK_ALLOC YYMALLOC
285 # define YYSTACK_FREE YYFREE
286 # ifndef YYSTACK_ALLOC_MAXIMUM
287 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
289 # if (defined __cplusplus && ! defined _STDLIB_H \
290 && ! ((defined YYMALLOC || defined malloc) \
291 && (defined YYFREE || defined free)))
292 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
298 # define YYMALLOC malloc
299 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
300 || defined __cplusplus || defined _MSC_VER)
301 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
306 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
307 || defined __cplusplus || defined _MSC_VER)
308 void free (void *); /* INFRINGES ON USER NAME SPACE */
312 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
315 #if (! defined yyoverflow \
316 && (! defined __cplusplus \
317 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
319 /* A type that is properly aligned for any stack member. */
322 yytype_int16 yyss_alloc;
326 /* The size of the maximum gap between one aligned stack and the next. */
327 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
329 /* The size of an array large to enough to hold all stacks, each with
331 # define YYSTACK_BYTES(N) \
332 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
333 + YYSTACK_GAP_MAXIMUM)
335 /* Copy COUNT objects from FROM to TO. The source and destination do
338 # if defined __GNUC__ && 1 < __GNUC__
339 # define YYCOPY(To, From, Count) \
340 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
342 # define YYCOPY(To, From, Count) \
346 for (yyi = 0; yyi < (Count); yyi++) \
347 (To)[yyi] = (From)[yyi]; \
353 /* Relocate STACK from its old location to the new one. The
354 local variables YYSIZE and YYSTACKSIZE give the old and new number of
355 elements in the stack, and YYPTR gives the new location of the
356 stack. Advance YYPTR to a properly aligned location for the next
358 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
361 YYSIZE_T yynewbytes; \
362 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
363 Stack = &yyptr->Stack_alloc; \
364 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
365 yyptr += yynewbytes / sizeof (*yyptr); \
371 /* YYFINAL -- State number of the termination state. */
373 /* YYLAST -- Last index in YYTABLE. */
376 /* YYNTOKENS -- Number of terminals. */
378 /* YYNNTS -- Number of nonterminals. */
380 /* YYNRULES -- Number of rules. */
382 /* YYNRULES -- Number of states. */
385 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
387 #define YYMAXUTOK 267
389 #define YYTRANSLATE(YYX) \
390 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
392 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
393 static const yytype_uint8 yytranslate[] =
395 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
396 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
397 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
398 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 22, 24, 2, 2, 23, 2, 2, 14, 2, 2,
400 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
401 18, 17, 19, 2, 2, 2, 2, 2, 2, 2,
402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
404 2, 20, 2, 21, 2, 2, 2, 2, 2, 2,
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 15, 2, 16, 2, 2, 2, 2,
408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
420 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
421 5, 6, 7, 8, 9, 10, 11, 12
425 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
427 static const yytype_uint8 yyprhs[] =
429 0, 0, 3, 8, 9, 12, 17, 20, 22, 25,
430 29, 33, 39, 40, 43, 48, 51, 54, 57, 62,
431 67, 70, 80, 86, 89, 90, 93, 96, 97, 100,
432 103, 106, 108, 109, 112, 115, 116, 119, 122, 125
435 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
436 static const yytype_int8 yyrhs[] =
438 26, 0, -1, 3, 13, 27, 30, -1, -1, 28,
439 27, -1, 4, 29, 29, 13, -1, 10, 28, -1,
440 6, -1, 14, 31, -1, 30, 14, 31, -1, 30,
441 11, 31, -1, 15, 32, 39, 16, 13, -1, -1,
442 32, 33, -1, 5, 17, 34, 13, -1, 5, 13,
443 -1, 10, 33, -1, 35, 9, -1, 35, 18, 36,
444 19, -1, 35, 20, 38, 21, -1, 35, 11, -1,
445 35, 12, 22, 9, 23, 29, 23, 29, 24, -1,
446 35, 12, 22, 9, 24, -1, 34, 10, -1, -1,
447 34, 23, -1, 35, 10, -1, -1, 36, 37, -1,
448 36, 11, -1, 36, 10, -1, 6, -1, -1, 38,
449 8, -1, 38, 10, -1, -1, 40, 39, -1, 40,
450 33, -1, 5, 31, -1, 10, 40, -1
453 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
454 static const yytype_uint16 yyrline[] =
456 0, 86, 86, 95, 98, 105, 109, 117, 124, 128,
457 132, 145, 153, 156, 163, 167, 171, 179, 183, 187,
458 191, 195, 212, 222, 230, 233, 237, 245, 248, 252,
459 257, 264, 272, 275, 279, 287, 290, 294, 302, 306
463 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
464 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
465 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
466 static const char *const yytname[] =
468 "$end", "error", "$undefined", "DT_V1", "DT_MEMRESERVE",
469 "DT_PROPNODENAME", "DT_LITERAL", "DT_BASE", "DT_BYTE", "DT_STRING",
470 "DT_LABEL", "DT_REF", "DT_INCBIN", "';'", "'/'", "'{'", "'}'", "'='",
471 "'<'", "'>'", "'['", "']'", "'('", "','", "')'", "$accept", "sourcefile",
472 "memreserves", "memreserve", "addr", "devicetree", "nodedef", "proplist",
473 "propdef", "propdata", "propdataprefix", "celllist", "cellval",
474 "bytestring", "subnodes", "subnode", 0
479 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
481 static const yytype_uint16 yytoknum[] =
483 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
484 265, 266, 267, 59, 47, 123, 125, 61, 60, 62,
489 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
490 static const yytype_uint8 yyr1[] =
492 0, 25, 26, 27, 27, 28, 28, 29, 30, 30,
493 30, 31, 32, 32, 33, 33, 33, 34, 34, 34,
494 34, 34, 34, 34, 35, 35, 35, 36, 36, 36,
495 36, 37, 38, 38, 38, 39, 39, 39, 40, 40
498 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
499 static const yytype_uint8 yyr2[] =
501 0, 2, 4, 0, 2, 4, 2, 1, 2, 3,
502 3, 5, 0, 2, 4, 2, 2, 2, 4, 4,
503 2, 9, 5, 2, 0, 2, 2, 0, 2, 2,
504 2, 1, 0, 2, 2, 0, 2, 2, 2, 2
507 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
508 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
509 means the default is an error. */
510 static const yytype_uint8 yydefact[] =
512 0, 0, 0, 3, 1, 0, 0, 0, 3, 7,
513 0, 6, 0, 2, 4, 0, 12, 8, 0, 0,
514 5, 35, 10, 9, 0, 0, 13, 0, 35, 15,
515 24, 38, 16, 39, 0, 37, 36, 0, 0, 11,
516 23, 14, 25, 17, 26, 20, 0, 27, 32, 0,
517 0, 0, 0, 31, 30, 29, 18, 28, 33, 34,
518 19, 0, 22, 0, 0, 0, 21
521 /* YYDEFGOTO[NTERM-NUM]. */
522 static const yytype_int8 yydefgoto[] =
524 -1, 2, 7, 8, 10, 13, 17, 21, 26, 37,
525 38, 50, 57, 51, 27, 28
528 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
530 #define YYPACT_NINF -12
531 static const yytype_int8 yypact[] =
533 10, -11, 18, -1, -12, 22, -1, 15, -1, -12,
534 22, -12, 20, 1, -12, 17, -12, -12, 20, 20,
535 -12, 6, -12, -12, 21, 6, -12, 23, 6, -12,
536 -12, -12, -12, -12, 28, -12, -12, -6, 13, -12,
537 -12, -12, -12, -12, -12, -12, 24, -12, -12, 33,
538 -5, 0, -4, -12, -12, -12, -12, -12, -12, -12,
539 -12, 22, -12, 25, 22, 19, -12
542 /* YYPGOTO[NTERM-NUM]. */
543 static const yytype_int8 yypgoto[] =
545 -12, -12, 36, 39, -10, -12, 8, -12, 12, -12,
546 -12, -12, -12, -12, 27, 31
549 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
550 positive, shift that token. If negative, reduce the rule which
551 number is the opposite. If zero, do what YYDEFACT says.
552 If YYTABLE_NINF, syntax error. */
553 #define YYTABLE_NINF -1
554 static const yytype_uint8 yytable[] =
556 15, 53, 3, 5, 40, 54, 55, 41, 58, 6,
557 59, 24, 18, 1, 56, 19, 25, 42, 4, 61,
558 62, 60, 43, 44, 45, 46, 22, 23, 9, 12,
559 20, 47, 31, 48, 29, 16, 16, 32, 30, 34,
560 35, 39, 52, 66, 14, 11, 49, 0, 64, 0,
561 0, 63, 0, 0, 65, 36, 33
564 static const yytype_int8 yycheck[] =
566 10, 6, 13, 4, 10, 10, 11, 13, 8, 10,
567 10, 5, 11, 3, 19, 14, 10, 23, 0, 23,
568 24, 21, 9, 10, 11, 12, 18, 19, 6, 14,
569 13, 18, 24, 20, 13, 15, 15, 25, 17, 16,
570 28, 13, 9, 24, 8, 6, 22, -1, 23, -1,
571 -1, 61, -1, -1, 64, 28, 25
574 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
575 symbol of state STATE-NUM. */
576 static const yytype_uint8 yystos[] =
578 0, 3, 26, 13, 0, 4, 10, 27, 28, 6,
579 29, 28, 14, 30, 27, 29, 15, 31, 11, 14,
580 13, 32, 31, 31, 5, 10, 33, 39, 40, 13,
581 17, 31, 33, 40, 16, 33, 39, 34, 35, 13,
582 10, 13, 23, 9, 10, 11, 12, 18, 20, 22,
583 36, 38, 9, 6, 10, 11, 19, 37, 8, 10,
584 21, 23, 24, 29, 23, 29, 24
587 #define yyerrok (yyerrstatus = 0)
588 #define yyclearin (yychar = YYEMPTY)
592 #define YYACCEPT goto yyacceptlab
593 #define YYABORT goto yyabortlab
594 #define YYERROR goto yyerrorlab
597 /* Like YYERROR except do call yyerror. This remains here temporarily
598 to ease the transition to the new meaning of YYERROR, for GCC.
599 Once GCC version 2 has supplanted version 1, this can go. However,
600 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
601 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
604 #define YYFAIL goto yyerrlab
606 /* This is here to suppress warnings from the GCC cpp's
607 -Wunused-macros. Normally we don't worry about that warning, but
608 some users do, and we want to make it easy for users to remove
609 YYFAIL uses, which will produce warnings from Bison 2.5. */
612 #define YYRECOVERING() (!!yyerrstatus)
614 #define YYBACKUP(Token, Value) \
616 if (yychar == YYEMPTY && yylen == 1) \
620 yytoken = YYTRANSLATE (yychar); \
626 yyerror (YY_("syntax error: cannot back up")); \
633 #define YYERRCODE 256
636 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
637 If N is 0, then set CURRENT to the empty location which ends
638 the previous symbol: RHS[0] (always defined). */
640 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
641 #ifndef YYLLOC_DEFAULT
642 # define YYLLOC_DEFAULT(Current, Rhs, N) \
646 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
647 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
648 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
649 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
653 (Current).first_line = (Current).last_line = \
654 YYRHSLOC (Rhs, 0).last_line; \
655 (Current).first_column = (Current).last_column = \
656 YYRHSLOC (Rhs, 0).last_column; \
662 /* YY_LOCATION_PRINT -- Print the location on the stream.
663 This macro was not mandated originally: define only if we know
664 we won't break user code: when these are the locations we know. */
666 #ifndef YY_LOCATION_PRINT
667 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
668 # define YY_LOCATION_PRINT(File, Loc) \
669 fprintf (File, "%d.%d-%d.%d", \
670 (Loc).first_line, (Loc).first_column, \
671 (Loc).last_line, (Loc).last_column)
673 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
678 /* YYLEX -- calling `yylex' with the right arguments. */
681 # define YYLEX yylex (YYLEX_PARAM)
683 # define YYLEX yylex ()
686 /* Enable debugging if requested. */
690 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
691 # define YYFPRINTF fprintf
694 # define YYDPRINTF(Args) \
700 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
704 YYFPRINTF (stderr, "%s ", Title); \
705 yy_symbol_print (stderr, \
707 YYFPRINTF (stderr, "\n"); \
712 /*--------------------------------.
713 | Print this symbol on YYOUTPUT. |
714 `--------------------------------*/
717 #if (defined __STDC__ || defined __C99__FUNC__ \
718 || defined __cplusplus || defined _MSC_VER)
720 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
723 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
726 YYSTYPE const * const yyvaluep;
732 if (yytype < YYNTOKENS)
733 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
745 /*--------------------------------.
746 | Print this symbol on YYOUTPUT. |
747 `--------------------------------*/
749 #if (defined __STDC__ || defined __C99__FUNC__ \
750 || defined __cplusplus || defined _MSC_VER)
752 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
755 yy_symbol_print (yyoutput, yytype, yyvaluep)
758 YYSTYPE const * const yyvaluep;
761 if (yytype < YYNTOKENS)
762 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
764 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
766 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
767 YYFPRINTF (yyoutput, ")");
770 /*------------------------------------------------------------------.
771 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
773 `------------------------------------------------------------------*/
775 #if (defined __STDC__ || defined __C99__FUNC__ \
776 || defined __cplusplus || defined _MSC_VER)
778 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
781 yy_stack_print (yybottom, yytop)
782 yytype_int16 *yybottom;
786 YYFPRINTF (stderr, "Stack now");
787 for (; yybottom <= yytop; yybottom++)
789 int yybot = *yybottom;
790 YYFPRINTF (stderr, " %d", yybot);
792 YYFPRINTF (stderr, "\n");
795 # define YY_STACK_PRINT(Bottom, Top) \
798 yy_stack_print ((Bottom), (Top)); \
802 /*------------------------------------------------.
803 | Report that the YYRULE is going to be reduced. |
804 `------------------------------------------------*/
806 #if (defined __STDC__ || defined __C99__FUNC__ \
807 || defined __cplusplus || defined _MSC_VER)
809 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
812 yy_reduce_print (yyvsp, yyrule)
817 int yynrhs = yyr2[yyrule];
819 unsigned long int yylno = yyrline[yyrule];
820 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
822 /* The symbols being reduced. */
823 for (yyi = 0; yyi < yynrhs; yyi++)
825 YYFPRINTF (stderr, " $%d = ", yyi + 1);
826 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
827 &(yyvsp[(yyi + 1) - (yynrhs)])
829 YYFPRINTF (stderr, "\n");
833 # define YY_REDUCE_PRINT(Rule) \
836 yy_reduce_print (yyvsp, Rule); \
839 /* Nonzero means print parse trace. It is left uninitialized so that
840 multiple parsers can coexist. */
843 # define YYDPRINTF(Args)
844 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
845 # define YY_STACK_PRINT(Bottom, Top)
846 # define YY_REDUCE_PRINT(Rule)
847 #endif /* !YYDEBUG */
850 /* YYINITDEPTH -- initial size of the parser's stacks. */
852 # define YYINITDEPTH 200
855 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
856 if the built-in stack extension method is used).
858 Do not make this value too large; the results are undefined if
859 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
860 evaluated with infinite-precision integer arithmetic. */
863 # define YYMAXDEPTH 10000
871 # if defined __GLIBC__ && defined _STRING_H
872 # define yystrlen strlen
874 /* Return the length of YYSTR. */
875 #if (defined __STDC__ || defined __C99__FUNC__ \
876 || defined __cplusplus || defined _MSC_VER)
878 yystrlen (const char *yystr)
886 for (yylen = 0; yystr[yylen]; yylen++)
894 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
895 # define yystpcpy stpcpy
897 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
899 #if (defined __STDC__ || defined __C99__FUNC__ \
900 || defined __cplusplus || defined _MSC_VER)
902 yystpcpy (char *yydest, const char *yysrc)
905 yystpcpy (yydest, yysrc)
911 const char *yys = yysrc;
913 while ((*yyd++ = *yys++) != '\0')
922 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
923 quotes and backslashes, so that it's suitable for yyerror. The
924 heuristic is that double-quoting is unnecessary unless the string
925 contains an apostrophe, a comma, or backslash (other than
926 backslash-backslash). YYSTR is taken from yytname. If YYRES is
927 null, do not copy; instead, return the length of what the result
930 yytnamerr (char *yyres, const char *yystr)
935 char const *yyp = yystr;
942 goto do_not_strip_quotes;
946 goto do_not_strip_quotes;
959 do_not_strip_quotes: ;
963 return yystrlen (yystr);
965 return yystpcpy (yyres, yystr) - yyres;
969 /* Copy into YYRESULT an error message about the unexpected token
970 YYCHAR while in state YYSTATE. Return the number of bytes copied,
971 including the terminating null byte. If YYRESULT is null, do not
972 copy anything; just return the number of bytes that would be
973 copied. As a special case, return 0 if an ordinary "syntax error"
974 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
977 yysyntax_error (char *yyresult, int yystate, int yychar)
979 int yyn = yypact[yystate];
981 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
985 int yytype = YYTRANSLATE (yychar);
986 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
987 YYSIZE_T yysize = yysize0;
989 int yysize_overflow = 0;
990 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
991 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
995 /* This is so xgettext sees the translatable formats that are
996 constructed on the fly. */
997 YY_("syntax error, unexpected %s");
998 YY_("syntax error, unexpected %s, expecting %s");
999 YY_("syntax error, unexpected %s, expecting %s or %s");
1000 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1001 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1005 static char const yyunexpected[] = "syntax error, unexpected %s";
1006 static char const yyexpecting[] = ", expecting %s";
1007 static char const yyor[] = " or %s";
1008 char yyformat[sizeof yyunexpected
1009 + sizeof yyexpecting - 1
1010 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1011 * (sizeof yyor - 1))];
1012 char const *yyprefix = yyexpecting;
1014 /* Start YYX at -YYN if negative to avoid negative indexes in
1016 int yyxbegin = yyn < 0 ? -yyn : 0;
1018 /* Stay within bounds of both yycheck and yytname. */
1019 int yychecklim = YYLAST - yyn + 1;
1020 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1023 yyarg[0] = yytname[yytype];
1024 yyfmt = yystpcpy (yyformat, yyunexpected);
1026 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1027 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1029 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1033 yyformat[sizeof yyunexpected - 1] = '\0';
1036 yyarg[yycount++] = yytname[yyx];
1037 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1038 yysize_overflow |= (yysize1 < yysize);
1040 yyfmt = yystpcpy (yyfmt, yyprefix);
1044 yyf = YY_(yyformat);
1045 yysize1 = yysize + yystrlen (yyf);
1046 yysize_overflow |= (yysize1 < yysize);
1049 if (yysize_overflow)
1050 return YYSIZE_MAXIMUM;
1054 /* Avoid sprintf, as that infringes on the user's name space.
1055 Don't have undefined behavior even if the translation
1056 produced a string with the wrong number of "%s"s. */
1057 char *yyp = yyresult;
1059 while ((*yyp = *yyf) != '\0')
1061 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1063 yyp += yytnamerr (yyp, yyarg[yyi++]);
1076 #endif /* YYERROR_VERBOSE */
1079 /*-----------------------------------------------.
1080 | Release the memory associated to this symbol. |
1081 `-----------------------------------------------*/
1084 #if (defined __STDC__ || defined __C99__FUNC__ \
1085 || defined __cplusplus || defined _MSC_VER)
1087 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1090 yydestruct (yymsg, yytype, yyvaluep)
1100 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1110 /* Prevent warnings from -Wmissing-prototypes. */
1111 #ifdef YYPARSE_PARAM
1112 #if defined __STDC__ || defined __cplusplus
1113 int yyparse (void *YYPARSE_PARAM);
1117 #else /* ! YYPARSE_PARAM */
1118 #if defined __STDC__ || defined __cplusplus
1123 #endif /* ! YYPARSE_PARAM */
1126 /* The lookahead symbol. */
1129 /* The semantic value of the lookahead symbol. */
1132 /* Number of syntax errors so far. */
1137 /*-------------------------.
1138 | yyparse or yypush_parse. |
1139 `-------------------------*/
1141 #ifdef YYPARSE_PARAM
1142 #if (defined __STDC__ || defined __C99__FUNC__ \
1143 || defined __cplusplus || defined _MSC_VER)
1145 yyparse (void *YYPARSE_PARAM)
1148 yyparse (YYPARSE_PARAM)
1149 void *YYPARSE_PARAM;
1151 #else /* ! YYPARSE_PARAM */
1152 #if (defined __STDC__ || defined __C99__FUNC__ \
1153 || defined __cplusplus || defined _MSC_VER)
1166 /* Number of tokens to shift before error messages enabled. */
1169 /* The stacks and their tools:
1170 `yyss': related to states.
1171 `yyvs': related to semantic values.
1173 Refer to the stacks thru separate pointers, to allow yyoverflow
1174 to reallocate them elsewhere. */
1176 /* The state stack. */
1177 yytype_int16 yyssa[YYINITDEPTH];
1179 yytype_int16 *yyssp;
1181 /* The semantic value stack. */
1182 YYSTYPE yyvsa[YYINITDEPTH];
1186 YYSIZE_T yystacksize;
1190 /* Lookahead token as an internal (translated) token number. */
1192 /* The variables used to return semantic value and location from the
1197 /* Buffer for error messages, and its allocated size. */
1199 char *yymsg = yymsgbuf;
1200 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1203 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1205 /* The number of symbols on the RHS of the reduced rule.
1206 Keep to zero when no symbol should be popped. */
1212 yystacksize = YYINITDEPTH;
1214 YYDPRINTF ((stderr, "Starting parse\n"));
1219 yychar = YYEMPTY; /* Cause a token to be read. */
1221 /* Initialize stack pointers.
1222 Waste one element of value and location stack
1223 so that they stay on the same level as the state stack.
1224 The wasted elements are never initialized. */
1230 /*------------------------------------------------------------.
1231 | yynewstate -- Push a new state, which is found in yystate. |
1232 `------------------------------------------------------------*/
1234 /* In all cases, when you get here, the value and location stacks
1235 have just been pushed. So pushing a state here evens the stacks. */
1241 if (yyss + yystacksize - 1 <= yyssp)
1243 /* Get the current used size of the three stacks, in elements. */
1244 YYSIZE_T yysize = yyssp - yyss + 1;
1248 /* Give user a chance to reallocate the stack. Use copies of
1249 these so that the &'s don't force the real ones into
1251 YYSTYPE *yyvs1 = yyvs;
1252 yytype_int16 *yyss1 = yyss;
1254 /* Each stack pointer address is followed by the size of the
1255 data in use in that stack, in bytes. This used to be a
1256 conditional around just the two extra args, but that might
1257 be undefined if yyoverflow is a macro. */
1258 yyoverflow (YY_("memory exhausted"),
1259 &yyss1, yysize * sizeof (*yyssp),
1260 &yyvs1, yysize * sizeof (*yyvsp),
1266 #else /* no yyoverflow */
1267 # ifndef YYSTACK_RELOCATE
1268 goto yyexhaustedlab;
1270 /* Extend the stack our own way. */
1271 if (YYMAXDEPTH <= yystacksize)
1272 goto yyexhaustedlab;
1274 if (YYMAXDEPTH < yystacksize)
1275 yystacksize = YYMAXDEPTH;
1278 yytype_int16 *yyss1 = yyss;
1279 union yyalloc *yyptr =
1280 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1282 goto yyexhaustedlab;
1283 YYSTACK_RELOCATE (yyss_alloc, yyss);
1284 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1285 # undef YYSTACK_RELOCATE
1287 YYSTACK_FREE (yyss1);
1290 #endif /* no yyoverflow */
1292 yyssp = yyss + yysize - 1;
1293 yyvsp = yyvs + yysize - 1;
1295 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1296 (unsigned long int) yystacksize));
1298 if (yyss + yystacksize - 1 <= yyssp)
1302 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1304 if (yystate == YYFINAL)
1314 /* Do appropriate processing given the current state. Read a
1315 lookahead token if we need one and don't already have one. */
1317 /* First try to decide what to do without reference to lookahead token. */
1318 yyn = yypact[yystate];
1319 if (yyn == YYPACT_NINF)
1322 /* Not known => get a lookahead token if don't already have one. */
1324 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1325 if (yychar == YYEMPTY)
1327 YYDPRINTF ((stderr, "Reading a token: "));
1331 if (yychar <= YYEOF)
1333 yychar = yytoken = YYEOF;
1334 YYDPRINTF ((stderr, "Now at end of input.\n"));
1338 yytoken = YYTRANSLATE (yychar);
1339 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1342 /* If the proper action on seeing token YYTOKEN is to reduce or to
1343 detect an error, take that action. */
1345 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1350 if (yyn == 0 || yyn == YYTABLE_NINF)
1356 /* Count tokens shifted since error; after three, turn off error
1361 /* Shift the lookahead token. */
1362 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1364 /* Discard the shifted token. */
1373 /*-----------------------------------------------------------.
1374 | yydefault -- do the default action for the current state. |
1375 `-----------------------------------------------------------*/
1377 yyn = yydefact[yystate];
1383 /*-----------------------------.
1384 | yyreduce -- Do a reduction. |
1385 `-----------------------------*/
1387 /* yyn is the number of a rule to reduce with. */
1390 /* If YYLEN is nonzero, implement the default value of the action:
1393 Otherwise, the following line sets YYVAL to garbage.
1394 This behavior is undocumented and Bison
1395 users should not rely upon it. Assigning to YYVAL
1396 unconditionally makes the parser a bit smaller, and it avoids a
1397 GCC warning that YYVAL may be used uninitialized. */
1398 yyval = yyvsp[1-yylen];
1401 YY_REDUCE_PRINT (yyn);
1407 the_boot_info = build_boot_info((yyvsp[(3) - (4)].re), (yyvsp[(4) - (4)].node),
1408 guess_boot_cpuid((yyvsp[(4) - (4)].node)));
1422 (yyval.re) = chain_reserve_entry((yyvsp[(1) - (2)].re), (yyvsp[(2) - (2)].re));
1429 (yyval.re) = build_reserve_entry((yyvsp[(2) - (4)].addr), (yyvsp[(3) - (4)].addr));
1436 add_label(&(yyvsp[(2) - (2)].re)->labels, (yyvsp[(1) - (2)].labelref));
1437 (yyval.re) = (yyvsp[(2) - (2)].re);
1444 (yyval.addr) = eval_literal((yyvsp[(1) - (1)].literal), 0, 64);
1451 (yyval.node) = name_node((yyvsp[(2) - (2)].node), "");
1458 (yyval.node) = merge_nodes((yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
1465 struct node *target = get_node_by_ref((yyvsp[(1) - (3)].node), (yyvsp[(2) - (3)].labelref));
1468 merge_nodes(target, (yyvsp[(3) - (3)].node));
1470 print_error("label or path, '%s', not found", (yyvsp[(2) - (3)].labelref));
1471 (yyval.node) = (yyvsp[(1) - (3)].node);
1478 (yyval.node) = build_node((yyvsp[(2) - (5)].proplist), (yyvsp[(3) - (5)].nodelist));
1485 (yyval.proplist) = NULL;
1492 (yyval.proplist) = chain_property((yyvsp[(2) - (2)].prop), (yyvsp[(1) - (2)].proplist));
1499 (yyval.prop) = build_property((yyvsp[(1) - (4)].propnodename), (yyvsp[(3) - (4)].data));
1506 (yyval.prop) = build_property((yyvsp[(1) - (2)].propnodename), empty_data);
1513 add_label(&(yyvsp[(2) - (2)].prop)->labels, (yyvsp[(1) - (2)].labelref));
1514 (yyval.prop) = (yyvsp[(2) - (2)].prop);
1521 (yyval.data) = data_merge((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].data));
1528 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1535 (yyval.data) = data_merge((yyvsp[(1) - (4)].data), (yyvsp[(3) - (4)].data));
1542 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), REF_PATH, (yyvsp[(2) - (2)].labelref));
1549 FILE *f = srcfile_relative_open((yyvsp[(4) - (9)].data).val, NULL);
1552 if ((yyvsp[(6) - (9)].addr) != 0)
1553 if (fseek(f, (yyvsp[(6) - (9)].addr), SEEK_SET) != 0)
1554 print_error("Couldn't seek to offset %llu in \"%s\": %s",
1555 (unsigned long long)(yyvsp[(6) - (9)].addr),
1556 (yyvsp[(4) - (9)].data).val,
1559 d = data_copy_file(f, (yyvsp[(8) - (9)].addr));
1561 (yyval.data) = data_merge((yyvsp[(1) - (9)].data), d);
1569 FILE *f = srcfile_relative_open((yyvsp[(4) - (5)].data).val, NULL);
1570 struct data d = empty_data;
1572 d = data_copy_file(f, -1);
1574 (yyval.data) = data_merge((yyvsp[(1) - (5)].data), d);
1582 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1589 (yyval.data) = empty_data;
1596 (yyval.data) = (yyvsp[(1) - (2)].data);
1603 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1610 (yyval.data) = empty_data;
1617 (yyval.data) = data_append_cell((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].cell));
1624 (yyval.data) = data_append_cell(data_add_marker((yyvsp[(1) - (2)].data), REF_PHANDLE,
1625 (yyvsp[(2) - (2)].labelref)), -1);
1632 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1639 (yyval.cell) = eval_literal((yyvsp[(1) - (1)].literal), 0, 32);
1646 (yyval.data) = empty_data;
1653 (yyval.data) = data_append_byte((yyvsp[(1) - (2)].data), (yyvsp[(2) - (2)].byte));
1660 (yyval.data) = data_add_marker((yyvsp[(1) - (2)].data), LABEL, (yyvsp[(2) - (2)].labelref));
1667 (yyval.nodelist) = NULL;
1674 (yyval.nodelist) = chain_node((yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].nodelist));
1681 print_error("syntax error: properties must precede subnodes");
1689 (yyval.node) = name_node((yyvsp[(2) - (2)].node), (yyvsp[(1) - (2)].propnodename));
1696 add_label(&(yyvsp[(2) - (2)].node)->labels, (yyvsp[(1) - (2)].labelref));
1697 (yyval.node) = (yyvsp[(2) - (2)].node);
1705 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1709 YY_STACK_PRINT (yyss, yyssp);
1713 /* Now `shift' the result of the reduction. Determine what state
1714 that goes to, based on the state we popped back to and the rule
1715 number reduced by. */
1719 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1720 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1721 yystate = yytable[yystate];
1723 yystate = yydefgoto[yyn - YYNTOKENS];
1728 /*------------------------------------.
1729 | yyerrlab -- here on detecting error |
1730 `------------------------------------*/
1732 /* If not already recovering from an error, report this error. */
1736 #if ! YYERROR_VERBOSE
1737 yyerror (YY_("syntax error"));
1740 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1741 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1743 YYSIZE_T yyalloc = 2 * yysize;
1744 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1745 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1746 if (yymsg != yymsgbuf)
1747 YYSTACK_FREE (yymsg);
1748 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1750 yymsg_alloc = yyalloc;
1754 yymsg_alloc = sizeof yymsgbuf;
1758 if (0 < yysize && yysize <= yymsg_alloc)
1760 (void) yysyntax_error (yymsg, yystate, yychar);
1765 yyerror (YY_("syntax error"));
1767 goto yyexhaustedlab;
1775 if (yyerrstatus == 3)
1777 /* If just tried and failed to reuse lookahead token after an
1778 error, discard it. */
1780 if (yychar <= YYEOF)
1782 /* Return failure if at end of input. */
1783 if (yychar == YYEOF)
1788 yydestruct ("Error: discarding",
1794 /* Else will try to reuse lookahead token after shifting the error
1799 /*---------------------------------------------------.
1800 | yyerrorlab -- error raised explicitly by YYERROR. |
1801 `---------------------------------------------------*/
1804 /* Pacify compilers like GCC when the user code never invokes
1805 YYERROR and the label yyerrorlab therefore never appears in user
1807 if (/*CONSTCOND*/ 0)
1810 /* Do not reclaim the symbols of the rule which action triggered
1814 YY_STACK_PRINT (yyss, yyssp);
1819 /*-------------------------------------------------------------.
1820 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1821 `-------------------------------------------------------------*/
1823 yyerrstatus = 3; /* Each real token shifted decrements this. */
1827 yyn = yypact[yystate];
1828 if (yyn != YYPACT_NINF)
1831 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1839 /* Pop the current state because it cannot handle the error token. */
1844 yydestruct ("Error: popping",
1845 yystos[yystate], yyvsp);
1848 YY_STACK_PRINT (yyss, yyssp);
1854 /* Shift the error token. */
1855 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1861 /*-------------------------------------.
1862 | yyacceptlab -- YYACCEPT comes here. |
1863 `-------------------------------------*/
1868 /*-----------------------------------.
1869 | yyabortlab -- YYABORT comes here. |
1870 `-----------------------------------*/
1875 #if !defined(yyoverflow) || YYERROR_VERBOSE
1876 /*-------------------------------------------------.
1877 | yyexhaustedlab -- memory exhaustion comes here. |
1878 `-------------------------------------------------*/
1880 yyerror (YY_("memory exhausted"));
1886 if (yychar != YYEMPTY)
1887 yydestruct ("Cleanup: discarding lookahead",
1889 /* Do not reclaim the symbols of the rule which action triggered
1890 this YYABORT or YYACCEPT. */
1892 YY_STACK_PRINT (yyss, yyssp);
1893 while (yyssp != yyss)
1895 yydestruct ("Cleanup: popping",
1896 yystos[*yyssp], yyvsp);
1901 YYSTACK_FREE (yyss);
1904 if (yymsg != yymsgbuf)
1905 YYSTACK_FREE (yymsg);
1907 /* Make sure YYID is used. */
1908 return YYID (yyresult);
1915 void print_error(char const *fmt, ...)
1920 srcpos_verror(&yylloc, fmt, va);
1923 treesource_error = 1;
1926 void yyerror(char const *s) {
1927 print_error("%s", s);
1930 static unsigned long long eval_literal(const char *s, int base, int bits)
1932 unsigned long long val;
1936 val = strtoull(s, &e, base);
1938 print_error("bad characters in literal");
1939 else if ((errno == ERANGE)
1940 || ((bits < 64) && (val >= (1ULL << bits))))
1941 print_error("literal out of range");
1942 else if (errno != 0)
1943 print_error("bad literal");