blob: c298a652a96087cff914a7b64f152b8af5216675 [file] [log] [blame]
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001/* A Bison parser, made by GNU Bison 3.0.4. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00002
Sven Schnelle0fa50a12012-06-21 22:19:48 +02003/* Bison implementation for Yacc-like parsers in C
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07004
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00007 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.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070011
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000012 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.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070016
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000017 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/>. */
19
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.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070029
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000030 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33/* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
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. */
42
43/* Identify Bison output. */
44#define YYBISON 1
45
46/* Bison version. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070047#define YYBISON_VERSION "3.0.4"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000048
49/* Skeleton name. */
50#define YYSKELETON_NAME "yacc.c"
51
52/* Pure parsers. */
53#define YYPURE 0
54
55/* Push parsers. */
56#define YYPUSH 0
57
58/* Pull parsers. */
59#define YYPULL 1
60
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000061
62
63
64/* Copy the first part of user declarations. */
65
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000066
67/*
68 * sconfig, coreboot device tree compiler
69 *
70 * Copyright (C) 2010 coresystems GmbH
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070071 * written by Patrick Georgi <patrick@georgi-clan.de>
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000072 *
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.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000081 */
82
Patrick Georgi114e7b22010-05-05 11:19:50 +000083#include "sconfig.h"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000084
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070085int yylex();
86void yyerror(const char *s);
87
Furquan Shaikh93198262018-06-03 04:22:17 -070088static struct bus *cur_parent;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -070089static struct chip_instance *cur_chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000090
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000091
92
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000093
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070094# ifndef YY_NULLPTR
95# if defined __cplusplus && 201103L <= __cplusplus
96# define YY_NULLPTR nullptr
97# else
98# define YY_NULLPTR 0
99# endif
100# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000101
102/* Enabling verbose error messages. */
103#ifdef YYERROR_VERBOSE
104# undef YYERROR_VERBOSE
105# define YYERROR_VERBOSE 1
106#else
107# define YYERROR_VERBOSE 0
108#endif
109
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700110/* In a future release of Bison, this section will be replaced
111 by #include "sconfig.tab.h_shipped". */
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800112#ifndef YY_YY_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
113# define YY_YY_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700114/* Debug traces. */
115#ifndef YYDEBUG
116# define YYDEBUG 0
117#endif
118#if YYDEBUG
119extern int yydebug;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000120#endif
121
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700122/* Token type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000123#ifndef YYTOKENTYPE
124# define YYTOKENTYPE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700125 enum yytokentype
126 {
127 CHIP = 258,
128 DEVICE = 259,
129 REGISTER = 260,
130 BOOL = 261,
131 BUS = 262,
132 RESOURCE = 263,
133 END = 264,
134 EQUALS = 265,
135 HEX = 266,
136 STRING = 267,
137 PCI = 268,
138 PNP = 269,
139 I2C = 270,
140 APIC = 271,
141 CPU_CLUSTER = 272,
142 CPU = 273,
143 DOMAIN = 274,
144 IRQ = 275,
145 DRQ = 276,
146 IO = 277,
147 NUMBER = 278,
148 SUBSYSTEMID = 279,
149 INHERIT = 280,
150 IOAPIC_IRQ = 281,
151 IOAPIC = 282,
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700152 PCIINT = 283,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800153 GENERIC = 284,
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800154 SPI = 285,
Duncan Lauriebae9f852018-05-07 14:18:13 -0700155 USB = 286,
156 MMIO = 287
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700157 };
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000158#endif
159
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700160/* Value type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000161#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700162
163union YYSTYPE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000164{
165
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000166
Furquan Shaikh93198262018-06-03 04:22:17 -0700167 struct device *dev;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -0700168 struct chip_instance *chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000169 char *string;
170 int number;
171
172
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700173};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000174
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700175typedef union YYSTYPE YYSTYPE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000176# define YYSTYPE_IS_TRIVIAL 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000177# define YYSTYPE_IS_DECLARED 1
178#endif
179
180
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700181extern YYSTYPE yylval;
182
183int yyparse (void);
184
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800185#endif /* !YY_YY_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700186
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000187/* Copy the second part of user declarations. */
188
189
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000190
191#ifdef short
192# undef short
193#endif
194
195#ifdef YYTYPE_UINT8
196typedef YYTYPE_UINT8 yytype_uint8;
197#else
198typedef unsigned char yytype_uint8;
199#endif
200
201#ifdef YYTYPE_INT8
202typedef YYTYPE_INT8 yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000203#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700204typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000205#endif
206
207#ifdef YYTYPE_UINT16
208typedef YYTYPE_UINT16 yytype_uint16;
209#else
210typedef unsigned short int yytype_uint16;
211#endif
212
213#ifdef YYTYPE_INT16
214typedef YYTYPE_INT16 yytype_int16;
215#else
216typedef short int yytype_int16;
217#endif
218
219#ifndef YYSIZE_T
220# ifdef __SIZE_TYPE__
221# define YYSIZE_T __SIZE_TYPE__
222# elif defined size_t
223# define YYSIZE_T size_t
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700224# elif ! defined YYSIZE_T
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000225# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
226# define YYSIZE_T size_t
227# else
228# define YYSIZE_T unsigned int
229# endif
230#endif
231
232#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
233
234#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200235# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000236# if ENABLE_NLS
237# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700238# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000239# endif
240# endif
241# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700242# define YY_(Msgid) Msgid
243# endif
244#endif
245
246#ifndef YY_ATTRIBUTE
247# if (defined __GNUC__ \
248 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
249 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
250# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
251# else
252# define YY_ATTRIBUTE(Spec) /* empty */
253# endif
254#endif
255
256#ifndef YY_ATTRIBUTE_PURE
257# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
258#endif
259
260#ifndef YY_ATTRIBUTE_UNUSED
261# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
262#endif
263
264#if !defined _Noreturn \
265 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
266# if defined _MSC_VER && 1200 <= _MSC_VER
267# define _Noreturn __declspec (noreturn)
268# else
269# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000270# endif
271#endif
272
273/* Suppress unused-variable warnings by "using" E. */
274#if ! defined lint || defined __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700275# define YYUSE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000276#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700277# define YYUSE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000278#endif
279
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700280#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
281/* Suppress an incorrect diagnostic about yylval being uninitialized. */
282# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
283 _Pragma ("GCC diagnostic push") \
284 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
285 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
286# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
287 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000288#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700289# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000290#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700291#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
292# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
293# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000294#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700295#ifndef YY_INITIAL_VALUE
296# define YY_INITIAL_VALUE(Value) /* Nothing. */
297#endif
298
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000299
300#if ! defined yyoverflow || YYERROR_VERBOSE
301
302/* The parser invokes alloca or malloc; define the necessary symbols. */
303
304# ifdef YYSTACK_USE_ALLOCA
305# if YYSTACK_USE_ALLOCA
306# ifdef __GNUC__
307# define YYSTACK_ALLOC __builtin_alloca
308# elif defined __BUILTIN_VA_ARG_INCR
309# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
310# elif defined _AIX
311# define YYSTACK_ALLOC __alloca
312# elif defined _MSC_VER
313# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
314# define alloca _alloca
315# else
316# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700317# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000318# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700319 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200320# ifndef EXIT_SUCCESS
321# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000322# endif
323# endif
324# endif
325# endif
326# endif
327
328# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700329 /* Pacify GCC's 'empty if-body' warning. */
330# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000331# ifndef YYSTACK_ALLOC_MAXIMUM
332 /* The OS might guarantee only one guard page at the bottom of the stack,
333 and a page size can be as small as 4096 bytes. So we cannot safely
334 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
335 to allow for a few compiler-allocated temporary stack slots. */
336# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
337# endif
338# else
339# define YYSTACK_ALLOC YYMALLOC
340# define YYSTACK_FREE YYFREE
341# ifndef YYSTACK_ALLOC_MAXIMUM
342# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
343# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200344# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000345 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700346 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000347# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200348# ifndef EXIT_SUCCESS
349# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000350# endif
351# endif
352# ifndef YYMALLOC
353# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700354# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000355void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
356# endif
357# endif
358# ifndef YYFREE
359# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700360# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000361void free (void *); /* INFRINGES ON USER NAME SPACE */
362# endif
363# endif
364# endif
365#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
366
367
368#if (! defined yyoverflow \
369 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700370 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000371
372/* A type that is properly aligned for any stack member. */
373union yyalloc
374{
375 yytype_int16 yyss_alloc;
376 YYSTYPE yyvs_alloc;
377};
378
379/* The size of the maximum gap between one aligned stack and the next. */
380# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
381
382/* The size of an array large to enough to hold all stacks, each with
383 N elements. */
384# define YYSTACK_BYTES(N) \
385 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
386 + YYSTACK_GAP_MAXIMUM)
387
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200388# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000389
390/* Relocate STACK from its old location to the new one. The
391 local variables YYSIZE and YYSTACKSIZE give the old and new number of
392 elements in the stack, and YYPTR gives the new location of the
393 stack. Advance YYPTR to a properly aligned location for the next
394 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700395# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
396 do \
397 { \
398 YYSIZE_T yynewbytes; \
399 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
400 Stack = &yyptr->Stack_alloc; \
401 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
402 yyptr += yynewbytes / sizeof (*yyptr); \
403 } \
404 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000405
406#endif
407
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200408#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700409/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200410 not overlap. */
411# ifndef YYCOPY
412# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700413# define YYCOPY(Dst, Src, Count) \
414 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200415# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700416# define YYCOPY(Dst, Src, Count) \
417 do \
418 { \
419 YYSIZE_T yyi; \
420 for (yyi = 0; yyi < (Count); yyi++) \
421 (Dst)[yyi] = (Src)[yyi]; \
422 } \
423 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200424# endif
425# endif
426#endif /* !YYCOPY_NEEDED */
427
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000428/* YYFINAL -- State number of the termination state. */
Patrick Georgi68befd52010-05-05 12:05:25 +0000429#define YYFINAL 3
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000430/* YYLAST -- Last index in YYTABLE. */
Aaron Durbinffda804b2014-09-03 12:40:15 -0500431#define YYLAST 39
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000432
433/* YYNTOKENS -- Number of terminals. */
Duncan Lauriebae9f852018-05-07 14:18:13 -0700434#define YYNTOKENS 33
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000435/* YYNNTS -- Number of nonterminals. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200436#define YYNNTS 13
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000437/* YYNRULES -- Number of rules. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200438#define YYNRULES 22
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700439/* YYNSTATES -- Number of states. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200440#define YYNSTATES 41
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000441
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700442/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
443 by yylex, with out-of-bounds checking. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000444#define YYUNDEFTOK 2
Duncan Lauriebae9f852018-05-07 14:18:13 -0700445#define YYMAXUTOK 287
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000446
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700447#define YYTRANSLATE(YYX) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000448 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
449
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700450/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
451 as returned by yylex, without out-of-bounds checking. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000452static const yytype_uint8 yytranslate[] =
453{
454 0, 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, 2, 2, 2, 2,
478 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
480 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200481 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Duncan Lauriebae9f852018-05-07 14:18:13 -0700482 25, 26, 27, 28, 29, 30, 31, 32
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000483};
484
485#if YYDEBUG
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700486 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Patrick Georgi114e7b22010-05-05 11:19:50 +0000487static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000488{
Furquan Shaikh79e84122018-05-30 15:09:09 -0700489 0, 36, 36, 36, 38, 38, 38, 38, 40, 40,
Furquan Shaikh93198262018-06-03 04:22:17 -0700490 40, 40, 40, 40, 42, 42, 51, 51, 59, 62,
491 65, 68, 71
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000492};
493#endif
494
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700495#if YYDEBUG || YYERROR_VERBOSE || 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000496/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
497 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
498static const char *const yytname[] =
499{
500 "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
501 "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI", "PNP", "I2C",
Aaron Durbinffda804b2014-09-03 12:40:15 -0500502 "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "IO", "NUMBER",
Duncan Laurie4650f5b2016-05-07 20:01:34 -0700503 "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC",
Duncan Lauriebae9f852018-05-07 14:18:13 -0700504 "SPI", "USB", "MMIO", "$accept", "devtree", "$@1", "chipchildren",
Justin TerAvestca2ed9f2018-01-17 16:36:30 -0800505 "devicechildren", "chip", "@2", "device", "@3", "resource", "registers",
506 "subsystemid", "ioapic_irq", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000507};
508#endif
509
510# ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700511/* YYTOKNUM[NUM] -- (External) token number corresponding to the
512 (internal) symbol number NUM (which must be that of a token). */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000513static const yytype_uint16 yytoknum[] =
514{
515 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
516 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800517 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Duncan Lauriebae9f852018-05-07 14:18:13 -0700518 285, 286, 287
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000519};
520# endif
521
Aaron Durbinffda804b2014-09-03 12:40:15 -0500522#define YYPACT_NINF -10
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700523
524#define yypact_value_is_default(Yystate) \
525 (!!((Yystate) == (-10)))
526
527#define YYTABLE_NINF -1
528
529#define yytable_value_is_error(Yytable_value) \
530 0
531
532 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
533 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000534static const yytype_int8 yypact[] =
535{
Aaron Durbinffda804b2014-09-03 12:40:15 -0500536 -10, 3, 1, -10, -2, -10, -10, -10, 4, 5,
537 -1, -10, -10, -10, -10, -9, 7, 9, 6, -10,
538 -10, -10, -3, -4, -10, 2, 8, -10, -10, -10,
539 -10, -10, 10, 11, 0, 12, 13, 14, -10, -10,
540 -10
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000541};
542
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700543 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
544 Performed when YYTABLE does not specify something else to do. Zero
545 means the default is an error. */
546static const yytype_uint8 yydefact[] =
547{
548 2, 0, 0, 1, 0, 3, 14, 7, 0, 0,
549 0, 15, 5, 4, 6, 0, 0, 0, 0, 16,
550 19, 13, 0, 0, 17, 0, 0, 9, 8, 10,
551 11, 12, 0, 0, 0, 0, 20, 0, 18, 21,
552 22
553};
554
555 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000556static const yytype_int8 yypgoto[] =
557{
Aaron Durbinffda804b2014-09-03 12:40:15 -0500558 -10, -10, -10, -10, -10, -6, -10, 17, -10, -10,
559 -10, -10, -10
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000560};
561
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700562 /* YYDEFGOTO[NTERM-NUM]. */
563static const yytype_int8 yydefgoto[] =
564{
565 -1, 1, 2, 8, 22, 5, 7, 13, 21, 29,
566 14, 30, 31
567};
568
569 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
570 positive, shift that token. If negative, reduce the rule whose
571 number is the opposite. If YYTABLE_NINF, syntax error. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000572static const yytype_uint8 yytable[] =
573{
Sven Schnelle270a9082011-03-01 19:58:15 +0000574 4, 9, 12, 3, 4, 23, 24, 4, 9, 10,
Aaron Durbinffda804b2014-09-03 12:40:15 -0500575 6, 16, 15, 11, 17, 19, 27, 18, 20, 32,
576 35, 25, 0, 26, 0, 33, 0, 0, 37, 0,
577 0, 34, 0, 0, 36, 38, 0, 40, 39, 28
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000578};
579
Patrick Georgi8f625f62010-05-05 13:13:47 +0000580static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000581{
Sven Schnelle270a9082011-03-01 19:58:15 +0000582 3, 4, 8, 0, 3, 8, 9, 3, 4, 5,
Aaron Durbinffda804b2014-09-03 12:40:15 -0500583 12, 12, 7, 9, 23, 6, 22, 10, 12, 23,
584 10, 24, -1, 26, -1, 23, -1, -1, 28, -1,
585 -1, 23, -1, -1, 23, 23, -1, 23, 25, 22
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000586};
587
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700588 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
589 symbol of state STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000590static const yytype_uint8 yystos[] =
591{
Duncan Lauriebae9f852018-05-07 14:18:13 -0700592 0, 34, 35, 0, 3, 38, 12, 39, 36, 4,
593 5, 9, 38, 40, 43, 7, 12, 23, 10, 6,
594 12, 41, 37, 8, 9, 24, 26, 38, 40, 42,
595 44, 45, 23, 23, 23, 10, 23, 28, 23, 25,
Aaron Durbinffda804b2014-09-03 12:40:15 -0500596 23
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000597};
598
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700599 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
600static const yytype_uint8 yyr1[] =
601{
Duncan Lauriebae9f852018-05-07 14:18:13 -0700602 0, 33, 35, 34, 36, 36, 36, 36, 37, 37,
603 37, 37, 37, 37, 39, 38, 41, 40, 42, 43,
604 44, 44, 45
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700605};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000606
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700607 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
608static const yytype_uint8 yyr2[] =
609{
610 0, 2, 0, 2, 2, 2, 2, 0, 2, 2,
611 2, 2, 2, 0, 0, 5, 0, 7, 4, 4,
612 3, 4, 4
613};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000614
615
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700616#define yyerrok (yyerrstatus = 0)
617#define yyclearin (yychar = YYEMPTY)
618#define YYEMPTY (-2)
619#define YYEOF 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000620
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700621#define YYACCEPT goto yyacceptlab
622#define YYABORT goto yyabortlab
623#define YYERROR goto yyerrorlab
624
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000625
626#define YYRECOVERING() (!!yyerrstatus)
627
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700628#define YYBACKUP(Token, Value) \
629do \
630 if (yychar == YYEMPTY) \
631 { \
632 yychar = (Token); \
633 yylval = (Value); \
634 YYPOPSTACK (yylen); \
635 yystate = *yyssp; \
636 goto yybackup; \
637 } \
638 else \
639 { \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000640 yyerror (YY_("syntax error: cannot back up")); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700641 YYERROR; \
642 } \
643while (0)
644
645/* Error token number */
646#define YYTERROR 1
647#define YYERRCODE 256
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000648
649
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000650
651/* Enable debugging if requested. */
652#if YYDEBUG
653
654# ifndef YYFPRINTF
655# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
656# define YYFPRINTF fprintf
657# endif
658
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700659# define YYDPRINTF(Args) \
660do { \
661 if (yydebug) \
662 YYFPRINTF Args; \
663} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000664
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700665/* This macro is provided for backward compatibility. */
666#ifndef YY_LOCATION_PRINT
667# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
668#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000669
670
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700671# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
672do { \
673 if (yydebug) \
674 { \
675 YYFPRINTF (stderr, "%s ", Title); \
676 yy_symbol_print (stderr, \
677 Type, Value); \
678 YYFPRINTF (stderr, "\n"); \
679 } \
680} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000681
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700682
683/*----------------------------------------.
684| Print this symbol's value on YYOUTPUT. |
685`----------------------------------------*/
686
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000687static void
688yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000689{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700690 FILE *yyo = yyoutput;
691 YYUSE (yyo);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000692 if (!yyvaluep)
693 return;
694# ifdef YYPRINT
695 if (yytype < YYNTOKENS)
696 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000697# endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700698 YYUSE (yytype);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000699}
700
701
702/*--------------------------------.
703| Print this symbol on YYOUTPUT. |
704`--------------------------------*/
705
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000706static void
707yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000708{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700709 YYFPRINTF (yyoutput, "%s %s (",
710 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000711
712 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
713 YYFPRINTF (yyoutput, ")");
714}
715
716/*------------------------------------------------------------------.
717| yy_stack_print -- Print the state stack from its BOTTOM up to its |
718| TOP (included). |
719`------------------------------------------------------------------*/
720
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000721static void
722yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000723{
724 YYFPRINTF (stderr, "Stack now");
725 for (; yybottom <= yytop; yybottom++)
726 {
727 int yybot = *yybottom;
728 YYFPRINTF (stderr, " %d", yybot);
729 }
730 YYFPRINTF (stderr, "\n");
731}
732
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700733# define YY_STACK_PRINT(Bottom, Top) \
734do { \
735 if (yydebug) \
736 yy_stack_print ((Bottom), (Top)); \
737} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000738
739
740/*------------------------------------------------.
741| Report that the YYRULE is going to be reduced. |
742`------------------------------------------------*/
743
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000744static void
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700745yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000746{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700747 unsigned long int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000748 int yynrhs = yyr2[yyrule];
749 int yyi;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000750 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700751 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000752 /* The symbols being reduced. */
753 for (yyi = 0; yyi < yynrhs; yyi++)
754 {
755 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700756 yy_symbol_print (stderr,
757 yystos[yyssp[yyi + 1 - yynrhs]],
758 &(yyvsp[(yyi + 1) - (yynrhs)])
759 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000760 YYFPRINTF (stderr, "\n");
761 }
762}
763
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700764# define YY_REDUCE_PRINT(Rule) \
765do { \
766 if (yydebug) \
767 yy_reduce_print (yyssp, yyvsp, Rule); \
768} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000769
770/* Nonzero means print parse trace. It is left uninitialized so that
771 multiple parsers can coexist. */
772int yydebug;
773#else /* !YYDEBUG */
774# define YYDPRINTF(Args)
775# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
776# define YY_STACK_PRINT(Bottom, Top)
777# define YY_REDUCE_PRINT(Rule)
778#endif /* !YYDEBUG */
779
780
781/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700782#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000783# define YYINITDEPTH 200
784#endif
785
786/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
787 if the built-in stack extension method is used).
788
789 Do not make this value too large; the results are undefined if
790 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
791 evaluated with infinite-precision integer arithmetic. */
792
793#ifndef YYMAXDEPTH
794# define YYMAXDEPTH 10000
795#endif
796
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000797
798#if YYERROR_VERBOSE
799
800# ifndef yystrlen
801# if defined __GLIBC__ && defined _STRING_H
802# define yystrlen strlen
803# else
804/* Return the length of YYSTR. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000805static YYSIZE_T
806yystrlen (const char *yystr)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000807{
808 YYSIZE_T yylen;
809 for (yylen = 0; yystr[yylen]; yylen++)
810 continue;
811 return yylen;
812}
813# endif
814# endif
815
816# ifndef yystpcpy
817# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
818# define yystpcpy stpcpy
819# else
820/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
821 YYDEST. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000822static char *
823yystpcpy (char *yydest, const char *yysrc)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000824{
825 char *yyd = yydest;
826 const char *yys = yysrc;
827
828 while ((*yyd++ = *yys++) != '\0')
829 continue;
830
831 return yyd - 1;
832}
833# endif
834# endif
835
836# ifndef yytnamerr
837/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
838 quotes and backslashes, so that it's suitable for yyerror. The
839 heuristic is that double-quoting is unnecessary unless the string
840 contains an apostrophe, a comma, or backslash (other than
841 backslash-backslash). YYSTR is taken from yytname. If YYRES is
842 null, do not copy; instead, return the length of what the result
843 would have been. */
844static YYSIZE_T
845yytnamerr (char *yyres, const char *yystr)
846{
847 if (*yystr == '"')
848 {
849 YYSIZE_T yyn = 0;
850 char const *yyp = yystr;
851
852 for (;;)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700853 switch (*++yyp)
854 {
855 case '\'':
856 case ',':
857 goto do_not_strip_quotes;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000858
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700859 case '\\':
860 if (*++yyp != '\\')
861 goto do_not_strip_quotes;
862 /* Fall through. */
863 default:
864 if (yyres)
865 yyres[yyn] = *yyp;
866 yyn++;
867 break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000868
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700869 case '"':
870 if (yyres)
871 yyres[yyn] = '\0';
872 return yyn;
873 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000874 do_not_strip_quotes: ;
875 }
876
877 if (! yyres)
878 return yystrlen (yystr);
879
880 return yystpcpy (yyres, yystr) - yyres;
881}
882# endif
883
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200884/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
885 about the unexpected token YYTOKEN for the state stack whose top is
886 YYSSP.
887
888 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
889 not large enough to hold the message. In that case, also set
890 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
891 required number of bytes is too large to store. */
892static int
893yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
894 yytype_int16 *yyssp, int yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000895{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700896 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200897 YYSIZE_T yysize = yysize0;
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200898 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
899 /* Internationalized format string. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700900 const char *yyformat = YY_NULLPTR;
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200901 /* Arguments of yyformat. */
902 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
903 /* Number of reported tokens (one for the "unexpected", one per
904 "expected"). */
905 int yycount = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000906
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200907 /* There are many possibilities here to consider:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200908 - If this state is a consistent state with a default action, then
909 the only way this function was invoked is if the default action
910 is an error action. In that case, don't check for expected
911 tokens because there are none.
912 - The only way there can be no lookahead present (in yychar) is if
913 this state is a consistent state with a default action. Thus,
914 detecting the absence of a lookahead is sufficient to determine
915 that there is no unexpected or expected token to report. In that
916 case, just report a simple "syntax error".
917 - Don't assume there isn't a lookahead just because this state is a
918 consistent state with a default action. There might have been a
919 previous inconsistent state, consistent state with a non-default
920 action, or user semantic action that manipulated yychar.
921 - Of course, the expected token list depends on states to have
922 correct lookahead information, and it depends on the parser not
923 to perform extra reductions after fetching a lookahead from the
924 scanner and before detecting a syntax error. Thus, state merging
925 (from LALR or IELR) and default reductions corrupt the expected
926 token list. However, the list is correct for canonical LR with
927 one exception: it will still contain any token that will not be
928 accepted due to an error action in a later state.
929 */
930 if (yytoken != YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000931 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200932 int yyn = yypact[*yyssp];
933 yyarg[yycount++] = yytname[yytoken];
934 if (!yypact_value_is_default (yyn))
935 {
936 /* Start YYX at -YYN if negative to avoid negative indexes in
937 YYCHECK. In other words, skip the first -YYN actions for
938 this state because they are default actions. */
939 int yyxbegin = yyn < 0 ? -yyn : 0;
940 /* Stay within bounds of both yycheck and yytname. */
941 int yychecklim = YYLAST - yyn + 1;
942 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
943 int yyx;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000944
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200945 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
946 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
947 && !yytable_value_is_error (yytable[yyx + yyn]))
948 {
949 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
950 {
951 yycount = 1;
952 yysize = yysize0;
953 break;
954 }
955 yyarg[yycount++] = yytname[yyx];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700956 {
957 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
958 if (! (yysize <= yysize1
959 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
960 return 2;
961 yysize = yysize1;
962 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200963 }
964 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000965 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200966
967 switch (yycount)
968 {
969# define YYCASE_(N, S) \
970 case N: \
971 yyformat = S; \
972 break
973 YYCASE_(0, YY_("syntax error"));
974 YYCASE_(1, YY_("syntax error, unexpected %s"));
975 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
976 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
977 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
978 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
979# undef YYCASE_
980 }
981
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700982 {
983 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
984 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
985 return 2;
986 yysize = yysize1;
987 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200988
989 if (*yymsg_alloc < yysize)
990 {
991 *yymsg_alloc = 2 * yysize;
992 if (! (yysize <= *yymsg_alloc
993 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
994 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
995 return 1;
996 }
997
998 /* Avoid sprintf, as that infringes on the user's name space.
999 Don't have undefined behavior even if the translation
1000 produced a string with the wrong number of "%s"s. */
1001 {
1002 char *yyp = *yymsg;
1003 int yyi = 0;
1004 while ((*yyp = *yyformat) != '\0')
1005 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1006 {
1007 yyp += yytnamerr (yyp, yyarg[yyi++]);
1008 yyformat += 2;
1009 }
1010 else
1011 {
1012 yyp++;
1013 yyformat++;
1014 }
1015 }
1016 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001017}
1018#endif /* YYERROR_VERBOSE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001019
1020/*-----------------------------------------------.
1021| Release the memory associated to this symbol. |
1022`-----------------------------------------------*/
1023
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001024static void
1025yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001026{
1027 YYUSE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001028 if (!yymsg)
1029 yymsg = "Deleting";
1030 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1031
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001032 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1033 YYUSE (yytype);
1034 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001035}
1036
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001037
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001038
1039
1040/* The lookahead symbol. */
1041int yychar;
1042
1043/* The semantic value of the lookahead symbol. */
1044YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001045/* Number of syntax errors so far. */
1046int yynerrs;
1047
1048
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001049/*----------.
1050| yyparse. |
1051`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001052
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001053int
1054yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001055{
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001056 int yystate;
1057 /* Number of tokens to shift before error messages enabled. */
1058 int yyerrstatus;
1059
1060 /* The stacks and their tools:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001061 'yyss': related to states.
1062 'yyvs': related to semantic values.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001063
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001064 Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001065 to reallocate them elsewhere. */
1066
1067 /* The state stack. */
1068 yytype_int16 yyssa[YYINITDEPTH];
1069 yytype_int16 *yyss;
1070 yytype_int16 *yyssp;
1071
1072 /* The semantic value stack. */
1073 YYSTYPE yyvsa[YYINITDEPTH];
1074 YYSTYPE *yyvs;
1075 YYSTYPE *yyvsp;
1076
1077 YYSIZE_T yystacksize;
1078
1079 int yyn;
1080 int yyresult;
1081 /* Lookahead token as an internal (translated) token number. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001082 int yytoken = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001083 /* The variables used to return semantic value and location from the
1084 action routines. */
1085 YYSTYPE yyval;
1086
1087#if YYERROR_VERBOSE
1088 /* Buffer for error messages, and its allocated size. */
1089 char yymsgbuf[128];
1090 char *yymsg = yymsgbuf;
1091 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1092#endif
1093
1094#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1095
1096 /* The number of symbols on the RHS of the reduced rule.
1097 Keep to zero when no symbol should be popped. */
1098 int yylen = 0;
1099
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001100 yyssp = yyss = yyssa;
1101 yyvsp = yyvs = yyvsa;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001102 yystacksize = YYINITDEPTH;
1103
1104 YYDPRINTF ((stderr, "Starting parse\n"));
1105
1106 yystate = 0;
1107 yyerrstatus = 0;
1108 yynerrs = 0;
1109 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001110 goto yysetstate;
1111
1112/*------------------------------------------------------------.
1113| yynewstate -- Push a new state, which is found in yystate. |
1114`------------------------------------------------------------*/
1115 yynewstate:
1116 /* In all cases, when you get here, the value and location stacks
1117 have just been pushed. So pushing a state here evens the stacks. */
1118 yyssp++;
1119
1120 yysetstate:
1121 *yyssp = yystate;
1122
1123 if (yyss + yystacksize - 1 <= yyssp)
1124 {
1125 /* Get the current used size of the three stacks, in elements. */
1126 YYSIZE_T yysize = yyssp - yyss + 1;
1127
1128#ifdef yyoverflow
1129 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001130 /* Give user a chance to reallocate the stack. Use copies of
1131 these so that the &'s don't force the real ones into
1132 memory. */
1133 YYSTYPE *yyvs1 = yyvs;
1134 yytype_int16 *yyss1 = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001135
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001136 /* Each stack pointer address is followed by the size of the
1137 data in use in that stack, in bytes. This used to be a
1138 conditional around just the two extra args, but that might
1139 be undefined if yyoverflow is a macro. */
1140 yyoverflow (YY_("memory exhausted"),
1141 &yyss1, yysize * sizeof (*yyssp),
1142 &yyvs1, yysize * sizeof (*yyvsp),
1143 &yystacksize);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001144
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001145 yyss = yyss1;
1146 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001147 }
1148#else /* no yyoverflow */
1149# ifndef YYSTACK_RELOCATE
1150 goto yyexhaustedlab;
1151# else
1152 /* Extend the stack our own way. */
1153 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001154 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001155 yystacksize *= 2;
1156 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001157 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001158
1159 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001160 yytype_int16 *yyss1 = yyss;
1161 union yyalloc *yyptr =
1162 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1163 if (! yyptr)
1164 goto yyexhaustedlab;
1165 YYSTACK_RELOCATE (yyss_alloc, yyss);
1166 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001167# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001168 if (yyss1 != yyssa)
1169 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001170 }
1171# endif
1172#endif /* no yyoverflow */
1173
1174 yyssp = yyss + yysize - 1;
1175 yyvsp = yyvs + yysize - 1;
1176
1177 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001178 (unsigned long int) yystacksize));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001179
1180 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001181 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001182 }
1183
1184 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1185
1186 if (yystate == YYFINAL)
1187 YYACCEPT;
1188
1189 goto yybackup;
1190
1191/*-----------.
1192| yybackup. |
1193`-----------*/
1194yybackup:
1195
1196 /* Do appropriate processing given the current state. Read a
1197 lookahead token if we need one and don't already have one. */
1198
1199 /* First try to decide what to do without reference to lookahead token. */
1200 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001201 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001202 goto yydefault;
1203
1204 /* Not known => get a lookahead token if don't already have one. */
1205
1206 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1207 if (yychar == YYEMPTY)
1208 {
1209 YYDPRINTF ((stderr, "Reading a token: "));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001210 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001211 }
1212
1213 if (yychar <= YYEOF)
1214 {
1215 yychar = yytoken = YYEOF;
1216 YYDPRINTF ((stderr, "Now at end of input.\n"));
1217 }
1218 else
1219 {
1220 yytoken = YYTRANSLATE (yychar);
1221 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1222 }
1223
1224 /* If the proper action on seeing token YYTOKEN is to reduce or to
1225 detect an error, take that action. */
1226 yyn += yytoken;
1227 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1228 goto yydefault;
1229 yyn = yytable[yyn];
1230 if (yyn <= 0)
1231 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001232 if (yytable_value_is_error (yyn))
1233 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001234 yyn = -yyn;
1235 goto yyreduce;
1236 }
1237
1238 /* Count tokens shifted since error; after three, turn off error
1239 status. */
1240 if (yyerrstatus)
1241 yyerrstatus--;
1242
1243 /* Shift the lookahead token. */
1244 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1245
1246 /* Discard the shifted token. */
1247 yychar = YYEMPTY;
1248
1249 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001250 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001251 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001252 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001253
1254 goto yynewstate;
1255
1256
1257/*-----------------------------------------------------------.
1258| yydefault -- do the default action for the current state. |
1259`-----------------------------------------------------------*/
1260yydefault:
1261 yyn = yydefact[yystate];
1262 if (yyn == 0)
1263 goto yyerrlab;
1264 goto yyreduce;
1265
1266
1267/*-----------------------------.
1268| yyreduce -- Do a reduction. |
1269`-----------------------------*/
1270yyreduce:
1271 /* yyn is the number of a rule to reduce with. */
1272 yylen = yyr2[yyn];
1273
1274 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001275 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001276
1277 Otherwise, the following line sets YYVAL to garbage.
1278 This behavior is undocumented and Bison
1279 users should not rely upon it. Assigning to YYVAL
1280 unconditionally makes the parser a bit smaller, and it avoids a
1281 GCC warning that YYVAL may be used uninitialized. */
1282 yyval = yyvsp[1-yylen];
1283
1284
1285 YY_REDUCE_PRINT (yyn);
1286 switch (yyn)
1287 {
1288 case 2:
1289
Furquan Shaikh93198262018-06-03 04:22:17 -07001290 { cur_parent = root_parent; }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001291
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001292 break;
1293
Sven Schnelle270a9082011-03-01 19:58:15 +00001294 case 14:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001295
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001296 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001297 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1298 chip_enqueue_tail(cur_chip_instance);
1299 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001300}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001301
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001302 break;
1303
Sven Schnelle270a9082011-03-01 19:58:15 +00001304 case 15:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001305
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001306 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001307 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001308}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001309
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001310 break;
1311
Sven Schnelle270a9082011-03-01 19:58:15 +00001312 case 16:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001313
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001314 {
Furquan Shaikh93198262018-06-03 04:22:17 -07001315 (yyval.dev) = new_device(cur_parent, cur_chip_instance, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number));
1316 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001317}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001318
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001319 break;
1320
1321 case 17:
1322
1323 {
Furquan Shaikh93198262018-06-03 04:22:17 -07001324 cur_parent = (yyvsp[-2].dev)->parent;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001325}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001326
Patrick Georgi68befd52010-05-05 12:05:25 +00001327 break;
1328
Sven Schnelle270a9082011-03-01 19:58:15 +00001329 case 18:
Patrick Georgi68befd52010-05-05 12:05:25 +00001330
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001331 { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
1332
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001333 break;
1334
Sven Schnelle270a9082011-03-01 19:58:15 +00001335 case 19:
1336
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001337 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001338
Sven Schnelle270a9082011-03-01 19:58:15 +00001339 break;
1340
1341 case 20:
1342
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001343 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
1344
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001345 break;
1346
1347 case 21:
1348
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001349 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
1350
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001351 break;
1352
1353 case 22:
1354
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001355 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1356
Sven Schnelle270a9082011-03-01 19:58:15 +00001357 break;
1358
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001359
1360
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001361 default: break;
1362 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001363 /* User semantic actions sometimes alter yychar, and that requires
1364 that yytoken be updated with the new translation. We take the
1365 approach of translating immediately before every use of yytoken.
1366 One alternative is translating here after every semantic action,
1367 but that translation would be missed if the semantic action invokes
1368 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1369 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1370 incorrect destructor might then be invoked immediately. In the
1371 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1372 to an incorrect destructor call or verbose syntax error message
1373 before the lookahead is translated. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001374 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1375
1376 YYPOPSTACK (yylen);
1377 yylen = 0;
1378 YY_STACK_PRINT (yyss, yyssp);
1379
1380 *++yyvsp = yyval;
1381
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001382 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001383 that goes to, based on the state we popped back to and the rule
1384 number reduced by. */
1385
1386 yyn = yyr1[yyn];
1387
1388 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1389 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1390 yystate = yytable[yystate];
1391 else
1392 yystate = yydefgoto[yyn - YYNTOKENS];
1393
1394 goto yynewstate;
1395
1396
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001397/*--------------------------------------.
1398| yyerrlab -- here on detecting error. |
1399`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001400yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001401 /* Make sure we have latest lookahead translation. See comments at
1402 user semantic actions for why this is necessary. */
1403 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1404
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001405 /* If not already recovering from an error, report this error. */
1406 if (!yyerrstatus)
1407 {
1408 ++yynerrs;
1409#if ! YYERROR_VERBOSE
1410 yyerror (YY_("syntax error"));
1411#else
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001412# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1413 yyssp, yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001414 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001415 char const *yymsgp = YY_("syntax error");
1416 int yysyntax_error_status;
1417 yysyntax_error_status = YYSYNTAX_ERROR;
1418 if (yysyntax_error_status == 0)
1419 yymsgp = yymsg;
1420 else if (yysyntax_error_status == 1)
1421 {
1422 if (yymsg != yymsgbuf)
1423 YYSTACK_FREE (yymsg);
1424 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1425 if (!yymsg)
1426 {
1427 yymsg = yymsgbuf;
1428 yymsg_alloc = sizeof yymsgbuf;
1429 yysyntax_error_status = 2;
1430 }
1431 else
1432 {
1433 yysyntax_error_status = YYSYNTAX_ERROR;
1434 yymsgp = yymsg;
1435 }
1436 }
1437 yyerror (yymsgp);
1438 if (yysyntax_error_status == 2)
1439 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001440 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001441# undef YYSYNTAX_ERROR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001442#endif
1443 }
1444
1445
1446
1447 if (yyerrstatus == 3)
1448 {
1449 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001450 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001451
1452 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001453 {
1454 /* Return failure if at end of input. */
1455 if (yychar == YYEOF)
1456 YYABORT;
1457 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001458 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001459 {
1460 yydestruct ("Error: discarding",
1461 yytoken, &yylval);
1462 yychar = YYEMPTY;
1463 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001464 }
1465
1466 /* Else will try to reuse lookahead token after shifting the error
1467 token. */
1468 goto yyerrlab1;
1469
1470
1471/*---------------------------------------------------.
1472| yyerrorlab -- error raised explicitly by YYERROR. |
1473`---------------------------------------------------*/
1474yyerrorlab:
1475
1476 /* Pacify compilers like GCC when the user code never invokes
1477 YYERROR and the label yyerrorlab therefore never appears in user
1478 code. */
1479 if (/*CONSTCOND*/ 0)
1480 goto yyerrorlab;
1481
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001482 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001483 this YYERROR. */
1484 YYPOPSTACK (yylen);
1485 yylen = 0;
1486 YY_STACK_PRINT (yyss, yyssp);
1487 yystate = *yyssp;
1488 goto yyerrlab1;
1489
1490
1491/*-------------------------------------------------------------.
1492| yyerrlab1 -- common code for both syntax error and YYERROR. |
1493`-------------------------------------------------------------*/
1494yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001495 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001496
1497 for (;;)
1498 {
1499 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001500 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001501 {
1502 yyn += YYTERROR;
1503 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1504 {
1505 yyn = yytable[yyn];
1506 if (0 < yyn)
1507 break;
1508 }
1509 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001510
1511 /* Pop the current state because it cannot handle the error token. */
1512 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001513 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001514
1515
1516 yydestruct ("Error: popping",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001517 yystos[yystate], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001518 YYPOPSTACK (1);
1519 yystate = *yyssp;
1520 YY_STACK_PRINT (yyss, yyssp);
1521 }
1522
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001523 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001524 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001525 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001526
1527
1528 /* Shift the error token. */
1529 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1530
1531 yystate = yyn;
1532 goto yynewstate;
1533
1534
1535/*-------------------------------------.
1536| yyacceptlab -- YYACCEPT comes here. |
1537`-------------------------------------*/
1538yyacceptlab:
1539 yyresult = 0;
1540 goto yyreturn;
1541
1542/*-----------------------------------.
1543| yyabortlab -- YYABORT comes here. |
1544`-----------------------------------*/
1545yyabortlab:
1546 yyresult = 1;
1547 goto yyreturn;
1548
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001549#if !defined yyoverflow || YYERROR_VERBOSE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001550/*-------------------------------------------------.
1551| yyexhaustedlab -- memory exhaustion comes here. |
1552`-------------------------------------------------*/
1553yyexhaustedlab:
1554 yyerror (YY_("memory exhausted"));
1555 yyresult = 2;
1556 /* Fall through. */
1557#endif
1558
1559yyreturn:
1560 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001561 {
1562 /* Make sure we have latest lookahead translation. See comments at
1563 user semantic actions for why this is necessary. */
1564 yytoken = YYTRANSLATE (yychar);
1565 yydestruct ("Cleanup: discarding lookahead",
1566 yytoken, &yylval);
1567 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001568 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001569 this YYABORT or YYACCEPT. */
1570 YYPOPSTACK (yylen);
1571 YY_STACK_PRINT (yyss, yyssp);
1572 while (yyssp != yyss)
1573 {
1574 yydestruct ("Cleanup: popping",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001575 yystos[*yyssp], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001576 YYPOPSTACK (1);
1577 }
1578#ifndef yyoverflow
1579 if (yyss != yyssa)
1580 YYSTACK_FREE (yyss);
1581#endif
1582#if YYERROR_VERBOSE
1583 if (yymsg != yymsgbuf)
1584 YYSTACK_FREE (yymsg);
1585#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001586 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001587}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001588
1589