AUTHORS, util/: Drop individual copyright notices
[coreboot.git] / util / sconfig / sconfig.tab.c_shipped
blobf0233a500cc9cc36c9bb5ff7e10d79961b01e34d
1 /* A Bison parser, made by GNU Bison 3.5.4.  */
3 /* Bison implementation for Yacc-like parsers in C
5    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6    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 /* Undocumented macros, especially those whose name start with YY_,
45    are private implementation details.  Do not rely on them.  */
47 /* Identify Bison output.  */
48 #define YYBISON 1
50 /* Bison version.  */
51 #define YYBISON_VERSION "3.5.4"
53 /* Skeleton name.  */
54 #define YYSKELETON_NAME "yacc.c"
56 /* Pure parsers.  */
57 #define YYPURE 0
59 /* Push parsers.  */
60 #define YYPUSH 0
62 /* Pull parsers.  */
63 #define YYPULL 1
68 /* First part of user prologue.  */
70 /* sconfig, coreboot device tree compiler */
72  * This program is free software; you can redistribute it and/or modify
73  * it under the terms of the GNU General Public License as published by
74  * the Free Software Foundation; version 2 of the License.
75  *
76  * This program is distributed in the hope that it will be useful,
77  * but WITHOUT ANY WARRANTY; without even the implied warranty of
78  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
79  * GNU General Public License for more details.
80  */
82 #include "sconfig.h"
84 int yylex();
85 void yyerror(const char *s);
87 static struct bus *cur_parent;
88 static struct chip_instance *cur_chip_instance;
92 # ifndef YY_CAST
93 #  ifdef __cplusplus
94 #   define YY_CAST(Type, Val) static_cast<Type> (Val)
95 #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
96 #  else
97 #   define YY_CAST(Type, Val) ((Type) (Val))
98 #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
99 #  endif
100 # endif
101 # ifndef YY_NULLPTR
102 #  if defined __cplusplus
103 #   if 201103L <= __cplusplus
104 #    define YY_NULLPTR nullptr
105 #   else
106 #    define YY_NULLPTR 0
107 #   endif
108 #  else
109 #   define YY_NULLPTR ((void*)0)
110 #  endif
111 # endif
113 /* Enabling verbose error messages.  */
114 #ifdef YYERROR_VERBOSE
115 # undef YYERROR_VERBOSE
116 # define YYERROR_VERBOSE 1
117 #else
118 # define YYERROR_VERBOSE 0
119 #endif
121 /* Use api.header.include to #include this header
122    instead of duplicating it here.  */
123 #ifndef YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
124 # define YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
125 /* Debug traces.  */
126 #ifndef YYDEBUG
127 # define YYDEBUG 0
128 #endif
129 #if YYDEBUG
130 extern int yydebug;
131 #endif
133 /* Token type.  */
134 #ifndef YYTOKENTYPE
135 # define YYTOKENTYPE
136   enum yytokentype
137   {
138     CHIP = 258,
139     DEVICE = 259,
140     REGISTER = 260,
141     BOOL = 261,
142     STATUS = 262,
143     MANDATORY = 263,
144     BUS = 264,
145     RESOURCE = 265,
146     END = 266,
147     EQUALS = 267,
148     HEX = 268,
149     STRING = 269,
150     PCI = 270,
151     PNP = 271,
152     I2C = 272,
153     APIC = 273,
154     CPU_CLUSTER = 274,
155     CPU = 275,
156     DOMAIN = 276,
157     IRQ = 277,
158     DRQ = 278,
159     SLOT_DESC = 279,
160     IO = 280,
161     NUMBER = 281,
162     SUBSYSTEMID = 282,
163     INHERIT = 283,
164     IOAPIC_IRQ = 284,
165     IOAPIC = 285,
166     PCIINT = 286,
167     GENERIC = 287,
168     SPI = 288,
169     USB = 289,
170     MMIO = 290
171   };
172 #endif
174 /* Value type.  */
175 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
176 union YYSTYPE
179         struct device *dev;
180         struct chip_instance *chip_instance;
181         char *string;
182         int number;
186 typedef union YYSTYPE YYSTYPE;
187 # define YYSTYPE_IS_TRIVIAL 1
188 # define YYSTYPE_IS_DECLARED 1
189 #endif
192 extern YYSTYPE yylval;
194 int yyparse (void);
196 #endif /* !YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED  */
200 #ifdef short
201 # undef short
202 #endif
204 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
205    <limits.h> and (if available) <stdint.h> are included
206    so that the code can choose integer types of a good width.  */
208 #ifndef __PTRDIFF_MAX__
209 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
210 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
211 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
212 #  define YY_STDINT_H
213 # endif
214 #endif
216 /* Narrow types that promote to a signed type and that can represent a
217    signed or unsigned integer of at least N bits.  In tables they can
218    save space and decrease cache pressure.  Promoting to a signed type
219    helps avoid bugs in integer arithmetic.  */
221 #ifdef __INT_LEAST8_MAX__
222 typedef __INT_LEAST8_TYPE__ yytype_int8;
223 #elif defined YY_STDINT_H
224 typedef int_least8_t yytype_int8;
225 #else
226 typedef signed char yytype_int8;
227 #endif
229 #ifdef __INT_LEAST16_MAX__
230 typedef __INT_LEAST16_TYPE__ yytype_int16;
231 #elif defined YY_STDINT_H
232 typedef int_least16_t yytype_int16;
233 #else
234 typedef short yytype_int16;
235 #endif
237 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
238 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
239 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
240        && UINT_LEAST8_MAX <= INT_MAX)
241 typedef uint_least8_t yytype_uint8;
242 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
243 typedef unsigned char yytype_uint8;
244 #else
245 typedef short yytype_uint8;
246 #endif
248 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
249 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
250 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
251        && UINT_LEAST16_MAX <= INT_MAX)
252 typedef uint_least16_t yytype_uint16;
253 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
254 typedef unsigned short yytype_uint16;
255 #else
256 typedef int yytype_uint16;
257 #endif
259 #ifndef YYPTRDIFF_T
260 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
261 #  define YYPTRDIFF_T __PTRDIFF_TYPE__
262 #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
263 # elif defined PTRDIFF_MAX
264 #  ifndef ptrdiff_t
265 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
266 #  endif
267 #  define YYPTRDIFF_T ptrdiff_t
268 #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
269 # else
270 #  define YYPTRDIFF_T long
271 #  define YYPTRDIFF_MAXIMUM LONG_MAX
272 # endif
273 #endif
275 #ifndef YYSIZE_T
276 # ifdef __SIZE_TYPE__
277 #  define YYSIZE_T __SIZE_TYPE__
278 # elif defined size_t
279 #  define YYSIZE_T size_t
280 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
281 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
282 #  define YYSIZE_T size_t
283 # else
284 #  define YYSIZE_T unsigned
285 # endif
286 #endif
288 #define YYSIZE_MAXIMUM                                  \
289   YY_CAST (YYPTRDIFF_T,                                 \
290            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
291             ? YYPTRDIFF_MAXIMUM                         \
292             : YY_CAST (YYSIZE_T, -1)))
294 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
296 /* Stored state numbers (used for stacks). */
297 typedef yytype_int8 yy_state_t;
299 /* State numbers in computations.  */
300 typedef int yy_state_fast_t;
302 #ifndef YY_
303 # if defined YYENABLE_NLS && YYENABLE_NLS
304 #  if ENABLE_NLS
305 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
306 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
307 #  endif
308 # endif
309 # ifndef YY_
310 #  define YY_(Msgid) Msgid
311 # endif
312 #endif
314 #ifndef YY_ATTRIBUTE_PURE
315 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
316 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
317 # else
318 #  define YY_ATTRIBUTE_PURE
319 # endif
320 #endif
322 #ifndef YY_ATTRIBUTE_UNUSED
323 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
324 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
325 # else
326 #  define YY_ATTRIBUTE_UNUSED
327 # endif
328 #endif
330 /* Suppress unused-variable warnings by "using" E.  */
331 #if ! defined lint || defined __GNUC__
332 # define YYUSE(E) ((void) (E))
333 #else
334 # define YYUSE(E) /* empty */
335 #endif
337 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
338 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
339 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
340     _Pragma ("GCC diagnostic push")                                     \
341     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
342     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
343 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
344     _Pragma ("GCC diagnostic pop")
345 #else
346 # define YY_INITIAL_VALUE(Value) Value
347 #endif
348 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
349 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
350 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
351 #endif
352 #ifndef YY_INITIAL_VALUE
353 # define YY_INITIAL_VALUE(Value) /* Nothing. */
354 #endif
356 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
357 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
358     _Pragma ("GCC diagnostic push")                            \
359     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
360 # define YY_IGNORE_USELESS_CAST_END            \
361     _Pragma ("GCC diagnostic pop")
362 #endif
363 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
364 # define YY_IGNORE_USELESS_CAST_BEGIN
365 # define YY_IGNORE_USELESS_CAST_END
366 #endif
369 #define YY_ASSERT(E) ((void) (0 && (E)))
371 #if ! defined yyoverflow || YYERROR_VERBOSE
373 /* The parser invokes alloca or malloc; define the necessary symbols.  */
375 # ifdef YYSTACK_USE_ALLOCA
376 #  if YYSTACK_USE_ALLOCA
377 #   ifdef __GNUC__
378 #    define YYSTACK_ALLOC __builtin_alloca
379 #   elif defined __BUILTIN_VA_ARG_INCR
380 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
381 #   elif defined _AIX
382 #    define YYSTACK_ALLOC __alloca
383 #   elif defined _MSC_VER
384 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
385 #    define alloca _alloca
386 #   else
387 #    define YYSTACK_ALLOC alloca
388 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
389 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
390       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
391 #     ifndef EXIT_SUCCESS
392 #      define EXIT_SUCCESS 0
393 #     endif
394 #    endif
395 #   endif
396 #  endif
397 # endif
399 # ifdef YYSTACK_ALLOC
400    /* Pacify GCC's 'empty if-body' warning.  */
401 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
402 #  ifndef YYSTACK_ALLOC_MAXIMUM
403     /* The OS might guarantee only one guard page at the bottom of the stack,
404        and a page size can be as small as 4096 bytes.  So we cannot safely
405        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
406        to allow for a few compiler-allocated temporary stack slots.  */
407 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
408 #  endif
409 # else
410 #  define YYSTACK_ALLOC YYMALLOC
411 #  define YYSTACK_FREE YYFREE
412 #  ifndef YYSTACK_ALLOC_MAXIMUM
413 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
414 #  endif
415 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
416        && ! ((defined YYMALLOC || defined malloc) \
417              && (defined YYFREE || defined free)))
418 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
419 #   ifndef EXIT_SUCCESS
420 #    define EXIT_SUCCESS 0
421 #   endif
422 #  endif
423 #  ifndef YYMALLOC
424 #   define YYMALLOC malloc
425 #   if ! defined malloc && ! defined EXIT_SUCCESS
426 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
427 #   endif
428 #  endif
429 #  ifndef YYFREE
430 #   define YYFREE free
431 #   if ! defined free && ! defined EXIT_SUCCESS
432 void free (void *); /* INFRINGES ON USER NAME SPACE */
433 #   endif
434 #  endif
435 # endif
436 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
439 #if (! defined yyoverflow \
440      && (! defined __cplusplus \
441          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
443 /* A type that is properly aligned for any stack member.  */
444 union yyalloc
446   yy_state_t yyss_alloc;
447   YYSTYPE yyvs_alloc;
450 /* The size of the maximum gap between one aligned stack and the next.  */
451 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
453 /* The size of an array large to enough to hold all stacks, each with
454    N elements.  */
455 # define YYSTACK_BYTES(N) \
456      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
457       + YYSTACK_GAP_MAXIMUM)
459 # define YYCOPY_NEEDED 1
461 /* Relocate STACK from its old location to the new one.  The
462    local variables YYSIZE and YYSTACKSIZE give the old and new number of
463    elements in the stack, and YYPTR gives the new location of the
464    stack.  Advance YYPTR to a properly aligned location for the next
465    stack.  */
466 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
467     do                                                                  \
468       {                                                                 \
469         YYPTRDIFF_T yynewbytes;                                         \
470         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
471         Stack = &yyptr->Stack_alloc;                                    \
472         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
473         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
474       }                                                                 \
475     while (0)
477 #endif
479 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
480 /* Copy COUNT objects from SRC to DST.  The source and destination do
481    not overlap.  */
482 # ifndef YYCOPY
483 #  if defined __GNUC__ && 1 < __GNUC__
484 #   define YYCOPY(Dst, Src, Count) \
485       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
486 #  else
487 #   define YYCOPY(Dst, Src, Count)              \
488       do                                        \
489         {                                       \
490           YYPTRDIFF_T yyi;                      \
491           for (yyi = 0; yyi < (Count); yyi++)   \
492             (Dst)[yyi] = (Src)[yyi];            \
493         }                                       \
494       while (0)
495 #  endif
496 # endif
497 #endif /* !YYCOPY_NEEDED */
499 /* YYFINAL -- State number of the termination state.  */
500 #define YYFINAL  3
501 /* YYLAST -- Last index in YYTABLE.  */
502 #define YYLAST   45
504 /* YYNTOKENS -- Number of terminals.  */
505 #define YYNTOKENS  36
506 /* YYNNTS -- Number of nonterminals.  */
507 #define YYNNTS  15
508 /* YYNRULES -- Number of rules.  */
509 #define YYNRULES  29
510 /* YYNSTATES -- Number of states.  */
511 #define YYNSTATES  50
513 #define YYUNDEFTOK  2
514 #define YYMAXUTOK   290
517 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
518    as returned by yylex, with out-of-bounds checking.  */
519 #define YYTRANSLATE(YYX)                                                \
520   (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
522 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
523    as returned by yylex.  */
524 static const yytype_int8 yytranslate[] =
526        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
527        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
528        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
529        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
530        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
531        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
532        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
533        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
534        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
535        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
536        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
537        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
538        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
539        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
540        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
541        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
542        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
543        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
544        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
545        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
546        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
547        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
548        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
549        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
550        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
551        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
552        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
553       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
554       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
555       35
558 #if YYDEBUG
559   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
560 static const yytype_int8 yyrline[] =
562        0,    36,    36,    36,    38,    38,    38,    38,    40,    40,
563       40,    40,    40,    40,    40,    40,    42,    42,    51,    51,
564       59,    59,    61,    64,    67,    70,    73,    76,    79,    82
566 #endif
568 #if YYDEBUG || YYERROR_VERBOSE || 0
569 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
570    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
571 static const char *const yytname[] =
573   "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
574   "STATUS", "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX",
575   "STRING", "PCI", "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN",
576   "IRQ", "DRQ", "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
577   "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
578   "$accept", "devtree", "$@1", "chipchildren", "devicechildren", "chip",
579   "@2", "device", "@3", "status", "resource", "registers", "subsystemid",
580   "ioapic_irq", "smbios_slot_desc", YY_NULLPTR
582 #endif
584 # ifdef YYPRINT
585 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
586    (internal) symbol number NUM (which must be that of a token).  */
587 static const yytype_int16 yytoknum[] =
589        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
590      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
591      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
592      285,   286,   287,   288,   289,   290
594 # endif
596 #define YYPACT_NINF (-10)
598 #define yypact_value_is_default(Yyn) \
599   ((Yyn) == YYPACT_NINF)
601 #define YYTABLE_NINF (-1)
603 #define yytable_value_is_error(Yyn) \
604   0
606   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
607      STATE-NUM.  */
608 static const yytype_int8 yypact[] =
610      -10,    11,    10,   -10,     0,   -10,   -10,   -10,     1,     6,
611        2,   -10,   -10,   -10,   -10,    -9,     8,     3,     4,   -10,
612      -10,   -10,   -10,   -10,    -3,    -4,   -10,     9,    -1,     5,
613      -10,   -10,   -10,   -10,   -10,   -10,   -10,    15,    14,     7,
614       -2,    12,    16,    13,    17,   -10,    18,   -10,   -10,   -10
617   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
618      Performed when YYTABLE does not specify something else to do.  Zero
619      means the default is an error.  */
620 static const yytype_int8 yydefact[] =
622        2,     0,     0,     1,     0,     3,    16,     7,     0,     0,
623        0,    17,     5,     4,     6,     0,     0,     0,     0,    20,
624       21,    18,    23,    15,     0,     0,    19,     0,     0,     0,
625        9,     8,    10,    14,    11,    12,    13,     0,     0,     0,
626        0,     0,    29,    24,     0,    22,    28,    25,    26,    27
629   /* YYPGOTO[NTERM-NUM].  */
630 static const yytype_int8 yypgoto[] =
632      -10,   -10,   -10,   -10,   -10,    -5,   -10,    20,   -10,   -10,
633      -10,    21,   -10,   -10,   -10
636   /* YYDEFGOTO[NTERM-NUM].  */
637 static const yytype_int8 yydefgoto[] =
639       -1,     1,     2,     8,    24,     5,     7,    13,    23,    21,
640       32,    14,    34,    35,    36
643   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
644      positive, shift that token.  If negative, reduce the rule whose
645      number is the opposite.  If YYTABLE_NINF, syntax error.  */
646 static const yytype_int8 yytable[] =
648        4,     9,    10,    12,     4,     9,    10,    25,    26,    19,
649       20,     3,    11,     4,     6,    15,    16,    17,    22,    30,
650       18,    27,    37,    38,    28,    39,    29,    41,    42,    44,
651       46,    40,    49,    43,     0,     0,     0,     0,    45,     0,
652        0,    47,     0,    48,    31,    33
655 static const yytype_int8 yycheck[] =
657        3,     4,     5,     8,     3,     4,     5,    10,    11,     6,
658        7,     0,    11,     3,    14,     9,    14,    26,    14,    24,
659       12,    24,    26,    14,    27,    26,    29,    12,    14,    31,
660       14,    26,    14,    26,    -1,    -1,    -1,    -1,    26,    -1,
661       -1,    28,    -1,    26,    24,    24
664   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
665      symbol of state STATE-NUM.  */
666 static const yytype_int8 yystos[] =
668        0,    37,    38,     0,     3,    41,    14,    42,    39,     4,
669        5,    11,    41,    43,    47,     9,    14,    26,    12,     6,
670        7,    45,    14,    44,    40,    10,    11,    24,    27,    29,
671       41,    43,    46,    47,    48,    49,    50,    26,    14,    26,
672       26,    12,    14,    26,    31,    26,    14,    28,    26,    14
675   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
676 static const yytype_int8 yyr1[] =
678        0,    36,    38,    37,    39,    39,    39,    39,    40,    40,
679       40,    40,    40,    40,    40,    40,    42,    41,    44,    43,
680       45,    45,    46,    47,    48,    48,    49,    50,    50,    50
683   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
684 static const yytype_int8 yyr2[] =
686        0,     2,     0,     2,     2,     2,     2,     0,     2,     2,
687        2,     2,     2,     2,     2,     0,     0,     5,     0,     7,
688        1,     1,     4,     4,     3,     4,     4,     5,     4,     3
692 #define yyerrok         (yyerrstatus = 0)
693 #define yyclearin       (yychar = YYEMPTY)
694 #define YYEMPTY         (-2)
695 #define YYEOF           0
697 #define YYACCEPT        goto yyacceptlab
698 #define YYABORT         goto yyabortlab
699 #define YYERROR         goto yyerrorlab
702 #define YYRECOVERING()  (!!yyerrstatus)
704 #define YYBACKUP(Token, Value)                                    \
705   do                                                              \
706     if (yychar == YYEMPTY)                                        \
707       {                                                           \
708         yychar = (Token);                                         \
709         yylval = (Value);                                         \
710         YYPOPSTACK (yylen);                                       \
711         yystate = *yyssp;                                         \
712         goto yybackup;                                            \
713       }                                                           \
714     else                                                          \
715       {                                                           \
716         yyerror (YY_("syntax error: cannot back up")); \
717         YYERROR;                                                  \
718       }                                                           \
719   while (0)
721 /* Error token number */
722 #define YYTERROR        1
723 #define YYERRCODE       256
727 /* Enable debugging if requested.  */
728 #if YYDEBUG
730 # ifndef YYFPRINTF
731 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
732 #  define YYFPRINTF fprintf
733 # endif
735 # define YYDPRINTF(Args)                        \
736 do {                                            \
737   if (yydebug)                                  \
738     YYFPRINTF Args;                             \
739 } while (0)
741 /* This macro is provided for backward compatibility. */
742 #ifndef YY_LOCATION_PRINT
743 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
744 #endif
747 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
748 do {                                                                      \
749   if (yydebug)                                                            \
750     {                                                                     \
751       YYFPRINTF (stderr, "%s ", Title);                                   \
752       yy_symbol_print (stderr,                                            \
753                   Type, Value); \
754       YYFPRINTF (stderr, "\n");                                           \
755     }                                                                     \
756 } while (0)
759 /*-----------------------------------.
760 | Print this symbol's value on YYO.  |
761 `-----------------------------------*/
763 static void
764 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
766   FILE *yyoutput = yyo;
767   YYUSE (yyoutput);
768   if (!yyvaluep)
769     return;
770 # ifdef YYPRINT
771   if (yytype < YYNTOKENS)
772     YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
773 # endif
774   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
775   YYUSE (yytype);
776   YY_IGNORE_MAYBE_UNINITIALIZED_END
780 /*---------------------------.
781 | Print this symbol on YYO.  |
782 `---------------------------*/
784 static void
785 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
787   YYFPRINTF (yyo, "%s %s (",
788              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
790   yy_symbol_value_print (yyo, yytype, yyvaluep);
791   YYFPRINTF (yyo, ")");
794 /*------------------------------------------------------------------.
795 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
796 | TOP (included).                                                   |
797 `------------------------------------------------------------------*/
799 static void
800 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
802   YYFPRINTF (stderr, "Stack now");
803   for (; yybottom <= yytop; yybottom++)
804     {
805       int yybot = *yybottom;
806       YYFPRINTF (stderr, " %d", yybot);
807     }
808   YYFPRINTF (stderr, "\n");
811 # define YY_STACK_PRINT(Bottom, Top)                            \
812 do {                                                            \
813   if (yydebug)                                                  \
814     yy_stack_print ((Bottom), (Top));                           \
815 } while (0)
818 /*------------------------------------------------.
819 | Report that the YYRULE is going to be reduced.  |
820 `------------------------------------------------*/
822 static void
823 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
825   int yylno = yyrline[yyrule];
826   int yynrhs = yyr2[yyrule];
827   int yyi;
828   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
829              yyrule - 1, yylno);
830   /* The symbols being reduced.  */
831   for (yyi = 0; yyi < yynrhs; yyi++)
832     {
833       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
834       yy_symbol_print (stderr,
835                        yystos[+yyssp[yyi + 1 - yynrhs]],
836                        &yyvsp[(yyi + 1) - (yynrhs)]
837                                               );
838       YYFPRINTF (stderr, "\n");
839     }
842 # define YY_REDUCE_PRINT(Rule)          \
843 do {                                    \
844   if (yydebug)                          \
845     yy_reduce_print (yyssp, yyvsp, Rule); \
846 } while (0)
848 /* Nonzero means print parse trace.  It is left uninitialized so that
849    multiple parsers can coexist.  */
850 int yydebug;
851 #else /* !YYDEBUG */
852 # define YYDPRINTF(Args)
853 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
854 # define YY_STACK_PRINT(Bottom, Top)
855 # define YY_REDUCE_PRINT(Rule)
856 #endif /* !YYDEBUG */
859 /* YYINITDEPTH -- initial size of the parser's stacks.  */
860 #ifndef YYINITDEPTH
861 # define YYINITDEPTH 200
862 #endif
864 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
865    if the built-in stack extension method is used).
867    Do not make this value too large; the results are undefined if
868    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
869    evaluated with infinite-precision integer arithmetic.  */
871 #ifndef YYMAXDEPTH
872 # define YYMAXDEPTH 10000
873 #endif
876 #if YYERROR_VERBOSE
878 # ifndef yystrlen
879 #  if defined __GLIBC__ && defined _STRING_H
880 #   define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
881 #  else
882 /* Return the length of YYSTR.  */
883 static YYPTRDIFF_T
884 yystrlen (const char *yystr)
886   YYPTRDIFF_T yylen;
887   for (yylen = 0; yystr[yylen]; yylen++)
888     continue;
889   return yylen;
891 #  endif
892 # endif
894 # ifndef yystpcpy
895 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
896 #   define yystpcpy stpcpy
897 #  else
898 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
899    YYDEST.  */
900 static char *
901 yystpcpy (char *yydest, const char *yysrc)
903   char *yyd = yydest;
904   const char *yys = yysrc;
906   while ((*yyd++ = *yys++) != '\0')
907     continue;
909   return yyd - 1;
911 #  endif
912 # endif
914 # ifndef yytnamerr
915 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
916    quotes and backslashes, so that it's suitable for yyerror.  The
917    heuristic is that double-quoting is unnecessary unless the string
918    contains an apostrophe, a comma, or backslash (other than
919    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
920    null, do not copy; instead, return the length of what the result
921    would have been.  */
922 static YYPTRDIFF_T
923 yytnamerr (char *yyres, const char *yystr)
925   if (*yystr == '"')
926     {
927       YYPTRDIFF_T yyn = 0;
928       char const *yyp = yystr;
930       for (;;)
931         switch (*++yyp)
932           {
933           case '\'':
934           case ',':
935             goto do_not_strip_quotes;
937           case '\\':
938             if (*++yyp != '\\')
939               goto do_not_strip_quotes;
940             else
941               goto append;
943           append:
944           default:
945             if (yyres)
946               yyres[yyn] = *yyp;
947             yyn++;
948             break;
950           case '"':
951             if (yyres)
952               yyres[yyn] = '\0';
953             return yyn;
954           }
955     do_not_strip_quotes: ;
956     }
958   if (yyres)
959     return yystpcpy (yyres, yystr) - yyres;
960   else
961     return yystrlen (yystr);
963 # endif
965 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
966    about the unexpected token YYTOKEN for the state stack whose top is
967    YYSSP.
969    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
970    not large enough to hold the message.  In that case, also set
971    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
972    required number of bytes is too large to store.  */
973 static int
974 yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
975                 yy_state_t *yyssp, int yytoken)
977   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
978   /* Internationalized format string. */
979   const char *yyformat = YY_NULLPTR;
980   /* Arguments of yyformat: reported tokens (one for the "unexpected",
981      one per "expected"). */
982   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
983   /* Actual size of YYARG. */
984   int yycount = 0;
985   /* Cumulated lengths of YYARG.  */
986   YYPTRDIFF_T yysize = 0;
988   /* There are many possibilities here to consider:
989      - If this state is a consistent state with a default action, then
990        the only way this function was invoked is if the default action
991        is an error action.  In that case, don't check for expected
992        tokens because there are none.
993      - The only way there can be no lookahead present (in yychar) is if
994        this state is a consistent state with a default action.  Thus,
995        detecting the absence of a lookahead is sufficient to determine
996        that there is no unexpected or expected token to report.  In that
997        case, just report a simple "syntax error".
998      - Don't assume there isn't a lookahead just because this state is a
999        consistent state with a default action.  There might have been a
1000        previous inconsistent state, consistent state with a non-default
1001        action, or user semantic action that manipulated yychar.
1002      - Of course, the expected token list depends on states to have
1003        correct lookahead information, and it depends on the parser not
1004        to perform extra reductions after fetching a lookahead from the
1005        scanner and before detecting a syntax error.  Thus, state merging
1006        (from LALR or IELR) and default reductions corrupt the expected
1007        token list.  However, the list is correct for canonical LR with
1008        one exception: it will still contain any token that will not be
1009        accepted due to an error action in a later state.
1010   */
1011   if (yytoken != YYEMPTY)
1012     {
1013       int yyn = yypact[+*yyssp];
1014       YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1015       yysize = yysize0;
1016       yyarg[yycount++] = yytname[yytoken];
1017       if (!yypact_value_is_default (yyn))
1018         {
1019           /* Start YYX at -YYN if negative to avoid negative indexes in
1020              YYCHECK.  In other words, skip the first -YYN actions for
1021              this state because they are default actions.  */
1022           int yyxbegin = yyn < 0 ? -yyn : 0;
1023           /* Stay within bounds of both yycheck and yytname.  */
1024           int yychecklim = YYLAST - yyn + 1;
1025           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1026           int yyx;
1028           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1029             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1030                 && !yytable_value_is_error (yytable[yyx + yyn]))
1031               {
1032                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1033                   {
1034                     yycount = 1;
1035                     yysize = yysize0;
1036                     break;
1037                   }
1038                 yyarg[yycount++] = yytname[yyx];
1039                 {
1040                   YYPTRDIFF_T yysize1
1041                     = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1042                   if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1043                     yysize = yysize1;
1044                   else
1045                     return 2;
1046                 }
1047               }
1048         }
1049     }
1051   switch (yycount)
1052     {
1053 # define YYCASE_(N, S)                      \
1054       case N:                               \
1055         yyformat = S;                       \
1056       break
1057     default: /* Avoid compiler warnings. */
1058       YYCASE_(0, YY_("syntax error"));
1059       YYCASE_(1, YY_("syntax error, unexpected %s"));
1060       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1061       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1062       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1063       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1064 # undef YYCASE_
1065     }
1067   {
1068     /* Don't count the "%s"s in the final size, but reserve room for
1069        the terminator.  */
1070     YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1071     if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1072       yysize = yysize1;
1073     else
1074       return 2;
1075   }
1077   if (*yymsg_alloc < yysize)
1078     {
1079       *yymsg_alloc = 2 * yysize;
1080       if (! (yysize <= *yymsg_alloc
1081              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1082         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1083       return 1;
1084     }
1086   /* Avoid sprintf, as that infringes on the user's name space.
1087      Don't have undefined behavior even if the translation
1088      produced a string with the wrong number of "%s"s.  */
1089   {
1090     char *yyp = *yymsg;
1091     int yyi = 0;
1092     while ((*yyp = *yyformat) != '\0')
1093       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1094         {
1095           yyp += yytnamerr (yyp, yyarg[yyi++]);
1096           yyformat += 2;
1097         }
1098       else
1099         {
1100           ++yyp;
1101           ++yyformat;
1102         }
1103   }
1104   return 0;
1106 #endif /* YYERROR_VERBOSE */
1108 /*-----------------------------------------------.
1109 | Release the memory associated to this symbol.  |
1110 `-----------------------------------------------*/
1112 static void
1113 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1115   YYUSE (yyvaluep);
1116   if (!yymsg)
1117     yymsg = "Deleting";
1118   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1120   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1121   YYUSE (yytype);
1122   YY_IGNORE_MAYBE_UNINITIALIZED_END
1128 /* The lookahead symbol.  */
1129 int yychar;
1131 /* The semantic value of the lookahead symbol.  */
1132 YYSTYPE yylval;
1133 /* Number of syntax errors so far.  */
1134 int yynerrs;
1137 /*----------.
1138 | yyparse.  |
1139 `----------*/
1142 yyparse (void)
1144     yy_state_fast_t yystate;
1145     /* Number of tokens to shift before error messages enabled.  */
1146     int yyerrstatus;
1148     /* The stacks and their tools:
1149        'yyss': related to states.
1150        'yyvs': related to semantic values.
1152        Refer to the stacks through separate pointers, to allow yyoverflow
1153        to reallocate them elsewhere.  */
1155     /* The state stack.  */
1156     yy_state_t yyssa[YYINITDEPTH];
1157     yy_state_t *yyss;
1158     yy_state_t *yyssp;
1160     /* The semantic value stack.  */
1161     YYSTYPE yyvsa[YYINITDEPTH];
1162     YYSTYPE *yyvs;
1163     YYSTYPE *yyvsp;
1165     YYPTRDIFF_T yystacksize;
1167   int yyn;
1168   int yyresult;
1169   /* Lookahead token as an internal (translated) token number.  */
1170   int yytoken = 0;
1171   /* The variables used to return semantic value and location from the
1172      action routines.  */
1173   YYSTYPE yyval;
1175 #if YYERROR_VERBOSE
1176   /* Buffer for error messages, and its allocated size.  */
1177   char yymsgbuf[128];
1178   char *yymsg = yymsgbuf;
1179   YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
1180 #endif
1182 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1184   /* The number of symbols on the RHS of the reduced rule.
1185      Keep to zero when no symbol should be popped.  */
1186   int yylen = 0;
1188   yyssp = yyss = yyssa;
1189   yyvsp = yyvs = yyvsa;
1190   yystacksize = YYINITDEPTH;
1192   YYDPRINTF ((stderr, "Starting parse\n"));
1194   yystate = 0;
1195   yyerrstatus = 0;
1196   yynerrs = 0;
1197   yychar = YYEMPTY; /* Cause a token to be read.  */
1198   goto yysetstate;
1201 /*------------------------------------------------------------.
1202 | yynewstate -- push a new state, which is found in yystate.  |
1203 `------------------------------------------------------------*/
1204 yynewstate:
1205   /* In all cases, when you get here, the value and location stacks
1206      have just been pushed.  So pushing a state here evens the stacks.  */
1207   yyssp++;
1210 /*--------------------------------------------------------------------.
1211 | yysetstate -- set current state (the top of the stack) to yystate.  |
1212 `--------------------------------------------------------------------*/
1213 yysetstate:
1214   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1215   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1216   YY_IGNORE_USELESS_CAST_BEGIN
1217   *yyssp = YY_CAST (yy_state_t, yystate);
1218   YY_IGNORE_USELESS_CAST_END
1220   if (yyss + yystacksize - 1 <= yyssp)
1221 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1222     goto yyexhaustedlab;
1223 #else
1224     {
1225       /* Get the current used size of the three stacks, in elements.  */
1226       YYPTRDIFF_T yysize = yyssp - yyss + 1;
1228 # if defined yyoverflow
1229       {
1230         /* Give user a chance to reallocate the stack.  Use copies of
1231            these so that the &'s don't force the real ones into
1232            memory.  */
1233         yy_state_t *yyss1 = yyss;
1234         YYSTYPE *yyvs1 = yyvs;
1236         /* Each stack pointer address is followed by the size of the
1237            data in use in that stack, in bytes.  This used to be a
1238            conditional around just the two extra args, but that might
1239            be undefined if yyoverflow is a macro.  */
1240         yyoverflow (YY_("memory exhausted"),
1241                     &yyss1, yysize * YYSIZEOF (*yyssp),
1242                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
1243                     &yystacksize);
1244         yyss = yyss1;
1245         yyvs = yyvs1;
1246       }
1247 # else /* defined YYSTACK_RELOCATE */
1248       /* Extend the stack our own way.  */
1249       if (YYMAXDEPTH <= yystacksize)
1250         goto yyexhaustedlab;
1251       yystacksize *= 2;
1252       if (YYMAXDEPTH < yystacksize)
1253         yystacksize = YYMAXDEPTH;
1255       {
1256         yy_state_t *yyss1 = yyss;
1257         union yyalloc *yyptr =
1258           YY_CAST (union yyalloc *,
1259                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1260         if (! yyptr)
1261           goto yyexhaustedlab;
1262         YYSTACK_RELOCATE (yyss_alloc, yyss);
1263         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1264 # undef YYSTACK_RELOCATE
1265         if (yyss1 != yyssa)
1266           YYSTACK_FREE (yyss1);
1267       }
1268 # endif
1270       yyssp = yyss + yysize - 1;
1271       yyvsp = yyvs + yysize - 1;
1273       YY_IGNORE_USELESS_CAST_BEGIN
1274       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1275                   YY_CAST (long, yystacksize)));
1276       YY_IGNORE_USELESS_CAST_END
1278       if (yyss + yystacksize - 1 <= yyssp)
1279         YYABORT;
1280     }
1281 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1283   if (yystate == YYFINAL)
1284     YYACCEPT;
1286   goto yybackup;
1289 /*-----------.
1290 | yybackup.  |
1291 `-----------*/
1292 yybackup:
1293   /* Do appropriate processing given the current state.  Read a
1294      lookahead token if we need one and don't already have one.  */
1296   /* First try to decide what to do without reference to lookahead token.  */
1297   yyn = yypact[yystate];
1298   if (yypact_value_is_default (yyn))
1299     goto yydefault;
1301   /* Not known => get a lookahead token if don't already have one.  */
1303   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1304   if (yychar == YYEMPTY)
1305     {
1306       YYDPRINTF ((stderr, "Reading a token: "));
1307       yychar = yylex ();
1308     }
1310   if (yychar <= YYEOF)
1311     {
1312       yychar = yytoken = YYEOF;
1313       YYDPRINTF ((stderr, "Now at end of input.\n"));
1314     }
1315   else
1316     {
1317       yytoken = YYTRANSLATE (yychar);
1318       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1319     }
1321   /* If the proper action on seeing token YYTOKEN is to reduce or to
1322      detect an error, take that action.  */
1323   yyn += yytoken;
1324   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1325     goto yydefault;
1326   yyn = yytable[yyn];
1327   if (yyn <= 0)
1328     {
1329       if (yytable_value_is_error (yyn))
1330         goto yyerrlab;
1331       yyn = -yyn;
1332       goto yyreduce;
1333     }
1335   /* Count tokens shifted since error; after three, turn off error
1336      status.  */
1337   if (yyerrstatus)
1338     yyerrstatus--;
1340   /* Shift the lookahead token.  */
1341   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1342   yystate = yyn;
1343   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1344   *++yyvsp = yylval;
1345   YY_IGNORE_MAYBE_UNINITIALIZED_END
1347   /* Discard the shifted token.  */
1348   yychar = YYEMPTY;
1349   goto yynewstate;
1352 /*-----------------------------------------------------------.
1353 | yydefault -- do the default action for the current state.  |
1354 `-----------------------------------------------------------*/
1355 yydefault:
1356   yyn = yydefact[yystate];
1357   if (yyn == 0)
1358     goto yyerrlab;
1359   goto yyreduce;
1362 /*-----------------------------.
1363 | yyreduce -- do a reduction.  |
1364 `-----------------------------*/
1365 yyreduce:
1366   /* yyn is the number of a rule to reduce with.  */
1367   yylen = yyr2[yyn];
1369   /* If YYLEN is nonzero, implement the default value of the action:
1370      '$$ = $1'.
1372      Otherwise, the following line sets YYVAL to garbage.
1373      This behavior is undocumented and Bison
1374      users should not rely upon it.  Assigning to YYVAL
1375      unconditionally makes the parser a bit smaller, and it avoids a
1376      GCC warning that YYVAL may be used uninitialized.  */
1377   yyval = yyvsp[1-yylen];
1380   YY_REDUCE_PRINT (yyn);
1381   switch (yyn)
1382     {
1383   case 2:
1384          { cur_parent = root_parent; }
1385     break;
1387   case 16:
1388                                 {
1389         (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1390         chip_enqueue_tail(cur_chip_instance);
1391         cur_chip_instance = (yyval.chip_instance);
1393     break;
1395   case 17:
1396                          {
1397         cur_chip_instance = chip_dequeue_tail();
1399     break;
1401   case 18:
1402                                                  {
1403         (yyval.dev) = new_device(cur_parent, cur_chip_instance, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number));
1404         cur_parent = (yyval.dev)->last_bus;
1406     break;
1408   case 19:
1409                            {
1410         cur_parent = (yyvsp[-2].dev)->parent;
1412     break;
1414   case 22:
1415         { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
1416     break;
1418   case 23:
1419         { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
1420     break;
1422   case 24:
1423         { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
1424     break;
1426   case 25:
1427         { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
1428     break;
1430   case 26:
1431         { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1432     break;
1434   case 27:
1435         { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1436     break;
1438   case 28:
1439         { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1440     break;
1442   case 29:
1443         { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1444     break;
1448       default: break;
1449     }
1450   /* User semantic actions sometimes alter yychar, and that requires
1451      that yytoken be updated with the new translation.  We take the
1452      approach of translating immediately before every use of yytoken.
1453      One alternative is translating here after every semantic action,
1454      but that translation would be missed if the semantic action invokes
1455      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1456      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1457      incorrect destructor might then be invoked immediately.  In the
1458      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1459      to an incorrect destructor call or verbose syntax error message
1460      before the lookahead is translated.  */
1461   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1463   YYPOPSTACK (yylen);
1464   yylen = 0;
1465   YY_STACK_PRINT (yyss, yyssp);
1467   *++yyvsp = yyval;
1469   /* Now 'shift' the result of the reduction.  Determine what state
1470      that goes to, based on the state we popped back to and the rule
1471      number reduced by.  */
1472   {
1473     const int yylhs = yyr1[yyn] - YYNTOKENS;
1474     const int yyi = yypgoto[yylhs] + *yyssp;
1475     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1476                ? yytable[yyi]
1477                : yydefgoto[yylhs]);
1478   }
1480   goto yynewstate;
1483 /*--------------------------------------.
1484 | yyerrlab -- here on detecting error.  |
1485 `--------------------------------------*/
1486 yyerrlab:
1487   /* Make sure we have latest lookahead translation.  See comments at
1488      user semantic actions for why this is necessary.  */
1489   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1491   /* If not already recovering from an error, report this error.  */
1492   if (!yyerrstatus)
1493     {
1494       ++yynerrs;
1495 #if ! YYERROR_VERBOSE
1496       yyerror (YY_("syntax error"));
1497 #else
1498 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1499                                         yyssp, yytoken)
1500       {
1501         char const *yymsgp = YY_("syntax error");
1502         int yysyntax_error_status;
1503         yysyntax_error_status = YYSYNTAX_ERROR;
1504         if (yysyntax_error_status == 0)
1505           yymsgp = yymsg;
1506         else if (yysyntax_error_status == 1)
1507           {
1508             if (yymsg != yymsgbuf)
1509               YYSTACK_FREE (yymsg);
1510             yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
1511             if (!yymsg)
1512               {
1513                 yymsg = yymsgbuf;
1514                 yymsg_alloc = sizeof yymsgbuf;
1515                 yysyntax_error_status = 2;
1516               }
1517             else
1518               {
1519                 yysyntax_error_status = YYSYNTAX_ERROR;
1520                 yymsgp = yymsg;
1521               }
1522           }
1523         yyerror (yymsgp);
1524         if (yysyntax_error_status == 2)
1525           goto yyexhaustedlab;
1526       }
1527 # undef YYSYNTAX_ERROR
1528 #endif
1529     }
1533   if (yyerrstatus == 3)
1534     {
1535       /* If just tried and failed to reuse lookahead token after an
1536          error, discard it.  */
1538       if (yychar <= YYEOF)
1539         {
1540           /* Return failure if at end of input.  */
1541           if (yychar == YYEOF)
1542             YYABORT;
1543         }
1544       else
1545         {
1546           yydestruct ("Error: discarding",
1547                       yytoken, &yylval);
1548           yychar = YYEMPTY;
1549         }
1550     }
1552   /* Else will try to reuse lookahead token after shifting the error
1553      token.  */
1554   goto yyerrlab1;
1557 /*---------------------------------------------------.
1558 | yyerrorlab -- error raised explicitly by YYERROR.  |
1559 `---------------------------------------------------*/
1560 yyerrorlab:
1561   /* Pacify compilers when the user code never invokes YYERROR and the
1562      label yyerrorlab therefore never appears in user code.  */
1563   if (0)
1564     YYERROR;
1566   /* Do not reclaim the symbols of the rule whose action triggered
1567      this YYERROR.  */
1568   YYPOPSTACK (yylen);
1569   yylen = 0;
1570   YY_STACK_PRINT (yyss, yyssp);
1571   yystate = *yyssp;
1572   goto yyerrlab1;
1575 /*-------------------------------------------------------------.
1576 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1577 `-------------------------------------------------------------*/
1578 yyerrlab1:
1579   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1581   for (;;)
1582     {
1583       yyn = yypact[yystate];
1584       if (!yypact_value_is_default (yyn))
1585         {
1586           yyn += YYTERROR;
1587           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1588             {
1589               yyn = yytable[yyn];
1590               if (0 < yyn)
1591                 break;
1592             }
1593         }
1595       /* Pop the current state because it cannot handle the error token.  */
1596       if (yyssp == yyss)
1597         YYABORT;
1600       yydestruct ("Error: popping",
1601                   yystos[yystate], yyvsp);
1602       YYPOPSTACK (1);
1603       yystate = *yyssp;
1604       YY_STACK_PRINT (yyss, yyssp);
1605     }
1607   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1608   *++yyvsp = yylval;
1609   YY_IGNORE_MAYBE_UNINITIALIZED_END
1612   /* Shift the error token.  */
1613   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1615   yystate = yyn;
1616   goto yynewstate;
1619 /*-------------------------------------.
1620 | yyacceptlab -- YYACCEPT comes here.  |
1621 `-------------------------------------*/
1622 yyacceptlab:
1623   yyresult = 0;
1624   goto yyreturn;
1627 /*-----------------------------------.
1628 | yyabortlab -- YYABORT comes here.  |
1629 `-----------------------------------*/
1630 yyabortlab:
1631   yyresult = 1;
1632   goto yyreturn;
1635 #if !defined yyoverflow || YYERROR_VERBOSE
1636 /*-------------------------------------------------.
1637 | yyexhaustedlab -- memory exhaustion comes here.  |
1638 `-------------------------------------------------*/
1639 yyexhaustedlab:
1640   yyerror (YY_("memory exhausted"));
1641   yyresult = 2;
1642   /* Fall through.  */
1643 #endif
1646 /*-----------------------------------------------------.
1647 | yyreturn -- parsing is finished, return the result.  |
1648 `-----------------------------------------------------*/
1649 yyreturn:
1650   if (yychar != YYEMPTY)
1651     {
1652       /* Make sure we have latest lookahead translation.  See comments at
1653          user semantic actions for why this is necessary.  */
1654       yytoken = YYTRANSLATE (yychar);
1655       yydestruct ("Cleanup: discarding lookahead",
1656                   yytoken, &yylval);
1657     }
1658   /* Do not reclaim the symbols of the rule whose action triggered
1659      this YYABORT or YYACCEPT.  */
1660   YYPOPSTACK (yylen);
1661   YY_STACK_PRINT (yyss, yyssp);
1662   while (yyssp != yyss)
1663     {
1664       yydestruct ("Cleanup: popping",
1665                   yystos[+*yyssp], yyvsp);
1666       YYPOPSTACK (1);
1667     }
1668 #ifndef yyoverflow
1669   if (yyss != yyssa)
1670     YYSTACK_FREE (yyss);
1671 #endif
1672 #if YYERROR_VERBOSE
1673   if (yymsg != yymsgbuf)
1674     YYSTACK_FREE (yymsg);
1675 #endif
1676   return yyresult;