mb/lenovo/t530: Convert to ASL 2.0 syntax
[coreboot.git] / util / sconfig / sconfig.tab.c_shipped
bloba8d1e1db1f342facac96ecb5f57fe93cb8fa766f
1 /* A Bison parser, made by GNU Bison 3.7.2.  */
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 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38    especially those whose name start with YY_ or yy_.  They are
39    private implementation details that can be changed or removed.  */
41 /* All symbols defined below should begin with yy or YY, to avoid
42    infringing on user name space.  This should be done even for local
43    variables, as they might otherwise be expanded by user macros.
44    There are some unavoidable exceptions within include files to
45    define necessary library symbols; they are noted "INFRINGES ON
46    USER NAME SPACE" below.  */
48 /* Identify Bison output.  */
49 #define YYBISON 1
51 /* Bison version.  */
52 #define YYBISON_VERSION "3.7.2"
54 /* Skeleton name.  */
55 #define YYSKELETON_NAME "yacc.c"
57 /* Pure parsers.  */
58 #define YYPURE 0
60 /* Push parsers.  */
61 #define YYPUSH 0
63 /* Pull parsers.  */
64 #define YYPULL 1
69 /* First part of user prologue.  */
71 /* sconfig, coreboot device tree compiler */
72 /* SPDX-License-Identifier: GPL-2.0-only */
74 #include <stdint.h>
75 #include "sconfig.h"
77 int yylex();
78 void yyerror(const char *s);
80 static struct bus *cur_parent;
81 static struct chip_instance *cur_chip_instance;
82 static struct fw_config_field *cur_field;
86 # ifndef YY_CAST
87 #  ifdef __cplusplus
88 #   define YY_CAST(Type, Val) static_cast<Type> (Val)
89 #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
90 #  else
91 #   define YY_CAST(Type, Val) ((Type) (Val))
92 #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
93 #  endif
94 # endif
95 # ifndef YY_NULLPTR
96 #  if defined __cplusplus
97 #   if 201103L <= __cplusplus
98 #    define YY_NULLPTR nullptr
99 #   else
100 #    define YY_NULLPTR 0
101 #   endif
102 #  else
103 #   define YY_NULLPTR ((void*)0)
104 #  endif
105 # endif
107 #include "sconfig.tab.h_shipped"
108 /* Symbol kind.  */
109 enum yysymbol_kind_t
111   YYSYMBOL_YYEMPTY = -2,
112   YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
113   YYSYMBOL_YYerror = 1,                    /* error  */
114   YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
115   YYSYMBOL_CHIP = 3,                       /* CHIP  */
116   YYSYMBOL_DEVICE = 4,                     /* DEVICE  */
117   YYSYMBOL_REGISTER = 5,                   /* REGISTER  */
118   YYSYMBOL_ALIAS = 6,                      /* ALIAS  */
119   YYSYMBOL_REFERENCE = 7,                  /* REFERENCE  */
120   YYSYMBOL_ASSOCIATION = 8,                /* ASSOCIATION  */
121   YYSYMBOL_BOOL = 9,                       /* BOOL  */
122   YYSYMBOL_STATUS = 10,                    /* STATUS  */
123   YYSYMBOL_MANDATORY = 11,                 /* MANDATORY  */
124   YYSYMBOL_BUS = 12,                       /* BUS  */
125   YYSYMBOL_RESOURCE = 13,                  /* RESOURCE  */
126   YYSYMBOL_END = 14,                       /* END  */
127   YYSYMBOL_EQUALS = 15,                    /* EQUALS  */
128   YYSYMBOL_HEX = 16,                       /* HEX  */
129   YYSYMBOL_STRING = 17,                    /* STRING  */
130   YYSYMBOL_PCI = 18,                       /* PCI  */
131   YYSYMBOL_PNP = 19,                       /* PNP  */
132   YYSYMBOL_I2C = 20,                       /* I2C  */
133   YYSYMBOL_APIC = 21,                      /* APIC  */
134   YYSYMBOL_CPU_CLUSTER = 22,               /* CPU_CLUSTER  */
135   YYSYMBOL_CPU = 23,                       /* CPU  */
136   YYSYMBOL_DOMAIN = 24,                    /* DOMAIN  */
137   YYSYMBOL_IRQ = 25,                       /* IRQ  */
138   YYSYMBOL_DRQ = 26,                       /* DRQ  */
139   YYSYMBOL_SLOT_DESC = 27,                 /* SLOT_DESC  */
140   YYSYMBOL_IO = 28,                        /* IO  */
141   YYSYMBOL_NUMBER = 29,                    /* NUMBER  */
142   YYSYMBOL_SUBSYSTEMID = 30,               /* SUBSYSTEMID  */
143   YYSYMBOL_INHERIT = 31,                   /* INHERIT  */
144   YYSYMBOL_IOAPIC_IRQ = 32,                /* IOAPIC_IRQ  */
145   YYSYMBOL_IOAPIC = 33,                    /* IOAPIC  */
146   YYSYMBOL_PCIINT = 34,                    /* PCIINT  */
147   YYSYMBOL_GENERIC = 35,                   /* GENERIC  */
148   YYSYMBOL_SPI = 36,                       /* SPI  */
149   YYSYMBOL_USB = 37,                       /* USB  */
150   YYSYMBOL_MMIO = 38,                      /* MMIO  */
151   YYSYMBOL_LPC = 39,                       /* LPC  */
152   YYSYMBOL_ESPI = 40,                      /* ESPI  */
153   YYSYMBOL_GPIO = 41,                      /* GPIO  */
154   YYSYMBOL_FW_CONFIG_TABLE = 42,           /* FW_CONFIG_TABLE  */
155   YYSYMBOL_FW_CONFIG_FIELD = 43,           /* FW_CONFIG_FIELD  */
156   YYSYMBOL_FW_CONFIG_OPTION = 44,          /* FW_CONFIG_OPTION  */
157   YYSYMBOL_FW_CONFIG_PROBE = 45,           /* FW_CONFIG_PROBE  */
158   YYSYMBOL_YYACCEPT = 46,                  /* $accept  */
159   YYSYMBOL_devtree = 47,                   /* devtree  */
160   YYSYMBOL_chipchildren = 48,              /* chipchildren  */
161   YYSYMBOL_devicechildren = 49,            /* devicechildren  */
162   YYSYMBOL_chip = 50,                      /* chip  */
163   YYSYMBOL_51_1 = 51,                      /* @1  */
164   YYSYMBOL_device = 52,                    /* device  */
165   YYSYMBOL_53_2 = 53,                      /* @2  */
166   YYSYMBOL_54_3 = 54,                      /* @3  */
167   YYSYMBOL_alias = 55,                     /* alias  */
168   YYSYMBOL_status = 56,                    /* status  */
169   YYSYMBOL_resource = 57,                  /* resource  */
170   YYSYMBOL_reference = 58,                 /* reference  */
171   YYSYMBOL_registers = 59,                 /* registers  */
172   YYSYMBOL_subsystemid = 60,               /* subsystemid  */
173   YYSYMBOL_ioapic_irq = 61,                /* ioapic_irq  */
174   YYSYMBOL_smbios_slot_desc = 62,          /* smbios_slot_desc  */
175   YYSYMBOL_fw_config_table = 63,           /* fw_config_table  */
176   YYSYMBOL_fw_config_table_children = 64,  /* fw_config_table_children  */
177   YYSYMBOL_fw_config_field_children = 65,  /* fw_config_field_children  */
178   YYSYMBOL_fw_config_field = 66,           /* fw_config_field  */
179   YYSYMBOL_67_4 = 67,                      /* $@4  */
180   YYSYMBOL_68_5 = 68,                      /* $@5  */
181   YYSYMBOL_69_6 = 69,                      /* $@6  */
182   YYSYMBOL_fw_config_option = 70,          /* fw_config_option  */
183   YYSYMBOL_fw_config_probe = 71            /* fw_config_probe  */
185 typedef enum yysymbol_kind_t yysymbol_kind_t;
190 #ifdef short
191 # undef short
192 #endif
194 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
195    <limits.h> and (if available) <stdint.h> are included
196    so that the code can choose integer types of a good width.  */
198 #ifndef __PTRDIFF_MAX__
199 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
200 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
201 #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
202 #  define YY_STDINT_H
203 # endif
204 #endif
206 /* Narrow types that promote to a signed type and that can represent a
207    signed or unsigned integer of at least N bits.  In tables they can
208    save space and decrease cache pressure.  Promoting to a signed type
209    helps avoid bugs in integer arithmetic.  */
211 #ifdef __INT_LEAST8_MAX__
212 typedef __INT_LEAST8_TYPE__ yytype_int8;
213 #elif defined YY_STDINT_H
214 typedef int_least8_t yytype_int8;
215 #else
216 typedef signed char yytype_int8;
217 #endif
219 #ifdef __INT_LEAST16_MAX__
220 typedef __INT_LEAST16_TYPE__ yytype_int16;
221 #elif defined YY_STDINT_H
222 typedef int_least16_t yytype_int16;
223 #else
224 typedef short yytype_int16;
225 #endif
227 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
228 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
229 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
230        && UINT_LEAST8_MAX <= INT_MAX)
231 typedef uint_least8_t yytype_uint8;
232 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
233 typedef unsigned char yytype_uint8;
234 #else
235 typedef short yytype_uint8;
236 #endif
238 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
239 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
240 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
241        && UINT_LEAST16_MAX <= INT_MAX)
242 typedef uint_least16_t yytype_uint16;
243 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
244 typedef unsigned short yytype_uint16;
245 #else
246 typedef int yytype_uint16;
247 #endif
249 #ifndef YYPTRDIFF_T
250 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
251 #  define YYPTRDIFF_T __PTRDIFF_TYPE__
252 #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
253 # elif defined PTRDIFF_MAX
254 #  ifndef ptrdiff_t
255 #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
256 #  endif
257 #  define YYPTRDIFF_T ptrdiff_t
258 #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
259 # else
260 #  define YYPTRDIFF_T long
261 #  define YYPTRDIFF_MAXIMUM LONG_MAX
262 # endif
263 #endif
265 #ifndef YYSIZE_T
266 # ifdef __SIZE_TYPE__
267 #  define YYSIZE_T __SIZE_TYPE__
268 # elif defined size_t
269 #  define YYSIZE_T size_t
270 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
271 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
272 #  define YYSIZE_T size_t
273 # else
274 #  define YYSIZE_T unsigned
275 # endif
276 #endif
278 #define YYSIZE_MAXIMUM                                  \
279   YY_CAST (YYPTRDIFF_T,                                 \
280            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
281             ? YYPTRDIFF_MAXIMUM                         \
282             : YY_CAST (YYSIZE_T, -1)))
284 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
287 /* Stored state numbers (used for stacks). */
288 typedef yytype_int8 yy_state_t;
290 /* State numbers in computations.  */
291 typedef int yy_state_fast_t;
293 #ifndef YY_
294 # if defined YYENABLE_NLS && YYENABLE_NLS
295 #  if ENABLE_NLS
296 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
297 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
298 #  endif
299 # endif
300 # ifndef YY_
301 #  define YY_(Msgid) Msgid
302 # endif
303 #endif
306 #ifndef YY_ATTRIBUTE_PURE
307 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
308 #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
309 # else
310 #  define YY_ATTRIBUTE_PURE
311 # endif
312 #endif
314 #ifndef YY_ATTRIBUTE_UNUSED
315 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
316 #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
317 # else
318 #  define YY_ATTRIBUTE_UNUSED
319 # endif
320 #endif
322 /* Suppress unused-variable warnings by "using" E.  */
323 #if ! defined lint || defined __GNUC__
324 # define YYUSE(E) ((void) (E))
325 #else
326 # define YYUSE(E) /* empty */
327 #endif
329 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
330 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
331 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
332     _Pragma ("GCC diagnostic push")                                     \
333     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
334     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
335 # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
336     _Pragma ("GCC diagnostic pop")
337 #else
338 # define YY_INITIAL_VALUE(Value) Value
339 #endif
340 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
341 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
342 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
343 #endif
344 #ifndef YY_INITIAL_VALUE
345 # define YY_INITIAL_VALUE(Value) /* Nothing. */
346 #endif
348 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
349 # define YY_IGNORE_USELESS_CAST_BEGIN                          \
350     _Pragma ("GCC diagnostic push")                            \
351     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
352 # define YY_IGNORE_USELESS_CAST_END            \
353     _Pragma ("GCC diagnostic pop")
354 #endif
355 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
356 # define YY_IGNORE_USELESS_CAST_BEGIN
357 # define YY_IGNORE_USELESS_CAST_END
358 #endif
361 #define YY_ASSERT(E) ((void) (0 && (E)))
363 #if !defined yyoverflow
365 /* The parser invokes alloca or malloc; define the necessary symbols.  */
367 # ifdef YYSTACK_USE_ALLOCA
368 #  if YYSTACK_USE_ALLOCA
369 #   ifdef __GNUC__
370 #    define YYSTACK_ALLOC __builtin_alloca
371 #   elif defined __BUILTIN_VA_ARG_INCR
372 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
373 #   elif defined _AIX
374 #    define YYSTACK_ALLOC __alloca
375 #   elif defined _MSC_VER
376 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
377 #    define alloca _alloca
378 #   else
379 #    define YYSTACK_ALLOC alloca
380 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
381 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
382       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
383 #     ifndef EXIT_SUCCESS
384 #      define EXIT_SUCCESS 0
385 #     endif
386 #    endif
387 #   endif
388 #  endif
389 # endif
391 # ifdef YYSTACK_ALLOC
392    /* Pacify GCC's 'empty if-body' warning.  */
393 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
394 #  ifndef YYSTACK_ALLOC_MAXIMUM
395     /* The OS might guarantee only one guard page at the bottom of the stack,
396        and a page size can be as small as 4096 bytes.  So we cannot safely
397        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
398        to allow for a few compiler-allocated temporary stack slots.  */
399 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
400 #  endif
401 # else
402 #  define YYSTACK_ALLOC YYMALLOC
403 #  define YYSTACK_FREE YYFREE
404 #  ifndef YYSTACK_ALLOC_MAXIMUM
405 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
406 #  endif
407 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
408        && ! ((defined YYMALLOC || defined malloc) \
409              && (defined YYFREE || defined free)))
410 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
411 #   ifndef EXIT_SUCCESS
412 #    define EXIT_SUCCESS 0
413 #   endif
414 #  endif
415 #  ifndef YYMALLOC
416 #   define YYMALLOC malloc
417 #   if ! defined malloc && ! defined EXIT_SUCCESS
418 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
419 #   endif
420 #  endif
421 #  ifndef YYFREE
422 #   define YYFREE free
423 #   if ! defined free && ! defined EXIT_SUCCESS
424 void free (void *); /* INFRINGES ON USER NAME SPACE */
425 #   endif
426 #  endif
427 # endif
428 #endif /* !defined yyoverflow */
430 #if (! defined yyoverflow \
431      && (! defined __cplusplus \
432          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
434 /* A type that is properly aligned for any stack member.  */
435 union yyalloc
437   yy_state_t yyss_alloc;
438   YYSTYPE yyvs_alloc;
441 /* The size of the maximum gap between one aligned stack and the next.  */
442 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
444 /* The size of an array large to enough to hold all stacks, each with
445    N elements.  */
446 # define YYSTACK_BYTES(N) \
447      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
448       + YYSTACK_GAP_MAXIMUM)
450 # define YYCOPY_NEEDED 1
452 /* Relocate STACK from its old location to the new one.  The
453    local variables YYSIZE and YYSTACKSIZE give the old and new number of
454    elements in the stack, and YYPTR gives the new location of the
455    stack.  Advance YYPTR to a properly aligned location for the next
456    stack.  */
457 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
458     do                                                                  \
459       {                                                                 \
460         YYPTRDIFF_T yynewbytes;                                         \
461         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
462         Stack = &yyptr->Stack_alloc;                                    \
463         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
464         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
465       }                                                                 \
466     while (0)
468 #endif
470 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
471 /* Copy COUNT objects from SRC to DST.  The source and destination do
472    not overlap.  */
473 # ifndef YYCOPY
474 #  if defined __GNUC__ && 1 < __GNUC__
475 #   define YYCOPY(Dst, Src, Count) \
476       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
477 #  else
478 #   define YYCOPY(Dst, Src, Count)              \
479       do                                        \
480         {                                       \
481           YYPTRDIFF_T yyi;                      \
482           for (yyi = 0; yyi < (Count); yyi++)   \
483             (Dst)[yyi] = (Src)[yyi];            \
484         }                                       \
485       while (0)
486 #  endif
487 # endif
488 #endif /* !YYCOPY_NEEDED */
490 /* YYFINAL -- State number of the termination state.  */
491 #define YYFINAL  2
492 /* YYLAST -- Last index in YYTABLE.  */
493 #define YYLAST   79
495 /* YYNTOKENS -- Number of terminals.  */
496 #define YYNTOKENS  46
497 /* YYNNTS -- Number of nonterminals.  */
498 #define YYNNTS  26
499 /* YYNRULES -- Number of rules.  */
500 #define YYNRULES  50
501 /* YYNSTATES -- Number of states.  */
502 #define YYNSTATES  89
504 /* YYMAXUTOK -- Last valid token kind.  */
505 #define YYMAXUTOK   300
508 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
509    as returned by yylex, with out-of-bounds checking.  */
510 #define YYTRANSLATE(YYX)                                \
511   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
512    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
513    : YYSYMBOL_YYUNDEF)
515 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
516    as returned by yylex.  */
517 static const yytype_int8 yytranslate[] =
519        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
520        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
521        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
522        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
523        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
524        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
525        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
526        2,     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,     1,     2,     3,     4,
545        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
546       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
547       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
548       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
549       45
552 #if YYDEBUG
553   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
554 static const yytype_int8 yyrline[] =
556        0,    25,    25,    25,    25,    27,    27,    27,    27,    27,
557       29,    29,    29,    29,    29,    29,    29,    29,    29,    31,
558       31,    40,    40,    48,    48,    56,    58,    62,    62,    64,
559       67,    70,    73,    76,    79,    82,    85,    88,    92,    95,
560       95,    98,    98,   101,   101,   107,   107,   113,   113,   119,
561      123
563 #endif
565 /** Accessing symbol of state STATE.  */
566 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
568 #if YYDEBUG || 0
569 /* The user-facing name of the symbol whose (internal) number is
570    YYSYMBOL.  No bounds checking.  */
571 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
573 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
574    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
575 static const char *const yytname[] =
577   "\"end of file\"", "error", "\"invalid token\"", "CHIP", "DEVICE",
578   "REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
579   "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
580   "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
581   "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ",
582   "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "LPC", "ESPI",
583   "GPIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
584   "FW_CONFIG_PROBE", "$accept", "devtree", "chipchildren",
585   "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status",
586   "resource", "reference", "registers", "subsystemid", "ioapic_irq",
587   "smbios_slot_desc", "fw_config_table", "fw_config_table_children",
588   "fw_config_field_children", "fw_config_field", "$@4", "$@5", "$@6",
589   "fw_config_option", "fw_config_probe", YY_NULLPTR
592 static const char *
593 yysymbol_name (yysymbol_kind_t yysymbol)
595   return yytname[yysymbol];
597 #endif
599 #ifdef YYPRINT
600 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
601    (internal) symbol number NUM (which must be that of a token).  */
602 static const yytype_int16 yytoknum[] =
604        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
605      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
606      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
607      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
608      295,   296,   297,   298,   299,   300
610 #endif
612 #define YYPACT_NINF (-15)
614 #define yypact_value_is_default(Yyn) \
615   ((Yyn) == YYPACT_NINF)
617 #define YYTABLE_NINF (-1)
619 #define yytable_value_is_error(Yyn) \
620   0
622   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
623      STATE-NUM.  */
624 static const yytype_int8 yypact[] =
626      -15,     9,   -15,     0,   -15,   -15,   -15,   -15,   -11,   -15,
627      -15,     2,   -15,    45,    -8,    13,     6,    19,   -15,   -15,
628      -15,   -15,   -15,    10,   -15,    23,    12,    11,    36,   -15,
629      -15,    -7,    25,    39,    30,    37,   -15,    -6,   -15,    38,
630      -15,   -15,   -15,   -15,    40,    25,   -15,   -15,    -1,   -15,
631       24,   -15,   -15,   -15,   -15,   -15,    -3,   -15,    27,   -15,
632       41,    31,    32,    46,   -15,   -15,   -15,   -15,   -15,   -15,
633      -15,   -15,     1,    47,    48,    35,    33,    49,   -15,    42,
634       51,    43,    44,   -15,   -15,    52,   -15,   -15,   -15
637   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
638      Performed when YYTABLE does not specify something else to do.  Zero
639      means the default is an error.  */
640 static const yytype_int8 yydefact[] =
642        2,     0,     1,     0,    40,     3,     4,    19,     0,     9,
643       38,     0,    39,     0,    47,     0,     0,     0,    20,     6,
644        5,     8,     7,    45,    42,     0,     0,     0,     0,    43,
645       42,     0,     0,    25,     0,     0,    42,     0,    48,     0,
646       41,    27,    28,    23,     0,     0,    31,    30,     0,    46,
647        0,    18,    26,    21,    44,    49,     0,    18,     0,    24,
648        0,     0,     0,     0,    11,    10,    12,    16,    13,    14,
649       15,    17,     0,     0,     0,     0,     0,     0,    22,     0,
650       37,    32,     0,    50,    29,    36,    33,    34,    35
653   /* YYPGOTO[NTERM-NUM].  */
654 static const yytype_int8 yypgoto[] =
656      -15,   -15,   -15,    15,    17,   -15,    57,   -15,   -15,   -15,
657       34,   -15,   -15,    62,   -15,   -15,   -15,   -15,   -15,   -14,
658      -15,   -15,   -15,   -15,   -15,   -15
661   /* YYDEFGOTO[NTERM-NUM].  */
662 static const yytype_int8 yydefgoto[] =
664       -1,     1,    13,    56,    64,     9,    65,    57,    51,    45,
665       43,    66,    21,    67,    68,    69,    70,     6,     8,    31,
666       12,    36,    30,    24,    40,    71
669   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
670      positive, shift that token.  If negative, reduce the rule whose
671      number is the opposite.  If YYTABLE_NINF, syntax error.  */
672 static const yytype_int8 yytable[] =
674        3,    15,    16,    10,     3,    15,    16,    38,    49,     2,
675       58,    59,     3,    54,    58,    78,    37,     7,     5,    14,
676       25,    23,    48,    27,    60,    26,    34,    61,    60,    62,
677       19,    61,    11,    62,    41,    42,    28,    39,    39,    29,
678       32,    33,    63,    39,    35,    44,    63,    46,     3,    15,
679       16,     4,    17,    55,    47,    50,    73,    52,    74,    18,
680       75,    76,    79,    77,    81,    80,    83,    82,    85,    88,
681       20,    84,    72,    87,    86,    22,     0,     0,     0,    53
684 static const yytype_int8 yycheck[] =
686        3,     4,     5,    14,     3,     4,     5,    14,    14,     0,
687       13,    14,     3,    14,    13,    14,    30,    17,     1,    17,
688        7,    29,    36,    17,    27,    12,    15,    30,    27,    32,
689       13,    30,    43,    32,     9,    10,    17,    44,    44,    29,
690       17,    29,    45,    44,     8,     6,    45,    17,     3,     4,
691        5,    42,     7,    29,    17,    17,    29,    17,    17,    14,
692       29,    29,    15,    17,    29,    17,    17,    34,    17,    17,
693       13,    29,    57,    29,    31,    13,    -1,    -1,    -1,    45
696   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
697      symbol of state STATE-NUM.  */
698 static const yytype_int8 yystos[] =
700        0,    47,     0,     3,    42,    50,    63,    17,    64,    51,
701       14,    43,    66,    48,    17,     4,     5,     7,    14,    50,
702       52,    58,    59,    29,    69,     7,    12,    17,    17,    29,
703       68,    65,    17,    29,    15,     8,    67,    65,    14,    44,
704       70,     9,    10,    56,     6,    55,    17,    17,    65,    14,
705       17,    54,    17,    56,    14,    29,    49,    53,    13,    14,
706       27,    30,    32,    45,    50,    52,    57,    59,    60,    61,
707       62,    71,    49,    29,    17,    29,    29,    17,    14,    15,
708       17,    29,    34,    17,    29,    17,    31,    29,    17
711   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
712 static const yytype_int8 yyr1[] =
714        0,    46,    47,    47,    47,    48,    48,    48,    48,    48,
715       49,    49,    49,    49,    49,    49,    49,    49,    49,    51,
716       50,    53,    52,    54,    52,    55,    55,    56,    56,    57,
717       58,    59,    60,    60,    61,    62,    62,    62,    63,    64,
718       64,    65,    65,    67,    66,    68,    66,    69,    66,    70,
719       71
722   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
723 static const yytype_int8 yyr2[] =
725        0,     2,     0,     2,     2,     2,     2,     2,     2,     0,
726        2,     2,     2,     2,     2,     2,     2,     2,     0,     0,
727        5,     0,     8,     0,     7,     0,     2,     1,     1,     4,
728        4,     4,     3,     4,     4,     5,     4,     3,     3,     2,
729        0,     2,     0,     0,     7,     0,     6,     0,     5,     3,
730        3
734 enum { YYENOMEM = -2 };
736 #define yyerrok         (yyerrstatus = 0)
737 #define yyclearin       (yychar = YYEMPTY)
739 #define YYACCEPT        goto yyacceptlab
740 #define YYABORT         goto yyabortlab
741 #define YYERROR         goto yyerrorlab
744 #define YYRECOVERING()  (!!yyerrstatus)
746 #define YYBACKUP(Token, Value)                                    \
747   do                                                              \
748     if (yychar == YYEMPTY)                                        \
749       {                                                           \
750         yychar = (Token);                                         \
751         yylval = (Value);                                         \
752         YYPOPSTACK (yylen);                                       \
753         yystate = *yyssp;                                         \
754         goto yybackup;                                            \
755       }                                                           \
756     else                                                          \
757       {                                                           \
758         yyerror (YY_("syntax error: cannot back up")); \
759         YYERROR;                                                  \
760       }                                                           \
761   while (0)
763 /* Backward compatibility with an undocumented macro.
764    Use YYerror or YYUNDEF. */
765 #define YYERRCODE YYUNDEF
768 /* Enable debugging if requested.  */
769 #if YYDEBUG
771 # ifndef YYFPRINTF
772 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
773 #  define YYFPRINTF fprintf
774 # endif
776 # define YYDPRINTF(Args)                        \
777 do {                                            \
778   if (yydebug)                                  \
779     YYFPRINTF Args;                             \
780 } while (0)
782 /* This macro is provided for backward compatibility. */
783 # ifndef YY_LOCATION_PRINT
784 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
785 # endif
788 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
789 do {                                                                      \
790   if (yydebug)                                                            \
791     {                                                                     \
792       YYFPRINTF (stderr, "%s ", Title);                                   \
793       yy_symbol_print (stderr,                                            \
794                   Kind, Value); \
795       YYFPRINTF (stderr, "\n");                                           \
796     }                                                                     \
797 } while (0)
800 /*-----------------------------------.
801 | Print this symbol's value on YYO.  |
802 `-----------------------------------*/
804 static void
805 yy_symbol_value_print (FILE *yyo,
806                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
808   FILE *yyoutput = yyo;
809   YYUSE (yyoutput);
810   if (!yyvaluep)
811     return;
812 # ifdef YYPRINT
813   if (yykind < YYNTOKENS)
814     YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
815 # endif
816   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
817   YYUSE (yykind);
818   YY_IGNORE_MAYBE_UNINITIALIZED_END
822 /*---------------------------.
823 | Print this symbol on YYO.  |
824 `---------------------------*/
826 static void
827 yy_symbol_print (FILE *yyo,
828                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
830   YYFPRINTF (yyo, "%s %s (",
831              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
833   yy_symbol_value_print (yyo, yykind, yyvaluep);
834   YYFPRINTF (yyo, ")");
837 /*------------------------------------------------------------------.
838 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
839 | TOP (included).                                                   |
840 `------------------------------------------------------------------*/
842 static void
843 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
845   YYFPRINTF (stderr, "Stack now");
846   for (; yybottom <= yytop; yybottom++)
847     {
848       int yybot = *yybottom;
849       YYFPRINTF (stderr, " %d", yybot);
850     }
851   YYFPRINTF (stderr, "\n");
854 # define YY_STACK_PRINT(Bottom, Top)                            \
855 do {                                                            \
856   if (yydebug)                                                  \
857     yy_stack_print ((Bottom), (Top));                           \
858 } while (0)
861 /*------------------------------------------------.
862 | Report that the YYRULE is going to be reduced.  |
863 `------------------------------------------------*/
865 static void
866 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
867                  int yyrule)
869   int yylno = yyrline[yyrule];
870   int yynrhs = yyr2[yyrule];
871   int yyi;
872   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
873              yyrule - 1, yylno);
874   /* The symbols being reduced.  */
875   for (yyi = 0; yyi < yynrhs; yyi++)
876     {
877       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
878       yy_symbol_print (stderr,
879                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
880                        &yyvsp[(yyi + 1) - (yynrhs)]);
881       YYFPRINTF (stderr, "\n");
882     }
885 # define YY_REDUCE_PRINT(Rule)          \
886 do {                                    \
887   if (yydebug)                          \
888     yy_reduce_print (yyssp, yyvsp, Rule); \
889 } while (0)
891 /* Nonzero means print parse trace.  It is left uninitialized so that
892    multiple parsers can coexist.  */
893 int yydebug;
894 #else /* !YYDEBUG */
895 # define YYDPRINTF(Args) ((void) 0)
896 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
897 # define YY_STACK_PRINT(Bottom, Top)
898 # define YY_REDUCE_PRINT(Rule)
899 #endif /* !YYDEBUG */
902 /* YYINITDEPTH -- initial size of the parser's stacks.  */
903 #ifndef YYINITDEPTH
904 # define YYINITDEPTH 200
905 #endif
907 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
908    if the built-in stack extension method is used).
910    Do not make this value too large; the results are undefined if
911    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
912    evaluated with infinite-precision integer arithmetic.  */
914 #ifndef YYMAXDEPTH
915 # define YYMAXDEPTH 10000
916 #endif
923 /*-----------------------------------------------.
924 | Release the memory associated to this symbol.  |
925 `-----------------------------------------------*/
927 static void
928 yydestruct (const char *yymsg,
929             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
931   YYUSE (yyvaluep);
932   if (!yymsg)
933     yymsg = "Deleting";
934   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
936   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
937   YYUSE (yykind);
938   YY_IGNORE_MAYBE_UNINITIALIZED_END
942 /* Lookahead token kind.  */
943 int yychar;
945 /* The semantic value of the lookahead symbol.  */
946 YYSTYPE yylval;
947 /* Number of syntax errors so far.  */
948 int yynerrs;
953 /*----------.
954 | yyparse.  |
955 `----------*/
958 yyparse (void)
960     yy_state_fast_t yystate = 0;
961     /* Number of tokens to shift before error messages enabled.  */
962     int yyerrstatus = 0;
964     /* Refer to the stacks through separate pointers, to allow yyoverflow
965        to reallocate them elsewhere.  */
967     /* Their size.  */
968     YYPTRDIFF_T yystacksize = YYINITDEPTH;
970     /* The state stack: array, bottom, top.  */
971     yy_state_t yyssa[YYINITDEPTH];
972     yy_state_t *yyss = yyssa;
973     yy_state_t *yyssp = yyss;
975     /* The semantic value stack: array, bottom, top.  */
976     YYSTYPE yyvsa[YYINITDEPTH];
977     YYSTYPE *yyvs = yyvsa;
978     YYSTYPE *yyvsp = yyvs;
980   int yyn;
981   /* The return value of yyparse.  */
982   int yyresult;
983   /* Lookahead symbol kind.  */
984   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
985   /* The variables used to return semantic value and location from the
986      action routines.  */
987   YYSTYPE yyval;
991 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
993   /* The number of symbols on the RHS of the reduced rule.
994      Keep to zero when no symbol should be popped.  */
995   int yylen = 0;
997   YYDPRINTF ((stderr, "Starting parse\n"));
999   yychar = YYEMPTY; /* Cause a token to be read.  */
1000   goto yysetstate;
1003 /*------------------------------------------------------------.
1004 | yynewstate -- push a new state, which is found in yystate.  |
1005 `------------------------------------------------------------*/
1006 yynewstate:
1007   /* In all cases, when you get here, the value and location stacks
1008      have just been pushed.  So pushing a state here evens the stacks.  */
1009   yyssp++;
1012 /*--------------------------------------------------------------------.
1013 | yysetstate -- set current state (the top of the stack) to yystate.  |
1014 `--------------------------------------------------------------------*/
1015 yysetstate:
1016   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1017   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1018   YY_IGNORE_USELESS_CAST_BEGIN
1019   *yyssp = YY_CAST (yy_state_t, yystate);
1020   YY_IGNORE_USELESS_CAST_END
1021   YY_STACK_PRINT (yyss, yyssp);
1023   if (yyss + yystacksize - 1 <= yyssp)
1024 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1025     goto yyexhaustedlab;
1026 #else
1027     {
1028       /* Get the current used size of the three stacks, in elements.  */
1029       YYPTRDIFF_T yysize = yyssp - yyss + 1;
1031 # if defined yyoverflow
1032       {
1033         /* Give user a chance to reallocate the stack.  Use copies of
1034            these so that the &'s don't force the real ones into
1035            memory.  */
1036         yy_state_t *yyss1 = yyss;
1037         YYSTYPE *yyvs1 = yyvs;
1039         /* Each stack pointer address is followed by the size of the
1040            data in use in that stack, in bytes.  This used to be a
1041            conditional around just the two extra args, but that might
1042            be undefined if yyoverflow is a macro.  */
1043         yyoverflow (YY_("memory exhausted"),
1044                     &yyss1, yysize * YYSIZEOF (*yyssp),
1045                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
1046                     &yystacksize);
1047         yyss = yyss1;
1048         yyvs = yyvs1;
1049       }
1050 # else /* defined YYSTACK_RELOCATE */
1051       /* Extend the stack our own way.  */
1052       if (YYMAXDEPTH <= yystacksize)
1053         goto yyexhaustedlab;
1054       yystacksize *= 2;
1055       if (YYMAXDEPTH < yystacksize)
1056         yystacksize = YYMAXDEPTH;
1058       {
1059         yy_state_t *yyss1 = yyss;
1060         union yyalloc *yyptr =
1061           YY_CAST (union yyalloc *,
1062                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1063         if (! yyptr)
1064           goto yyexhaustedlab;
1065         YYSTACK_RELOCATE (yyss_alloc, yyss);
1066         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1067 #  undef YYSTACK_RELOCATE
1068         if (yyss1 != yyssa)
1069           YYSTACK_FREE (yyss1);
1070       }
1071 # endif
1073       yyssp = yyss + yysize - 1;
1074       yyvsp = yyvs + yysize - 1;
1076       YY_IGNORE_USELESS_CAST_BEGIN
1077       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1078                   YY_CAST (long, yystacksize)));
1079       YY_IGNORE_USELESS_CAST_END
1081       if (yyss + yystacksize - 1 <= yyssp)
1082         YYABORT;
1083     }
1084 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1086   if (yystate == YYFINAL)
1087     YYACCEPT;
1089   goto yybackup;
1092 /*-----------.
1093 | yybackup.  |
1094 `-----------*/
1095 yybackup:
1096   /* Do appropriate processing given the current state.  Read a
1097      lookahead token if we need one and don't already have one.  */
1099   /* First try to decide what to do without reference to lookahead token.  */
1100   yyn = yypact[yystate];
1101   if (yypact_value_is_default (yyn))
1102     goto yydefault;
1104   /* Not known => get a lookahead token if don't already have one.  */
1106   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
1107   if (yychar == YYEMPTY)
1108     {
1109       YYDPRINTF ((stderr, "Reading a token\n"));
1110       yychar = yylex ();
1111     }
1113   if (yychar <= YYEOF)
1114     {
1115       yychar = YYEOF;
1116       yytoken = YYSYMBOL_YYEOF;
1117       YYDPRINTF ((stderr, "Now at end of input.\n"));
1118     }
1119   else if (yychar == YYerror)
1120     {
1121       /* The scanner already issued an error message, process directly
1122          to error recovery.  But do not keep the error token as
1123          lookahead, it is too special and may lead us to an endless
1124          loop in error recovery. */
1125       yychar = YYUNDEF;
1126       yytoken = YYSYMBOL_YYerror;
1127       goto yyerrlab1;
1128     }
1129   else
1130     {
1131       yytoken = YYTRANSLATE (yychar);
1132       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1133     }
1135   /* If the proper action on seeing token YYTOKEN is to reduce or to
1136      detect an error, take that action.  */
1137   yyn += yytoken;
1138   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1139     goto yydefault;
1140   yyn = yytable[yyn];
1141   if (yyn <= 0)
1142     {
1143       if (yytable_value_is_error (yyn))
1144         goto yyerrlab;
1145       yyn = -yyn;
1146       goto yyreduce;
1147     }
1149   /* Count tokens shifted since error; after three, turn off error
1150      status.  */
1151   if (yyerrstatus)
1152     yyerrstatus--;
1154   /* Shift the lookahead token.  */
1155   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1156   yystate = yyn;
1157   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1158   *++yyvsp = yylval;
1159   YY_IGNORE_MAYBE_UNINITIALIZED_END
1161   /* Discard the shifted token.  */
1162   yychar = YYEMPTY;
1163   goto yynewstate;
1166 /*-----------------------------------------------------------.
1167 | yydefault -- do the default action for the current state.  |
1168 `-----------------------------------------------------------*/
1169 yydefault:
1170   yyn = yydefact[yystate];
1171   if (yyn == 0)
1172     goto yyerrlab;
1173   goto yyreduce;
1176 /*-----------------------------.
1177 | yyreduce -- do a reduction.  |
1178 `-----------------------------*/
1179 yyreduce:
1180   /* yyn is the number of a rule to reduce with.  */
1181   yylen = yyr2[yyn];
1183   /* If YYLEN is nonzero, implement the default value of the action:
1184      '$$ = $1'.
1186      Otherwise, the following line sets YYVAL to garbage.
1187      This behavior is undocumented and Bison
1188      users should not rely upon it.  Assigning to YYVAL
1189      unconditionally makes the parser a bit smaller, and it avoids a
1190      GCC warning that YYVAL may be used uninitialized.  */
1191   yyval = yyvsp[1-yylen];
1194   YY_REDUCE_PRINT (yyn);
1195   switch (yyn)
1196     {
1197   case 2: /* devtree: %empty  */
1198          { cur_parent = root_parent; }
1199     break;
1201   case 19: /* @1: %empty  */
1202                                 {
1203         (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1204         chip_enqueue_tail(cur_chip_instance);
1205         cur_chip_instance = (yyval.chip_instance);
1207     break;
1209   case 20: /* chip: CHIP STRING @1 chipchildren END  */
1210                          {
1211         cur_chip_instance = chip_dequeue_tail();
1213     break;
1215   case 21: /* @2: %empty  */
1216                                                        {
1217         (yyval.dev) = new_device_raw(cur_parent, cur_chip_instance, (yyvsp[-3].number), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].number));
1218         cur_parent = (yyval.dev)->last_bus;
1220     break;
1222   case 22: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END  */
1223                            {
1224         cur_parent = (yyvsp[-2].dev)->parent;
1226     break;
1228   case 23: /* @3: %empty  */
1229                                        {
1230         (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1231         cur_parent = (yyval.dev)->last_bus;
1233     break;
1235   case 24: /* device: DEVICE REFERENCE STRING status @3 devicechildren END  */
1236                            {
1237         cur_parent = (yyvsp[-2].dev)->parent;
1239     break;
1241   case 25: /* alias: %empty  */
1242                    {
1243         (yyval.string) = NULL;
1245     break;
1247   case 26: /* alias: ALIAS STRING  */
1248                  {
1249         (yyval.string) = (yyvsp[0].string);
1251     break;
1253   case 29: /* resource: RESOURCE NUMBER EQUALS NUMBER  */
1254         { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
1255     break;
1257   case 30: /* reference: REFERENCE STRING ASSOCIATION STRING  */
1258         { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
1259     break;
1261   case 31: /* registers: REGISTER STRING EQUALS STRING  */
1262         { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
1263     break;
1265   case 32: /* subsystemid: SUBSYSTEMID NUMBER NUMBER  */
1266         { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
1267     break;
1269   case 33: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT  */
1270         { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
1271     break;
1273   case 34: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER  */
1274         { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1275     break;
1277   case 35: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING  */
1278         { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1279     break;
1281   case 36: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING  */
1282         { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1283     break;
1285   case 37: /* smbios_slot_desc: SLOT_DESC STRING STRING  */
1286         { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1287     break;
1289   case 38: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END  */
1290                                                               { }
1291     break;
1293   case 43: /* $@4: %empty  */
1294                                                                                           {
1295         cur_field = new_fw_config_field((yyvsp[-2].string), strtoul((yyvsp[-1].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1297     break;
1299   case 44: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER NUMBER $@4 fw_config_field_children END  */
1300                                      { }
1301     break;
1303   case 45: /* $@5: %empty  */
1304                                                             {
1305         cur_field = new_fw_config_field((yyvsp[-1].string), strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1307     break;
1309   case 46: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END  */
1310                                      { }
1311     break;
1313   case 47: /* $@6: %empty  */
1314                                         {
1315         cur_field = get_fw_config_field((yyvsp[0].string));
1317     break;
1319   case 48: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END  */
1320                                      { }
1321     break;
1323   case 49: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER  */
1324         { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
1325     break;
1327   case 50: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING  */
1328         { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1329     break;
1333       default: break;
1334     }
1335   /* User semantic actions sometimes alter yychar, and that requires
1336      that yytoken be updated with the new translation.  We take the
1337      approach of translating immediately before every use of yytoken.
1338      One alternative is translating here after every semantic action,
1339      but that translation would be missed if the semantic action invokes
1340      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1341      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1342      incorrect destructor might then be invoked immediately.  In the
1343      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1344      to an incorrect destructor call or verbose syntax error message
1345      before the lookahead is translated.  */
1346   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1348   YYPOPSTACK (yylen);
1349   yylen = 0;
1351   *++yyvsp = yyval;
1353   /* Now 'shift' the result of the reduction.  Determine what state
1354      that goes to, based on the state we popped back to and the rule
1355      number reduced by.  */
1356   {
1357     const int yylhs = yyr1[yyn] - YYNTOKENS;
1358     const int yyi = yypgoto[yylhs] + *yyssp;
1359     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1360                ? yytable[yyi]
1361                : yydefgoto[yylhs]);
1362   }
1364   goto yynewstate;
1367 /*--------------------------------------.
1368 | yyerrlab -- here on detecting error.  |
1369 `--------------------------------------*/
1370 yyerrlab:
1371   /* Make sure we have latest lookahead translation.  See comments at
1372      user semantic actions for why this is necessary.  */
1373   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1374   /* If not already recovering from an error, report this error.  */
1375   if (!yyerrstatus)
1376     {
1377       ++yynerrs;
1378       yyerror (YY_("syntax error"));
1379     }
1381   if (yyerrstatus == 3)
1382     {
1383       /* If just tried and failed to reuse lookahead token after an
1384          error, discard it.  */
1386       if (yychar <= YYEOF)
1387         {
1388           /* Return failure if at end of input.  */
1389           if (yychar == YYEOF)
1390             YYABORT;
1391         }
1392       else
1393         {
1394           yydestruct ("Error: discarding",
1395                       yytoken, &yylval);
1396           yychar = YYEMPTY;
1397         }
1398     }
1400   /* Else will try to reuse lookahead token after shifting the error
1401      token.  */
1402   goto yyerrlab1;
1405 /*---------------------------------------------------.
1406 | yyerrorlab -- error raised explicitly by YYERROR.  |
1407 `---------------------------------------------------*/
1408 yyerrorlab:
1409   /* Pacify compilers when the user code never invokes YYERROR and the
1410      label yyerrorlab therefore never appears in user code.  */
1411   if (0)
1412     YYERROR;
1414   /* Do not reclaim the symbols of the rule whose action triggered
1415      this YYERROR.  */
1416   YYPOPSTACK (yylen);
1417   yylen = 0;
1418   YY_STACK_PRINT (yyss, yyssp);
1419   yystate = *yyssp;
1420   goto yyerrlab1;
1423 /*-------------------------------------------------------------.
1424 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1425 `-------------------------------------------------------------*/
1426 yyerrlab1:
1427   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1429   /* Pop stack until we find a state that shifts the error token.  */
1430   for (;;)
1431     {
1432       yyn = yypact[yystate];
1433       if (!yypact_value_is_default (yyn))
1434         {
1435           yyn += YYSYMBOL_YYerror;
1436           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1437             {
1438               yyn = yytable[yyn];
1439               if (0 < yyn)
1440                 break;
1441             }
1442         }
1444       /* Pop the current state because it cannot handle the error token.  */
1445       if (yyssp == yyss)
1446         YYABORT;
1449       yydestruct ("Error: popping",
1450                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
1451       YYPOPSTACK (1);
1452       yystate = *yyssp;
1453       YY_STACK_PRINT (yyss, yyssp);
1454     }
1456   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1457   *++yyvsp = yylval;
1458   YY_IGNORE_MAYBE_UNINITIALIZED_END
1461   /* Shift the error token.  */
1462   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1464   yystate = yyn;
1465   goto yynewstate;
1468 /*-------------------------------------.
1469 | yyacceptlab -- YYACCEPT comes here.  |
1470 `-------------------------------------*/
1471 yyacceptlab:
1472   yyresult = 0;
1473   goto yyreturn;
1476 /*-----------------------------------.
1477 | yyabortlab -- YYABORT comes here.  |
1478 `-----------------------------------*/
1479 yyabortlab:
1480   yyresult = 1;
1481   goto yyreturn;
1484 #if !defined yyoverflow
1485 /*-------------------------------------------------.
1486 | yyexhaustedlab -- memory exhaustion comes here.  |
1487 `-------------------------------------------------*/
1488 yyexhaustedlab:
1489   yyerror (YY_("memory exhausted"));
1490   yyresult = 2;
1491   goto yyreturn;
1492 #endif
1495 /*-------------------------------------------------------.
1496 | yyreturn -- parsing is finished, clean up and return.  |
1497 `-------------------------------------------------------*/
1498 yyreturn:
1499   if (yychar != YYEMPTY)
1500     {
1501       /* Make sure we have latest lookahead translation.  See comments at
1502          user semantic actions for why this is necessary.  */
1503       yytoken = YYTRANSLATE (yychar);
1504       yydestruct ("Cleanup: discarding lookahead",
1505                   yytoken, &yylval);
1506     }
1507   /* Do not reclaim the symbols of the rule whose action triggered
1508      this YYABORT or YYACCEPT.  */
1509   YYPOPSTACK (yylen);
1510   YY_STACK_PRINT (yyss, yyssp);
1511   while (yyssp != yyss)
1512     {
1513       yydestruct ("Cleanup: popping",
1514                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1515       YYPOPSTACK (1);
1516     }
1517 #ifndef yyoverflow
1518   if (yyss != yyssa)
1519     YYSTACK_FREE (yyss);
1520 #endif
1522   return yyresult;