mb/google/octopus: enable xdci controller
[coreboot.git] / util / sconfig / sconfig.tab.c_shipped
blob1832f35bf3eaf817bb8f13abb0d71accd88d7ffc
1 /* A Bison parser, made by GNU Bison 3.0.4.  */
3 /* Bison implementation for Yacc-like parsers in C
5    Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
43 /* Identify Bison output.  */
44 #define YYBISON 1
46 /* Bison version.  */
47 #define YYBISON_VERSION "3.0.4"
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
52 /* Pure parsers.  */
53 #define YYPURE 0
55 /* Push parsers.  */
56 #define YYPUSH 0
58 /* Pull parsers.  */
59 #define YYPULL 1
64 /* Copy the first part of user declarations.  */
68  * sconfig, coreboot device tree compiler
69  *
70  * Copyright (C) 2010 coresystems GmbH
71  *   written by Patrick Georgi <patrick@georgi-clan.de>
72  *
73  * This program is free software; you can redistribute it and/or modify
74  * it under the terms of the GNU General Public License as published by
75  * the Free Software Foundation; version 2 of the License.
76  *
77  * This program is distributed in the hope that it will be useful,
78  * but WITHOUT ANY WARRANTY; without even the implied warranty of
79  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
80  * GNU General Public License for more details.
81  */
83 #include "sconfig.h"
85 int yylex();
86 void yyerror(const char *s);
88 static struct device *cur_parent, *cur_bus;
93 # ifndef YY_NULLPTR
94 #  if defined __cplusplus && 201103L <= __cplusplus
95 #   define YY_NULLPTR nullptr
96 #  else
97 #   define YY_NULLPTR 0
98 #  endif
99 # endif
101 /* Enabling verbose error messages.  */
102 #ifdef YYERROR_VERBOSE
103 # undef YYERROR_VERBOSE
104 # define YYERROR_VERBOSE 1
105 #else
106 # define YYERROR_VERBOSE 0
107 #endif
109 /* In a future release of Bison, this section will be replaced
110    by #include "sconfig.tab.h_shipped".  */
111 #ifndef YY_YY_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
112 # define YY_YY_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
113 /* Debug traces.  */
114 #ifndef YYDEBUG
115 # define YYDEBUG 0
116 #endif
117 #if YYDEBUG
118 extern int yydebug;
119 #endif
121 /* Token type.  */
122 #ifndef YYTOKENTYPE
123 # define YYTOKENTYPE
124   enum yytokentype
125   {
126     CHIP = 258,
127     DEVICE = 259,
128     REGISTER = 260,
129     BOOL = 261,
130     BUS = 262,
131     RESOURCE = 263,
132     END = 264,
133     EQUALS = 265,
134     HEX = 266,
135     STRING = 267,
136     PCI = 268,
137     PNP = 269,
138     I2C = 270,
139     APIC = 271,
140     CPU_CLUSTER = 272,
141     CPU = 273,
142     DOMAIN = 274,
143     IRQ = 275,
144     DRQ = 276,
145     IO = 277,
146     NUMBER = 278,
147     SUBSYSTEMID = 279,
148     INHERIT = 280,
149     IOAPIC_IRQ = 281,
150     IOAPIC = 282,
151     PCIINT = 283,
152     GENERIC = 284,
153     SPI = 285,
154     USB = 286,
155     MMIO = 287
156   };
157 #endif
159 /* Value type.  */
160 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
162 union YYSTYPE
166         struct device *device;
167         char *string;
168         int number;
173 typedef union YYSTYPE YYSTYPE;
174 # define YYSTYPE_IS_TRIVIAL 1
175 # define YYSTYPE_IS_DECLARED 1
176 #endif
179 extern YYSTYPE yylval;
181 int yyparse (void);
183 #endif /* !YY_YY_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED  */
185 /* Copy the second part of user declarations.  */
189 #ifdef short
190 # undef short
191 #endif
193 #ifdef YYTYPE_UINT8
194 typedef YYTYPE_UINT8 yytype_uint8;
195 #else
196 typedef unsigned char yytype_uint8;
197 #endif
199 #ifdef YYTYPE_INT8
200 typedef YYTYPE_INT8 yytype_int8;
201 #else
202 typedef signed char yytype_int8;
203 #endif
205 #ifdef YYTYPE_UINT16
206 typedef YYTYPE_UINT16 yytype_uint16;
207 #else
208 typedef unsigned short int yytype_uint16;
209 #endif
211 #ifdef YYTYPE_INT16
212 typedef YYTYPE_INT16 yytype_int16;
213 #else
214 typedef short int yytype_int16;
215 #endif
217 #ifndef YYSIZE_T
218 # ifdef __SIZE_TYPE__
219 #  define YYSIZE_T __SIZE_TYPE__
220 # elif defined size_t
221 #  define YYSIZE_T size_t
222 # elif ! defined YYSIZE_T
223 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
224 #  define YYSIZE_T size_t
225 # else
226 #  define YYSIZE_T unsigned int
227 # endif
228 #endif
230 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
232 #ifndef YY_
233 # if defined YYENABLE_NLS && YYENABLE_NLS
234 #  if ENABLE_NLS
235 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
236 #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
237 #  endif
238 # endif
239 # ifndef YY_
240 #  define YY_(Msgid) Msgid
241 # endif
242 #endif
244 #ifndef YY_ATTRIBUTE
245 # if (defined __GNUC__                                               \
246       && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
247      || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
248 #  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
249 # else
250 #  define YY_ATTRIBUTE(Spec) /* empty */
251 # endif
252 #endif
254 #ifndef YY_ATTRIBUTE_PURE
255 # define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
256 #endif
258 #ifndef YY_ATTRIBUTE_UNUSED
259 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
260 #endif
262 #if !defined _Noreturn \
263      && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
264 # if defined _MSC_VER && 1200 <= _MSC_VER
265 #  define _Noreturn __declspec (noreturn)
266 # else
267 #  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
268 # endif
269 #endif
271 /* Suppress unused-variable warnings by "using" E.  */
272 #if ! defined lint || defined __GNUC__
273 # define YYUSE(E) ((void) (E))
274 #else
275 # define YYUSE(E) /* empty */
276 #endif
278 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
279 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
280 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
281     _Pragma ("GCC diagnostic push") \
282     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
283     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
284 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
285     _Pragma ("GCC diagnostic pop")
286 #else
287 # define YY_INITIAL_VALUE(Value) Value
288 #endif
289 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
290 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
291 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
292 #endif
293 #ifndef YY_INITIAL_VALUE
294 # define YY_INITIAL_VALUE(Value) /* Nothing. */
295 #endif
298 #if ! defined yyoverflow || YYERROR_VERBOSE
300 /* The parser invokes alloca or malloc; define the necessary symbols.  */
302 # ifdef YYSTACK_USE_ALLOCA
303 #  if YYSTACK_USE_ALLOCA
304 #   ifdef __GNUC__
305 #    define YYSTACK_ALLOC __builtin_alloca
306 #   elif defined __BUILTIN_VA_ARG_INCR
307 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
308 #   elif defined _AIX
309 #    define YYSTACK_ALLOC __alloca
310 #   elif defined _MSC_VER
311 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
312 #    define alloca _alloca
313 #   else
314 #    define YYSTACK_ALLOC alloca
315 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
316 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
317       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
318 #     ifndef EXIT_SUCCESS
319 #      define EXIT_SUCCESS 0
320 #     endif
321 #    endif
322 #   endif
323 #  endif
324 # endif
326 # ifdef YYSTACK_ALLOC
327    /* Pacify GCC's 'empty if-body' warning.  */
328 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
329 #  ifndef YYSTACK_ALLOC_MAXIMUM
330     /* The OS might guarantee only one guard page at the bottom of the stack,
331        and a page size can be as small as 4096 bytes.  So we cannot safely
332        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
333        to allow for a few compiler-allocated temporary stack slots.  */
334 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
335 #  endif
336 # else
337 #  define YYSTACK_ALLOC YYMALLOC
338 #  define YYSTACK_FREE YYFREE
339 #  ifndef YYSTACK_ALLOC_MAXIMUM
340 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
341 #  endif
342 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
343        && ! ((defined YYMALLOC || defined malloc) \
344              && (defined YYFREE || defined free)))
345 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
346 #   ifndef EXIT_SUCCESS
347 #    define EXIT_SUCCESS 0
348 #   endif
349 #  endif
350 #  ifndef YYMALLOC
351 #   define YYMALLOC malloc
352 #   if ! defined malloc && ! defined EXIT_SUCCESS
353 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
354 #   endif
355 #  endif
356 #  ifndef YYFREE
357 #   define YYFREE free
358 #   if ! defined free && ! defined EXIT_SUCCESS
359 void free (void *); /* INFRINGES ON USER NAME SPACE */
360 #   endif
361 #  endif
362 # endif
363 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
366 #if (! defined yyoverflow \
367      && (! defined __cplusplus \
368          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
370 /* A type that is properly aligned for any stack member.  */
371 union yyalloc
373   yytype_int16 yyss_alloc;
374   YYSTYPE yyvs_alloc;
377 /* The size of the maximum gap between one aligned stack and the next.  */
378 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
380 /* The size of an array large to enough to hold all stacks, each with
381    N elements.  */
382 # define YYSTACK_BYTES(N) \
383      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
384       + YYSTACK_GAP_MAXIMUM)
386 # define YYCOPY_NEEDED 1
388 /* Relocate STACK from its old location to the new one.  The
389    local variables YYSIZE and YYSTACKSIZE give the old and new number of
390    elements in the stack, and YYPTR gives the new location of the
391    stack.  Advance YYPTR to a properly aligned location for the next
392    stack.  */
393 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
394     do                                                                  \
395       {                                                                 \
396         YYSIZE_T yynewbytes;                                            \
397         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
398         Stack = &yyptr->Stack_alloc;                                    \
399         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
400         yyptr += yynewbytes / sizeof (*yyptr);                          \
401       }                                                                 \
402     while (0)
404 #endif
406 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
407 /* Copy COUNT objects from SRC to DST.  The source and destination do
408    not overlap.  */
409 # ifndef YYCOPY
410 #  if defined __GNUC__ && 1 < __GNUC__
411 #   define YYCOPY(Dst, Src, Count) \
412       __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
413 #  else
414 #   define YYCOPY(Dst, Src, Count)              \
415       do                                        \
416         {                                       \
417           YYSIZE_T yyi;                         \
418           for (yyi = 0; yyi < (Count); yyi++)   \
419             (Dst)[yyi] = (Src)[yyi];            \
420         }                                       \
421       while (0)
422 #  endif
423 # endif
424 #endif /* !YYCOPY_NEEDED */
426 /* YYFINAL -- State number of the termination state.  */
427 #define YYFINAL  3
428 /* YYLAST -- Last index in YYTABLE.  */
429 #define YYLAST   39
431 /* YYNTOKENS -- Number of terminals.  */
432 #define YYNTOKENS  33
433 /* YYNNTS -- Number of nonterminals.  */
434 #define YYNNTS  13
435 /* YYNRULES -- Number of rules.  */
436 #define YYNRULES  22
437 /* YYNSTATES -- Number of states.  */
438 #define YYNSTATES  41
440 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
441    by yylex, with out-of-bounds checking.  */
442 #define YYUNDEFTOK  2
443 #define YYMAXUTOK   287
445 #define YYTRANSLATE(YYX)                                                \
446   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
448 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
449    as returned by yylex, without out-of-bounds checking.  */
450 static const yytype_uint8 yytranslate[] =
452        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
453        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
454        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
455        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
456        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
457        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
458        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
459        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
460        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
461        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
462        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
463        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
464        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
465        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
466        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
467        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
468        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
469        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
470        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
471        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
472        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
473        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
474        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
475        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
476        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
477        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
478        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
479       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
480       25,    26,    27,    28,    29,    30,    31,    32
483 #if YYDEBUG
484   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
485 static const yytype_uint8 yyrline[] =
487        0,    34,    34,    34,    36,    36,    36,    36,    38,    38,
488       38,    38,    38,    38,    40,    40,    50,    50,    62,    65,
489       68,    71,    74
491 #endif
493 #if YYDEBUG || YYERROR_VERBOSE || 0
494 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
495    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
496 static const char *const yytname[] =
498   "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
499   "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI", "PNP", "I2C",
500   "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "IO", "NUMBER",
501   "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC",
502   "SPI", "USB", "MMIO", "$accept", "devtree", "$@1", "chipchildren",
503   "devicechildren", "chip", "@2", "device", "@3", "resource", "registers",
504   "subsystemid", "ioapic_irq", YY_NULLPTR
506 #endif
508 # ifdef YYPRINT
509 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
510    (internal) symbol number NUM (which must be that of a token).  */
511 static const yytype_uint16 yytoknum[] =
513        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
514      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
515      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
516      285,   286,   287
518 # endif
520 #define YYPACT_NINF -10
522 #define yypact_value_is_default(Yystate) \
523   (!!((Yystate) == (-10)))
525 #define YYTABLE_NINF -1
527 #define yytable_value_is_error(Yytable_value) \
528   0
530   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
531      STATE-NUM.  */
532 static const yytype_int8 yypact[] =
534      -10,     3,     1,   -10,    -2,   -10,   -10,   -10,     4,     5,
535       -1,   -10,   -10,   -10,   -10,    -9,     7,     9,     6,   -10,
536      -10,   -10,    -3,    -4,   -10,     2,     8,   -10,   -10,   -10,
537      -10,   -10,    10,    11,     0,    12,    13,    14,   -10,   -10,
538      -10
541   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
542      Performed when YYTABLE does not specify something else to do.  Zero
543      means the default is an error.  */
544 static const yytype_uint8 yydefact[] =
546        2,     0,     0,     1,     0,     3,    14,     7,     0,     0,
547        0,    15,     5,     4,     6,     0,     0,     0,     0,    16,
548       19,    13,     0,     0,    17,     0,     0,     9,     8,    10,
549       11,    12,     0,     0,     0,     0,    20,     0,    18,    21,
550       22
553   /* YYPGOTO[NTERM-NUM].  */
554 static const yytype_int8 yypgoto[] =
556      -10,   -10,   -10,   -10,   -10,    -6,   -10,    17,   -10,   -10,
557      -10,   -10,   -10
560   /* YYDEFGOTO[NTERM-NUM].  */
561 static const yytype_int8 yydefgoto[] =
563       -1,     1,     2,     8,    22,     5,     7,    13,    21,    29,
564       14,    30,    31
567   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
568      positive, shift that token.  If negative, reduce the rule whose
569      number is the opposite.  If YYTABLE_NINF, syntax error.  */
570 static const yytype_uint8 yytable[] =
572        4,     9,    12,     3,     4,    23,    24,     4,     9,    10,
573        6,    16,    15,    11,    17,    19,    27,    18,    20,    32,
574       35,    25,     0,    26,     0,    33,     0,     0,    37,     0,
575        0,    34,     0,     0,    36,    38,     0,    40,    39,    28
578 static const yytype_int8 yycheck[] =
580        3,     4,     8,     0,     3,     8,     9,     3,     4,     5,
581       12,    12,     7,     9,    23,     6,    22,    10,    12,    23,
582       10,    24,    -1,    26,    -1,    23,    -1,    -1,    28,    -1,
583       -1,    23,    -1,    -1,    23,    23,    -1,    23,    25,    22
586   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
587      symbol of state STATE-NUM.  */
588 static const yytype_uint8 yystos[] =
590        0,    34,    35,     0,     3,    38,    12,    39,    36,     4,
591        5,     9,    38,    40,    43,     7,    12,    23,    10,     6,
592       12,    41,    37,     8,     9,    24,    26,    38,    40,    42,
593       44,    45,    23,    23,    23,    10,    23,    28,    23,    25,
594       23
597   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
598 static const yytype_uint8 yyr1[] =
600        0,    33,    35,    34,    36,    36,    36,    36,    37,    37,
601       37,    37,    37,    37,    39,    38,    41,    40,    42,    43,
602       44,    44,    45
605   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
606 static const yytype_uint8 yyr2[] =
608        0,     2,     0,     2,     2,     2,     2,     0,     2,     2,
609        2,     2,     2,     0,     0,     5,     0,     7,     4,     4,
610        3,     4,     4
614 #define yyerrok         (yyerrstatus = 0)
615 #define yyclearin       (yychar = YYEMPTY)
616 #define YYEMPTY         (-2)
617 #define YYEOF           0
619 #define YYACCEPT        goto yyacceptlab
620 #define YYABORT         goto yyabortlab
621 #define YYERROR         goto yyerrorlab
624 #define YYRECOVERING()  (!!yyerrstatus)
626 #define YYBACKUP(Token, Value)                                  \
627 do                                                              \
628   if (yychar == YYEMPTY)                                        \
629     {                                                           \
630       yychar = (Token);                                         \
631       yylval = (Value);                                         \
632       YYPOPSTACK (yylen);                                       \
633       yystate = *yyssp;                                         \
634       goto yybackup;                                            \
635     }                                                           \
636   else                                                          \
637     {                                                           \
638       yyerror (YY_("syntax error: cannot back up")); \
639       YYERROR;                                                  \
640     }                                                           \
641 while (0)
643 /* Error token number */
644 #define YYTERROR        1
645 #define YYERRCODE       256
649 /* Enable debugging if requested.  */
650 #if YYDEBUG
652 # ifndef YYFPRINTF
653 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
654 #  define YYFPRINTF fprintf
655 # endif
657 # define YYDPRINTF(Args)                        \
658 do {                                            \
659   if (yydebug)                                  \
660     YYFPRINTF Args;                             \
661 } while (0)
663 /* This macro is provided for backward compatibility. */
664 #ifndef YY_LOCATION_PRINT
665 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
666 #endif
669 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
670 do {                                                                      \
671   if (yydebug)                                                            \
672     {                                                                     \
673       YYFPRINTF (stderr, "%s ", Title);                                   \
674       yy_symbol_print (stderr,                                            \
675                   Type, Value); \
676       YYFPRINTF (stderr, "\n");                                           \
677     }                                                                     \
678 } while (0)
681 /*----------------------------------------.
682 | Print this symbol's value on YYOUTPUT.  |
683 `----------------------------------------*/
685 static void
686 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
688   FILE *yyo = yyoutput;
689   YYUSE (yyo);
690   if (!yyvaluep)
691     return;
692 # ifdef YYPRINT
693   if (yytype < YYNTOKENS)
694     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
695 # endif
696   YYUSE (yytype);
700 /*--------------------------------.
701 | Print this symbol on YYOUTPUT.  |
702 `--------------------------------*/
704 static void
705 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
707   YYFPRINTF (yyoutput, "%s %s (",
708              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
710   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
711   YYFPRINTF (yyoutput, ")");
714 /*------------------------------------------------------------------.
715 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
716 | TOP (included).                                                   |
717 `------------------------------------------------------------------*/
719 static void
720 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
722   YYFPRINTF (stderr, "Stack now");
723   for (; yybottom <= yytop; yybottom++)
724     {
725       int yybot = *yybottom;
726       YYFPRINTF (stderr, " %d", yybot);
727     }
728   YYFPRINTF (stderr, "\n");
731 # define YY_STACK_PRINT(Bottom, Top)                            \
732 do {                                                            \
733   if (yydebug)                                                  \
734     yy_stack_print ((Bottom), (Top));                           \
735 } while (0)
738 /*------------------------------------------------.
739 | Report that the YYRULE is going to be reduced.  |
740 `------------------------------------------------*/
742 static void
743 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
745   unsigned long int yylno = yyrline[yyrule];
746   int yynrhs = yyr2[yyrule];
747   int yyi;
748   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
749              yyrule - 1, yylno);
750   /* The symbols being reduced.  */
751   for (yyi = 0; yyi < yynrhs; yyi++)
752     {
753       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
754       yy_symbol_print (stderr,
755                        yystos[yyssp[yyi + 1 - yynrhs]],
756                        &(yyvsp[(yyi + 1) - (yynrhs)])
757                                               );
758       YYFPRINTF (stderr, "\n");
759     }
762 # define YY_REDUCE_PRINT(Rule)          \
763 do {                                    \
764   if (yydebug)                          \
765     yy_reduce_print (yyssp, yyvsp, Rule); \
766 } while (0)
768 /* Nonzero means print parse trace.  It is left uninitialized so that
769    multiple parsers can coexist.  */
770 int yydebug;
771 #else /* !YYDEBUG */
772 # define YYDPRINTF(Args)
773 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
774 # define YY_STACK_PRINT(Bottom, Top)
775 # define YY_REDUCE_PRINT(Rule)
776 #endif /* !YYDEBUG */
779 /* YYINITDEPTH -- initial size of the parser's stacks.  */
780 #ifndef YYINITDEPTH
781 # define YYINITDEPTH 200
782 #endif
784 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
785    if the built-in stack extension method is used).
787    Do not make this value too large; the results are undefined if
788    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
789    evaluated with infinite-precision integer arithmetic.  */
791 #ifndef YYMAXDEPTH
792 # define YYMAXDEPTH 10000
793 #endif
796 #if YYERROR_VERBOSE
798 # ifndef yystrlen
799 #  if defined __GLIBC__ && defined _STRING_H
800 #   define yystrlen strlen
801 #  else
802 /* Return the length of YYSTR.  */
803 static YYSIZE_T
804 yystrlen (const char *yystr)
806   YYSIZE_T yylen;
807   for (yylen = 0; yystr[yylen]; yylen++)
808     continue;
809   return yylen;
811 #  endif
812 # endif
814 # ifndef yystpcpy
815 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
816 #   define yystpcpy stpcpy
817 #  else
818 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
819    YYDEST.  */
820 static char *
821 yystpcpy (char *yydest, const char *yysrc)
823   char *yyd = yydest;
824   const char *yys = yysrc;
826   while ((*yyd++ = *yys++) != '\0')
827     continue;
829   return yyd - 1;
831 #  endif
832 # endif
834 # ifndef yytnamerr
835 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
836    quotes and backslashes, so that it's suitable for yyerror.  The
837    heuristic is that double-quoting is unnecessary unless the string
838    contains an apostrophe, a comma, or backslash (other than
839    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
840    null, do not copy; instead, return the length of what the result
841    would have been.  */
842 static YYSIZE_T
843 yytnamerr (char *yyres, const char *yystr)
845   if (*yystr == '"')
846     {
847       YYSIZE_T yyn = 0;
848       char const *yyp = yystr;
850       for (;;)
851         switch (*++yyp)
852           {
853           case '\'':
854           case ',':
855             goto do_not_strip_quotes;
857           case '\\':
858             if (*++yyp != '\\')
859               goto do_not_strip_quotes;
860             /* Fall through.  */
861           default:
862             if (yyres)
863               yyres[yyn] = *yyp;
864             yyn++;
865             break;
867           case '"':
868             if (yyres)
869               yyres[yyn] = '\0';
870             return yyn;
871           }
872     do_not_strip_quotes: ;
873     }
875   if (! yyres)
876     return yystrlen (yystr);
878   return yystpcpy (yyres, yystr) - yyres;
880 # endif
882 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
883    about the unexpected token YYTOKEN for the state stack whose top is
884    YYSSP.
886    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
887    not large enough to hold the message.  In that case, also set
888    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
889    required number of bytes is too large to store.  */
890 static int
891 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
892                 yytype_int16 *yyssp, int yytoken)
894   YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
895   YYSIZE_T yysize = yysize0;
896   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
897   /* Internationalized format string. */
898   const char *yyformat = YY_NULLPTR;
899   /* Arguments of yyformat. */
900   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
901   /* Number of reported tokens (one for the "unexpected", one per
902      "expected"). */
903   int yycount = 0;
905   /* There are many possibilities here to consider:
906      - If this state is a consistent state with a default action, then
907        the only way this function was invoked is if the default action
908        is an error action.  In that case, don't check for expected
909        tokens because there are none.
910      - The only way there can be no lookahead present (in yychar) is if
911        this state is a consistent state with a default action.  Thus,
912        detecting the absence of a lookahead is sufficient to determine
913        that there is no unexpected or expected token to report.  In that
914        case, just report a simple "syntax error".
915      - Don't assume there isn't a lookahead just because this state is a
916        consistent state with a default action.  There might have been a
917        previous inconsistent state, consistent state with a non-default
918        action, or user semantic action that manipulated yychar.
919      - Of course, the expected token list depends on states to have
920        correct lookahead information, and it depends on the parser not
921        to perform extra reductions after fetching a lookahead from the
922        scanner and before detecting a syntax error.  Thus, state merging
923        (from LALR or IELR) and default reductions corrupt the expected
924        token list.  However, the list is correct for canonical LR with
925        one exception: it will still contain any token that will not be
926        accepted due to an error action in a later state.
927   */
928   if (yytoken != YYEMPTY)
929     {
930       int yyn = yypact[*yyssp];
931       yyarg[yycount++] = yytname[yytoken];
932       if (!yypact_value_is_default (yyn))
933         {
934           /* Start YYX at -YYN if negative to avoid negative indexes in
935              YYCHECK.  In other words, skip the first -YYN actions for
936              this state because they are default actions.  */
937           int yyxbegin = yyn < 0 ? -yyn : 0;
938           /* Stay within bounds of both yycheck and yytname.  */
939           int yychecklim = YYLAST - yyn + 1;
940           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
941           int yyx;
943           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
944             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
945                 && !yytable_value_is_error (yytable[yyx + yyn]))
946               {
947                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
948                   {
949                     yycount = 1;
950                     yysize = yysize0;
951                     break;
952                   }
953                 yyarg[yycount++] = yytname[yyx];
954                 {
955                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
956                   if (! (yysize <= yysize1
957                          && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
958                     return 2;
959                   yysize = yysize1;
960                 }
961               }
962         }
963     }
965   switch (yycount)
966     {
967 # define YYCASE_(N, S)                      \
968       case N:                               \
969         yyformat = S;                       \
970       break
971       YYCASE_(0, YY_("syntax error"));
972       YYCASE_(1, YY_("syntax error, unexpected %s"));
973       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
974       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
975       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
976       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
977 # undef YYCASE_
978     }
980   {
981     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
982     if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
983       return 2;
984     yysize = yysize1;
985   }
987   if (*yymsg_alloc < yysize)
988     {
989       *yymsg_alloc = 2 * yysize;
990       if (! (yysize <= *yymsg_alloc
991              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
992         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
993       return 1;
994     }
996   /* Avoid sprintf, as that infringes on the user's name space.
997      Don't have undefined behavior even if the translation
998      produced a string with the wrong number of "%s"s.  */
999   {
1000     char *yyp = *yymsg;
1001     int yyi = 0;
1002     while ((*yyp = *yyformat) != '\0')
1003       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1004         {
1005           yyp += yytnamerr (yyp, yyarg[yyi++]);
1006           yyformat += 2;
1007         }
1008       else
1009         {
1010           yyp++;
1011           yyformat++;
1012         }
1013   }
1014   return 0;
1016 #endif /* YYERROR_VERBOSE */
1018 /*-----------------------------------------------.
1019 | Release the memory associated to this symbol.  |
1020 `-----------------------------------------------*/
1022 static void
1023 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1025   YYUSE (yyvaluep);
1026   if (!yymsg)
1027     yymsg = "Deleting";
1028   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1030   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1031   YYUSE (yytype);
1032   YY_IGNORE_MAYBE_UNINITIALIZED_END
1038 /* The lookahead symbol.  */
1039 int yychar;
1041 /* The semantic value of the lookahead symbol.  */
1042 YYSTYPE yylval;
1043 /* Number of syntax errors so far.  */
1044 int yynerrs;
1047 /*----------.
1048 | yyparse.  |
1049 `----------*/
1052 yyparse (void)
1054     int yystate;
1055     /* Number of tokens to shift before error messages enabled.  */
1056     int yyerrstatus;
1058     /* The stacks and their tools:
1059        'yyss': related to states.
1060        'yyvs': related to semantic values.
1062        Refer to the stacks through separate pointers, to allow yyoverflow
1063        to reallocate them elsewhere.  */
1065     /* The state stack.  */
1066     yytype_int16 yyssa[YYINITDEPTH];
1067     yytype_int16 *yyss;
1068     yytype_int16 *yyssp;
1070     /* The semantic value stack.  */
1071     YYSTYPE yyvsa[YYINITDEPTH];
1072     YYSTYPE *yyvs;
1073     YYSTYPE *yyvsp;
1075     YYSIZE_T yystacksize;
1077   int yyn;
1078   int yyresult;
1079   /* Lookahead token as an internal (translated) token number.  */
1080   int yytoken = 0;
1081   /* The variables used to return semantic value and location from the
1082      action routines.  */
1083   YYSTYPE yyval;
1085 #if YYERROR_VERBOSE
1086   /* Buffer for error messages, and its allocated size.  */
1087   char yymsgbuf[128];
1088   char *yymsg = yymsgbuf;
1089   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1090 #endif
1092 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1094   /* The number of symbols on the RHS of the reduced rule.
1095      Keep to zero when no symbol should be popped.  */
1096   int yylen = 0;
1098   yyssp = yyss = yyssa;
1099   yyvsp = yyvs = yyvsa;
1100   yystacksize = YYINITDEPTH;
1102   YYDPRINTF ((stderr, "Starting parse\n"));
1104   yystate = 0;
1105   yyerrstatus = 0;
1106   yynerrs = 0;
1107   yychar = YYEMPTY; /* Cause a token to be read.  */
1108   goto yysetstate;
1110 /*------------------------------------------------------------.
1111 | yynewstate -- Push a new state, which is found in yystate.  |
1112 `------------------------------------------------------------*/
1113  yynewstate:
1114   /* In all cases, when you get here, the value and location stacks
1115      have just been pushed.  So pushing a state here evens the stacks.  */
1116   yyssp++;
1118  yysetstate:
1119   *yyssp = yystate;
1121   if (yyss + yystacksize - 1 <= yyssp)
1122     {
1123       /* Get the current used size of the three stacks, in elements.  */
1124       YYSIZE_T yysize = yyssp - yyss + 1;
1126 #ifdef yyoverflow
1127       {
1128         /* Give user a chance to reallocate the stack.  Use copies of
1129            these so that the &'s don't force the real ones into
1130            memory.  */
1131         YYSTYPE *yyvs1 = yyvs;
1132         yytype_int16 *yyss1 = yyss;
1134         /* Each stack pointer address is followed by the size of the
1135            data in use in that stack, in bytes.  This used to be a
1136            conditional around just the two extra args, but that might
1137            be undefined if yyoverflow is a macro.  */
1138         yyoverflow (YY_("memory exhausted"),
1139                     &yyss1, yysize * sizeof (*yyssp),
1140                     &yyvs1, yysize * sizeof (*yyvsp),
1141                     &yystacksize);
1143         yyss = yyss1;
1144         yyvs = yyvs1;
1145       }
1146 #else /* no yyoverflow */
1147 # ifndef YYSTACK_RELOCATE
1148       goto yyexhaustedlab;
1149 # else
1150       /* Extend the stack our own way.  */
1151       if (YYMAXDEPTH <= yystacksize)
1152         goto yyexhaustedlab;
1153       yystacksize *= 2;
1154       if (YYMAXDEPTH < yystacksize)
1155         yystacksize = YYMAXDEPTH;
1157       {
1158         yytype_int16 *yyss1 = yyss;
1159         union yyalloc *yyptr =
1160           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1161         if (! yyptr)
1162           goto yyexhaustedlab;
1163         YYSTACK_RELOCATE (yyss_alloc, yyss);
1164         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1165 #  undef YYSTACK_RELOCATE
1166         if (yyss1 != yyssa)
1167           YYSTACK_FREE (yyss1);
1168       }
1169 # endif
1170 #endif /* no yyoverflow */
1172       yyssp = yyss + yysize - 1;
1173       yyvsp = yyvs + yysize - 1;
1175       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1176                   (unsigned long int) yystacksize));
1178       if (yyss + yystacksize - 1 <= yyssp)
1179         YYABORT;
1180     }
1182   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1184   if (yystate == YYFINAL)
1185     YYACCEPT;
1187   goto yybackup;
1189 /*-----------.
1190 | yybackup.  |
1191 `-----------*/
1192 yybackup:
1194   /* Do appropriate processing given the current state.  Read a
1195      lookahead token if we need one and don't already have one.  */
1197   /* First try to decide what to do without reference to lookahead token.  */
1198   yyn = yypact[yystate];
1199   if (yypact_value_is_default (yyn))
1200     goto yydefault;
1202   /* Not known => get a lookahead token if don't already have one.  */
1204   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1205   if (yychar == YYEMPTY)
1206     {
1207       YYDPRINTF ((stderr, "Reading a token: "));
1208       yychar = yylex ();
1209     }
1211   if (yychar <= YYEOF)
1212     {
1213       yychar = yytoken = YYEOF;
1214       YYDPRINTF ((stderr, "Now at end of input.\n"));
1215     }
1216   else
1217     {
1218       yytoken = YYTRANSLATE (yychar);
1219       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1220     }
1222   /* If the proper action on seeing token YYTOKEN is to reduce or to
1223      detect an error, take that action.  */
1224   yyn += yytoken;
1225   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1226     goto yydefault;
1227   yyn = yytable[yyn];
1228   if (yyn <= 0)
1229     {
1230       if (yytable_value_is_error (yyn))
1231         goto yyerrlab;
1232       yyn = -yyn;
1233       goto yyreduce;
1234     }
1236   /* Count tokens shifted since error; after three, turn off error
1237      status.  */
1238   if (yyerrstatus)
1239     yyerrstatus--;
1241   /* Shift the lookahead token.  */
1242   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1244   /* Discard the shifted token.  */
1245   yychar = YYEMPTY;
1247   yystate = yyn;
1248   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1249   *++yyvsp = yylval;
1250   YY_IGNORE_MAYBE_UNINITIALIZED_END
1252   goto yynewstate;
1255 /*-----------------------------------------------------------.
1256 | yydefault -- do the default action for the current state.  |
1257 `-----------------------------------------------------------*/
1258 yydefault:
1259   yyn = yydefact[yystate];
1260   if (yyn == 0)
1261     goto yyerrlab;
1262   goto yyreduce;
1265 /*-----------------------------.
1266 | yyreduce -- Do a reduction.  |
1267 `-----------------------------*/
1268 yyreduce:
1269   /* yyn is the number of a rule to reduce with.  */
1270   yylen = yyr2[yyn];
1272   /* If YYLEN is nonzero, implement the default value of the action:
1273      '$$ = $1'.
1275      Otherwise, the following line sets YYVAL to garbage.
1276      This behavior is undocumented and Bison
1277      users should not rely upon it.  Assigning to YYVAL
1278      unconditionally makes the parser a bit smaller, and it avoids a
1279      GCC warning that YYVAL may be used uninitialized.  */
1280   yyval = yyvsp[1-yylen];
1283   YY_REDUCE_PRINT (yyn);
1284   switch (yyn)
1285     {
1286         case 2:
1288     { cur_parent = cur_bus = head; }
1290     break;
1292   case 3:
1294     { postprocess_devtree(); }
1296     break;
1298   case 14:
1300     {
1301         (yyval.device) = new_chip(cur_parent, cur_bus, (yyvsp[0].string));
1302         cur_parent = (yyval.device);
1305     break;
1307   case 15:
1309     {
1310         cur_parent = (yyvsp[-2].device)->parent;
1311         fold_in((yyvsp[-2].device));
1312         add_header((yyvsp[-2].device));
1315     break;
1317   case 16:
1319     {
1320         (yyval.device) = new_device(cur_parent, cur_bus, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number));
1321         cur_parent = (yyval.device);
1322         cur_bus = (yyval.device);
1325     break;
1327   case 17:
1329     {
1330         cur_parent = (yyvsp[-2].device)->parent;
1331         cur_bus = (yyvsp[-2].device)->bus;
1332         fold_in((yyvsp[-2].device));
1333         alias_siblings((yyvsp[-2].device)->children);
1336     break;
1338   case 18:
1340     { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
1342     break;
1344   case 19:
1346     { add_register(cur_parent, (yyvsp[-2].string), (yyvsp[0].string)); }
1348     break;
1350   case 20:
1352     { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
1354     break;
1356   case 21:
1358     { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
1360     break;
1362   case 22:
1364     { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1366     break;
1370       default: break;
1371     }
1372   /* User semantic actions sometimes alter yychar, and that requires
1373      that yytoken be updated with the new translation.  We take the
1374      approach of translating immediately before every use of yytoken.
1375      One alternative is translating here after every semantic action,
1376      but that translation would be missed if the semantic action invokes
1377      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1378      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1379      incorrect destructor might then be invoked immediately.  In the
1380      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1381      to an incorrect destructor call or verbose syntax error message
1382      before the lookahead is translated.  */
1383   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1385   YYPOPSTACK (yylen);
1386   yylen = 0;
1387   YY_STACK_PRINT (yyss, yyssp);
1389   *++yyvsp = yyval;
1391   /* Now 'shift' the result of the reduction.  Determine what state
1392      that goes to, based on the state we popped back to and the rule
1393      number reduced by.  */
1395   yyn = yyr1[yyn];
1397   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1398   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1399     yystate = yytable[yystate];
1400   else
1401     yystate = yydefgoto[yyn - YYNTOKENS];
1403   goto yynewstate;
1406 /*--------------------------------------.
1407 | yyerrlab -- here on detecting error.  |
1408 `--------------------------------------*/
1409 yyerrlab:
1410   /* Make sure we have latest lookahead translation.  See comments at
1411      user semantic actions for why this is necessary.  */
1412   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1414   /* If not already recovering from an error, report this error.  */
1415   if (!yyerrstatus)
1416     {
1417       ++yynerrs;
1418 #if ! YYERROR_VERBOSE
1419       yyerror (YY_("syntax error"));
1420 #else
1421 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1422                                         yyssp, yytoken)
1423       {
1424         char const *yymsgp = YY_("syntax error");
1425         int yysyntax_error_status;
1426         yysyntax_error_status = YYSYNTAX_ERROR;
1427         if (yysyntax_error_status == 0)
1428           yymsgp = yymsg;
1429         else if (yysyntax_error_status == 1)
1430           {
1431             if (yymsg != yymsgbuf)
1432               YYSTACK_FREE (yymsg);
1433             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1434             if (!yymsg)
1435               {
1436                 yymsg = yymsgbuf;
1437                 yymsg_alloc = sizeof yymsgbuf;
1438                 yysyntax_error_status = 2;
1439               }
1440             else
1441               {
1442                 yysyntax_error_status = YYSYNTAX_ERROR;
1443                 yymsgp = yymsg;
1444               }
1445           }
1446         yyerror (yymsgp);
1447         if (yysyntax_error_status == 2)
1448           goto yyexhaustedlab;
1449       }
1450 # undef YYSYNTAX_ERROR
1451 #endif
1452     }
1456   if (yyerrstatus == 3)
1457     {
1458       /* If just tried and failed to reuse lookahead token after an
1459          error, discard it.  */
1461       if (yychar <= YYEOF)
1462         {
1463           /* Return failure if at end of input.  */
1464           if (yychar == YYEOF)
1465             YYABORT;
1466         }
1467       else
1468         {
1469           yydestruct ("Error: discarding",
1470                       yytoken, &yylval);
1471           yychar = YYEMPTY;
1472         }
1473     }
1475   /* Else will try to reuse lookahead token after shifting the error
1476      token.  */
1477   goto yyerrlab1;
1480 /*---------------------------------------------------.
1481 | yyerrorlab -- error raised explicitly by YYERROR.  |
1482 `---------------------------------------------------*/
1483 yyerrorlab:
1485   /* Pacify compilers like GCC when the user code never invokes
1486      YYERROR and the label yyerrorlab therefore never appears in user
1487      code.  */
1488   if (/*CONSTCOND*/ 0)
1489      goto yyerrorlab;
1491   /* Do not reclaim the symbols of the rule whose action triggered
1492      this YYERROR.  */
1493   YYPOPSTACK (yylen);
1494   yylen = 0;
1495   YY_STACK_PRINT (yyss, yyssp);
1496   yystate = *yyssp;
1497   goto yyerrlab1;
1500 /*-------------------------------------------------------------.
1501 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1502 `-------------------------------------------------------------*/
1503 yyerrlab1:
1504   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1506   for (;;)
1507     {
1508       yyn = yypact[yystate];
1509       if (!yypact_value_is_default (yyn))
1510         {
1511           yyn += YYTERROR;
1512           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1513             {
1514               yyn = yytable[yyn];
1515               if (0 < yyn)
1516                 break;
1517             }
1518         }
1520       /* Pop the current state because it cannot handle the error token.  */
1521       if (yyssp == yyss)
1522         YYABORT;
1525       yydestruct ("Error: popping",
1526                   yystos[yystate], yyvsp);
1527       YYPOPSTACK (1);
1528       yystate = *yyssp;
1529       YY_STACK_PRINT (yyss, yyssp);
1530     }
1532   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1533   *++yyvsp = yylval;
1534   YY_IGNORE_MAYBE_UNINITIALIZED_END
1537   /* Shift the error token.  */
1538   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1540   yystate = yyn;
1541   goto yynewstate;
1544 /*-------------------------------------.
1545 | yyacceptlab -- YYACCEPT comes here.  |
1546 `-------------------------------------*/
1547 yyacceptlab:
1548   yyresult = 0;
1549   goto yyreturn;
1551 /*-----------------------------------.
1552 | yyabortlab -- YYABORT comes here.  |
1553 `-----------------------------------*/
1554 yyabortlab:
1555   yyresult = 1;
1556   goto yyreturn;
1558 #if !defined yyoverflow || YYERROR_VERBOSE
1559 /*-------------------------------------------------.
1560 | yyexhaustedlab -- memory exhaustion comes here.  |
1561 `-------------------------------------------------*/
1562 yyexhaustedlab:
1563   yyerror (YY_("memory exhausted"));
1564   yyresult = 2;
1565   /* Fall through.  */
1566 #endif
1568 yyreturn:
1569   if (yychar != YYEMPTY)
1570     {
1571       /* Make sure we have latest lookahead translation.  See comments at
1572          user semantic actions for why this is necessary.  */
1573       yytoken = YYTRANSLATE (yychar);
1574       yydestruct ("Cleanup: discarding lookahead",
1575                   yytoken, &yylval);
1576     }
1577   /* Do not reclaim the symbols of the rule whose action triggered
1578      this YYABORT or YYACCEPT.  */
1579   YYPOPSTACK (yylen);
1580   YY_STACK_PRINT (yyss, yyssp);
1581   while (yyssp != yyss)
1582     {
1583       yydestruct ("Cleanup: popping",
1584                   yystos[*yyssp], yyvsp);
1585       YYPOPSTACK (1);
1586     }
1587 #ifndef yyoverflow
1588   if (yyss != yyssa)
1589     YYSTACK_FREE (yyss);
1590 #endif
1591 #if YYERROR_VERBOSE
1592   if (yymsg != yymsgbuf)
1593     YYSTACK_FREE (yymsg);
1594 #endif
1595   return yyresult;