blob: f4335c79ad11b333003148830b7efcb6de40836c [file] [log] [blame]
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00001/* 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
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +00005 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07006
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. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +000047#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". */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000112#ifndef YY_YY_HOME_RMINNICH_PROJECTS_LINUXBOOT_COREBOOTNERF_GITHUBCOREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
113# define YY_YY_HOME_RMINNICH_PROJECTS_LINUXBOOT_COREBOOTNERF_GITHUBCOREBOOT_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,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000131 STATUS = 262,
132 MANDATORY = 263,
133 BUS = 264,
134 RESOURCE = 265,
135 END = 266,
136 EQUALS = 267,
137 HEX = 268,
138 STRING = 269,
139 PCI = 270,
140 PNP = 271,
141 I2C = 272,
142 APIC = 273,
143 CPU_CLUSTER = 274,
144 CPU = 275,
145 DOMAIN = 276,
146 IRQ = 277,
147 DRQ = 278,
148 SLOT_DESC = 279,
149 IO = 280,
150 NUMBER = 281,
151 SUBSYSTEMID = 282,
152 INHERIT = 283,
153 IOAPIC_IRQ = 284,
154 IOAPIC = 285,
155 PCIINT = 286,
156 GENERIC = 287,
157 SPI = 288,
158 USB = 289,
159 MMIO = 290
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700160 };
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000161#endif
162
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700163/* Value type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000164#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700165
166union YYSTYPE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000167{
168
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000169
Furquan Shaikh93198262018-06-03 04:22:17 -0700170 struct device *dev;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -0700171 struct chip_instance *chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000172 char *string;
173 int number;
174
175
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700176};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000177
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700178typedef union YYSTYPE YYSTYPE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000179# define YYSTYPE_IS_TRIVIAL 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000180# define YYSTYPE_IS_DECLARED 1
181#endif
182
183
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700184extern YYSTYPE yylval;
185
186int yyparse (void);
187
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000188#endif /* !YY_YY_HOME_RMINNICH_PROJECTS_LINUXBOOT_COREBOOTNERF_GITHUBCOREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700189
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000190/* Copy the second part of user declarations. */
191
192
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000193
194#ifdef short
195# undef short
196#endif
197
198#ifdef YYTYPE_UINT8
199typedef YYTYPE_UINT8 yytype_uint8;
200#else
201typedef unsigned char yytype_uint8;
202#endif
203
204#ifdef YYTYPE_INT8
205typedef YYTYPE_INT8 yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000206#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700207typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000208#endif
209
210#ifdef YYTYPE_UINT16
211typedef YYTYPE_UINT16 yytype_uint16;
212#else
213typedef unsigned short int yytype_uint16;
214#endif
215
216#ifdef YYTYPE_INT16
217typedef YYTYPE_INT16 yytype_int16;
218#else
219typedef short int yytype_int16;
220#endif
221
222#ifndef YYSIZE_T
223# ifdef __SIZE_TYPE__
224# define YYSIZE_T __SIZE_TYPE__
225# elif defined size_t
226# define YYSIZE_T size_t
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700227# elif ! defined YYSIZE_T
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000228# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
229# define YYSIZE_T size_t
230# else
231# define YYSIZE_T unsigned int
232# endif
233#endif
234
235#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
236
237#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200238# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000239# if ENABLE_NLS
240# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700241# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000242# endif
243# endif
244# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700245# define YY_(Msgid) Msgid
246# endif
247#endif
248
249#ifndef YY_ATTRIBUTE
250# if (defined __GNUC__ \
251 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
252 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
253# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
254# else
255# define YY_ATTRIBUTE(Spec) /* empty */
256# endif
257#endif
258
259#ifndef YY_ATTRIBUTE_PURE
260# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
261#endif
262
263#ifndef YY_ATTRIBUTE_UNUSED
264# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
265#endif
266
267#if !defined _Noreturn \
268 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
269# if defined _MSC_VER && 1200 <= _MSC_VER
270# define _Noreturn __declspec (noreturn)
271# else
272# define _Noreturn YY_ATTRIBUTE ((__noreturn__))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000273# endif
274#endif
275
276/* Suppress unused-variable warnings by "using" E. */
277#if ! defined lint || defined __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700278# define YYUSE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000279#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700280# define YYUSE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000281#endif
282
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700283#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
284/* Suppress an incorrect diagnostic about yylval being uninitialized. */
285# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
286 _Pragma ("GCC diagnostic push") \
287 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
288 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
289# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
290 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000291#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700292# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000293#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700294#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
295# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
296# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000297#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700298#ifndef YY_INITIAL_VALUE
299# define YY_INITIAL_VALUE(Value) /* Nothing. */
300#endif
301
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000302
303#if ! defined yyoverflow || YYERROR_VERBOSE
304
305/* The parser invokes alloca or malloc; define the necessary symbols. */
306
307# ifdef YYSTACK_USE_ALLOCA
308# if YYSTACK_USE_ALLOCA
309# ifdef __GNUC__
310# define YYSTACK_ALLOC __builtin_alloca
311# elif defined __BUILTIN_VA_ARG_INCR
312# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
313# elif defined _AIX
314# define YYSTACK_ALLOC __alloca
315# elif defined _MSC_VER
316# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
317# define alloca _alloca
318# else
319# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700320# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000321# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700322 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200323# ifndef EXIT_SUCCESS
324# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000325# endif
326# endif
327# endif
328# endif
329# endif
330
331# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700332 /* Pacify GCC's 'empty if-body' warning. */
333# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000334# ifndef YYSTACK_ALLOC_MAXIMUM
335 /* The OS might guarantee only one guard page at the bottom of the stack,
336 and a page size can be as small as 4096 bytes. So we cannot safely
337 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
338 to allow for a few compiler-allocated temporary stack slots. */
339# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
340# endif
341# else
342# define YYSTACK_ALLOC YYMALLOC
343# define YYSTACK_FREE YYFREE
344# ifndef YYSTACK_ALLOC_MAXIMUM
345# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
346# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200347# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000348 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700349 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000350# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200351# ifndef EXIT_SUCCESS
352# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000353# endif
354# endif
355# ifndef YYMALLOC
356# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700357# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000358void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
359# endif
360# endif
361# ifndef YYFREE
362# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700363# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000364void free (void *); /* INFRINGES ON USER NAME SPACE */
365# endif
366# endif
367# endif
368#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
369
370
371#if (! defined yyoverflow \
372 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700373 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000374
375/* A type that is properly aligned for any stack member. */
376union yyalloc
377{
378 yytype_int16 yyss_alloc;
379 YYSTYPE yyvs_alloc;
380};
381
382/* The size of the maximum gap between one aligned stack and the next. */
383# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
384
385/* The size of an array large to enough to hold all stacks, each with
386 N elements. */
387# define YYSTACK_BYTES(N) \
388 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
389 + YYSTACK_GAP_MAXIMUM)
390
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200391# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000392
393/* Relocate STACK from its old location to the new one. The
394 local variables YYSIZE and YYSTACKSIZE give the old and new number of
395 elements in the stack, and YYPTR gives the new location of the
396 stack. Advance YYPTR to a properly aligned location for the next
397 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700398# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
399 do \
400 { \
401 YYSIZE_T yynewbytes; \
402 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
403 Stack = &yyptr->Stack_alloc; \
404 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
405 yyptr += yynewbytes / sizeof (*yyptr); \
406 } \
407 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000408
409#endif
410
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200411#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700412/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200413 not overlap. */
414# ifndef YYCOPY
415# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700416# define YYCOPY(Dst, Src, Count) \
417 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200418# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700419# define YYCOPY(Dst, Src, Count) \
420 do \
421 { \
422 YYSIZE_T yyi; \
423 for (yyi = 0; yyi < (Count); yyi++) \
424 (Dst)[yyi] = (Src)[yyi]; \
425 } \
426 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200427# endif
428# endif
429#endif /* !YYCOPY_NEEDED */
430
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000431/* YYFINAL -- State number of the termination state. */
Patrick Georgi68befd52010-05-05 12:05:25 +0000432#define YYFINAL 3
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000433/* YYLAST -- Last index in YYTABLE. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000434#define YYLAST 40
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000435
436/* YYNTOKENS -- Number of terminals. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000437#define YYNTOKENS 36
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000438/* YYNNTS -- Number of nonterminals. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200439#define YYNNTS 15
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000440/* YYNRULES -- Number of rules. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200441#define YYNRULES 28
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700442/* YYNSTATES -- Number of states. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200443#define YYNSTATES 49
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000444
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700445/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
446 by yylex, with out-of-bounds checking. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000447#define YYUNDEFTOK 2
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000448#define YYMAXUTOK 290
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000449
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700450#define YYTRANSLATE(YYX) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000451 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
452
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700453/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
454 as returned by yylex, without out-of-bounds checking. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000455static const yytype_uint8 yytranslate[] =
456{
457 0, 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, 2, 2, 2, 2,
480 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
481 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
483 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200484 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000485 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
486 35
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000487};
488
489#if YYDEBUG
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700490 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Patrick Georgi114e7b22010-05-05 11:19:50 +0000491static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000492{
Furquan Shaikh79e84122018-05-30 15:09:09 -0700493 0, 36, 36, 36, 38, 38, 38, 38, 40, 40,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200494 40, 40, 40, 40, 40, 42, 42, 51, 51, 59,
495 59, 61, 64, 67, 70, 73, 76, 79, 82
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000496};
497#endif
498
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700499#if YYDEBUG || YYERROR_VERBOSE || 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000500/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
501 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
502static const char *const yytname[] =
503{
504 "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000505 "STATUS", "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX",
506 "STRING", "PCI", "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN",
507 "IRQ", "DRQ", "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
508 "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
509 "$accept", "devtree", "$@1", "chipchildren", "devicechildren", "chip",
510 "@2", "device", "@3", "status", "resource", "registers", "subsystemid",
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200511 "ioapic_irq", "smbios_slot_desc", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000512};
513#endif
514
515# ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700516/* YYTOKNUM[NUM] -- (External) token number corresponding to the
517 (internal) symbol number NUM (which must be that of a token). */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000518static const yytype_uint16 yytoknum[] =
519{
520 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
521 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800522 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000523 285, 286, 287, 288, 289, 290
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000524};
525# endif
526
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200527#define YYPACT_NINF -12
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700528
529#define yypact_value_is_default(Yystate) \
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200530 (!!((Yystate) == (-12)))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700531
532#define YYTABLE_NINF -1
533
534#define yytable_value_is_error(Yytable_value) \
535 0
536
537 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
538 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000539static const yytype_int8 yypact[] =
540{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000541 -12, 6, 9, -12, -1, -12, -12, -12, 0, 5,
542 1, -12, -12, -12, -12, -10, 7, 3, 8, -12,
543 -12, -12, -12, -12, -3, -9, -12, 11, 2, 4,
544 -12, -12, -12, -12, -12, -12, 15, 17, 10, -11,
545 12, 18, -5, 13, -12, 19, -12, -12, -12
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000546};
547
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700548 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
549 Performed when YYTABLE does not specify something else to do. Zero
550 means the default is an error. */
551static const yytype_uint8 yydefact[] =
552{
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200553 2, 0, 0, 1, 0, 3, 15, 7, 0, 0,
554 0, 16, 5, 4, 6, 0, 0, 0, 0, 19,
555 20, 17, 22, 14, 0, 0, 18, 0, 0, 0,
556 9, 8, 10, 11, 12, 13, 0, 0, 0, 0,
557 0, 28, 23, 0, 21, 27, 24, 25, 26
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700558};
559
560 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000561static const yytype_int8 yypgoto[] =
562{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000563 -12, -12, -12, -12, -12, -6, -12, 16, -12, -12,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200564 -12, -12, -12, -12, -12
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000565};
566
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700567 /* YYDEFGOTO[NTERM-NUM]. */
568static const yytype_int8 yydefgoto[] =
569{
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800570 -1, 1, 2, 8, 24, 5, 7, 13, 23, 21,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200571 32, 14, 33, 34, 35
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700572};
573
574 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
575 positive, shift that token. If negative, reduce the rule whose
576 number is the opposite. If YYTABLE_NINF, syntax error. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000577static const yytype_uint8 yytable[] =
578{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000579 4, 9, 12, 4, 9, 10, 3, 25, 26, 19,
580 20, 11, 4, 6, 15, 16, 17, 36, 30, 18,
581 43, 27, 22, 46, 28, 37, 29, 40, 38, 0,
582 39, 41, 45, 48, 0, 0, 42, 0, 44, 47,
583 31
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000584};
585
Patrick Georgi8f625f62010-05-05 13:13:47 +0000586static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000587{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000588 3, 4, 8, 3, 4, 5, 0, 10, 11, 6,
589 7, 11, 3, 14, 9, 14, 26, 26, 24, 12,
590 31, 24, 14, 28, 27, 14, 29, 12, 26, -1,
591 26, 14, 14, 14, -1, -1, 26, -1, 26, 26,
592 24
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000593};
594
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700595 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
596 symbol of state STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000597static const yytype_uint8 yystos[] =
598{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000599 0, 37, 38, 0, 3, 41, 14, 42, 39, 4,
600 5, 11, 41, 43, 47, 9, 14, 26, 12, 6,
601 7, 45, 14, 44, 40, 10, 11, 24, 27, 29,
602 41, 43, 46, 48, 49, 50, 26, 14, 26, 26,
603 12, 14, 26, 31, 26, 14, 28, 26, 14
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000604};
605
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700606 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
607static const yytype_uint8 yyr1[] =
608{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000609 0, 36, 38, 37, 39, 39, 39, 39, 40, 40,
610 40, 40, 40, 40, 40, 42, 41, 44, 43, 45,
611 45, 46, 47, 48, 48, 49, 50, 50, 50
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700612};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000613
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700614 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
615static const yytype_uint8 yyr2[] =
616{
617 0, 2, 0, 2, 2, 2, 2, 0, 2, 2,
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200618 2, 2, 2, 2, 0, 0, 5, 0, 7, 1,
619 1, 4, 4, 3, 4, 4, 5, 4, 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700620};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000621
622
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700623#define yyerrok (yyerrstatus = 0)
624#define yyclearin (yychar = YYEMPTY)
625#define YYEMPTY (-2)
626#define YYEOF 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000627
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700628#define YYACCEPT goto yyacceptlab
629#define YYABORT goto yyabortlab
630#define YYERROR goto yyerrorlab
631
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000632
633#define YYRECOVERING() (!!yyerrstatus)
634
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700635#define YYBACKUP(Token, Value) \
636do \
637 if (yychar == YYEMPTY) \
638 { \
639 yychar = (Token); \
640 yylval = (Value); \
641 YYPOPSTACK (yylen); \
642 yystate = *yyssp; \
643 goto yybackup; \
644 } \
645 else \
646 { \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000647 yyerror (YY_("syntax error: cannot back up")); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700648 YYERROR; \
649 } \
650while (0)
651
652/* Error token number */
653#define YYTERROR 1
654#define YYERRCODE 256
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000655
656
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000657
658/* Enable debugging if requested. */
659#if YYDEBUG
660
661# ifndef YYFPRINTF
662# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
663# define YYFPRINTF fprintf
664# endif
665
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700666# define YYDPRINTF(Args) \
667do { \
668 if (yydebug) \
669 YYFPRINTF Args; \
670} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000671
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700672/* This macro is provided for backward compatibility. */
673#ifndef YY_LOCATION_PRINT
674# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
675#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000676
677
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700678# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
679do { \
680 if (yydebug) \
681 { \
682 YYFPRINTF (stderr, "%s ", Title); \
683 yy_symbol_print (stderr, \
684 Type, Value); \
685 YYFPRINTF (stderr, "\n"); \
686 } \
687} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000688
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700689
690/*----------------------------------------.
691| Print this symbol's value on YYOUTPUT. |
692`----------------------------------------*/
693
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000694static void
695yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000696{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700697 FILE *yyo = yyoutput;
698 YYUSE (yyo);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000699 if (!yyvaluep)
700 return;
701# ifdef YYPRINT
702 if (yytype < YYNTOKENS)
703 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000704# endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700705 YYUSE (yytype);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000706}
707
708
709/*--------------------------------.
710| Print this symbol on YYOUTPUT. |
711`--------------------------------*/
712
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000713static void
714yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000715{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700716 YYFPRINTF (yyoutput, "%s %s (",
717 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000718
719 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
720 YYFPRINTF (yyoutput, ")");
721}
722
723/*------------------------------------------------------------------.
724| yy_stack_print -- Print the state stack from its BOTTOM up to its |
725| TOP (included). |
726`------------------------------------------------------------------*/
727
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000728static void
729yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000730{
731 YYFPRINTF (stderr, "Stack now");
732 for (; yybottom <= yytop; yybottom++)
733 {
734 int yybot = *yybottom;
735 YYFPRINTF (stderr, " %d", yybot);
736 }
737 YYFPRINTF (stderr, "\n");
738}
739
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700740# define YY_STACK_PRINT(Bottom, Top) \
741do { \
742 if (yydebug) \
743 yy_stack_print ((Bottom), (Top)); \
744} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000745
746
747/*------------------------------------------------.
748| Report that the YYRULE is going to be reduced. |
749`------------------------------------------------*/
750
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000751static void
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700752yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000753{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700754 unsigned long int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000755 int yynrhs = yyr2[yyrule];
756 int yyi;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000757 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700758 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000759 /* The symbols being reduced. */
760 for (yyi = 0; yyi < yynrhs; yyi++)
761 {
762 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700763 yy_symbol_print (stderr,
764 yystos[yyssp[yyi + 1 - yynrhs]],
765 &(yyvsp[(yyi + 1) - (yynrhs)])
766 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000767 YYFPRINTF (stderr, "\n");
768 }
769}
770
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700771# define YY_REDUCE_PRINT(Rule) \
772do { \
773 if (yydebug) \
774 yy_reduce_print (yyssp, yyvsp, Rule); \
775} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000776
777/* Nonzero means print parse trace. It is left uninitialized so that
778 multiple parsers can coexist. */
779int yydebug;
780#else /* !YYDEBUG */
781# define YYDPRINTF(Args)
782# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
783# define YY_STACK_PRINT(Bottom, Top)
784# define YY_REDUCE_PRINT(Rule)
785#endif /* !YYDEBUG */
786
787
788/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700789#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000790# define YYINITDEPTH 200
791#endif
792
793/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
794 if the built-in stack extension method is used).
795
796 Do not make this value too large; the results are undefined if
797 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
798 evaluated with infinite-precision integer arithmetic. */
799
800#ifndef YYMAXDEPTH
801# define YYMAXDEPTH 10000
802#endif
803
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000804
805#if YYERROR_VERBOSE
806
807# ifndef yystrlen
808# if defined __GLIBC__ && defined _STRING_H
809# define yystrlen strlen
810# else
811/* Return the length of YYSTR. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000812static YYSIZE_T
813yystrlen (const char *yystr)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000814{
815 YYSIZE_T yylen;
816 for (yylen = 0; yystr[yylen]; yylen++)
817 continue;
818 return yylen;
819}
820# endif
821# endif
822
823# ifndef yystpcpy
824# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
825# define yystpcpy stpcpy
826# else
827/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
828 YYDEST. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000829static char *
830yystpcpy (char *yydest, const char *yysrc)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000831{
832 char *yyd = yydest;
833 const char *yys = yysrc;
834
835 while ((*yyd++ = *yys++) != '\0')
836 continue;
837
838 return yyd - 1;
839}
840# endif
841# endif
842
843# ifndef yytnamerr
844/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
845 quotes and backslashes, so that it's suitable for yyerror. The
846 heuristic is that double-quoting is unnecessary unless the string
847 contains an apostrophe, a comma, or backslash (other than
848 backslash-backslash). YYSTR is taken from yytname. If YYRES is
849 null, do not copy; instead, return the length of what the result
850 would have been. */
851static YYSIZE_T
852yytnamerr (char *yyres, const char *yystr)
853{
854 if (*yystr == '"')
855 {
856 YYSIZE_T yyn = 0;
857 char const *yyp = yystr;
858
859 for (;;)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700860 switch (*++yyp)
861 {
862 case '\'':
863 case ',':
864 goto do_not_strip_quotes;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000865
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700866 case '\\':
867 if (*++yyp != '\\')
868 goto do_not_strip_quotes;
869 /* Fall through. */
870 default:
871 if (yyres)
872 yyres[yyn] = *yyp;
873 yyn++;
874 break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000875
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700876 case '"':
877 if (yyres)
878 yyres[yyn] = '\0';
879 return yyn;
880 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000881 do_not_strip_quotes: ;
882 }
883
884 if (! yyres)
885 return yystrlen (yystr);
886
887 return yystpcpy (yyres, yystr) - yyres;
888}
889# endif
890
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200891/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
892 about the unexpected token YYTOKEN for the state stack whose top is
893 YYSSP.
894
895 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
896 not large enough to hold the message. In that case, also set
897 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
898 required number of bytes is too large to store. */
899static int
900yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
901 yytype_int16 *yyssp, int yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000902{
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700903 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200904 YYSIZE_T yysize = yysize0;
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200905 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
906 /* Internationalized format string. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700907 const char *yyformat = YY_NULLPTR;
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200908 /* Arguments of yyformat. */
909 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
910 /* Number of reported tokens (one for the "unexpected", one per
911 "expected"). */
912 int yycount = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000913
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200914 /* There are many possibilities here to consider:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200915 - If this state is a consistent state with a default action, then
916 the only way this function was invoked is if the default action
917 is an error action. In that case, don't check for expected
918 tokens because there are none.
919 - The only way there can be no lookahead present (in yychar) is if
920 this state is a consistent state with a default action. Thus,
921 detecting the absence of a lookahead is sufficient to determine
922 that there is no unexpected or expected token to report. In that
923 case, just report a simple "syntax error".
924 - Don't assume there isn't a lookahead just because this state is a
925 consistent state with a default action. There might have been a
926 previous inconsistent state, consistent state with a non-default
927 action, or user semantic action that manipulated yychar.
928 - Of course, the expected token list depends on states to have
929 correct lookahead information, and it depends on the parser not
930 to perform extra reductions after fetching a lookahead from the
931 scanner and before detecting a syntax error. Thus, state merging
932 (from LALR or IELR) and default reductions corrupt the expected
933 token list. However, the list is correct for canonical LR with
934 one exception: it will still contain any token that will not be
935 accepted due to an error action in a later state.
936 */
937 if (yytoken != YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000938 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200939 int yyn = yypact[*yyssp];
940 yyarg[yycount++] = yytname[yytoken];
941 if (!yypact_value_is_default (yyn))
942 {
943 /* Start YYX at -YYN if negative to avoid negative indexes in
944 YYCHECK. In other words, skip the first -YYN actions for
945 this state because they are default actions. */
946 int yyxbegin = yyn < 0 ? -yyn : 0;
947 /* Stay within bounds of both yycheck and yytname. */
948 int yychecklim = YYLAST - yyn + 1;
949 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
950 int yyx;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000951
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200952 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
953 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
954 && !yytable_value_is_error (yytable[yyx + yyn]))
955 {
956 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
957 {
958 yycount = 1;
959 yysize = yysize0;
960 break;
961 }
962 yyarg[yycount++] = yytname[yyx];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700963 {
964 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
965 if (! (yysize <= yysize1
966 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
967 return 2;
968 yysize = yysize1;
969 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200970 }
971 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000972 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200973
974 switch (yycount)
975 {
976# define YYCASE_(N, S) \
977 case N: \
978 yyformat = S; \
979 break
980 YYCASE_(0, YY_("syntax error"));
981 YYCASE_(1, YY_("syntax error, unexpected %s"));
982 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
983 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
984 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
985 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
986# undef YYCASE_
987 }
988
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700989 {
990 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
991 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
992 return 2;
993 yysize = yysize1;
994 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200995
996 if (*yymsg_alloc < yysize)
997 {
998 *yymsg_alloc = 2 * yysize;
999 if (! (yysize <= *yymsg_alloc
1000 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1001 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1002 return 1;
1003 }
1004
1005 /* Avoid sprintf, as that infringes on the user's name space.
1006 Don't have undefined behavior even if the translation
1007 produced a string with the wrong number of "%s"s. */
1008 {
1009 char *yyp = *yymsg;
1010 int yyi = 0;
1011 while ((*yyp = *yyformat) != '\0')
1012 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1013 {
1014 yyp += yytnamerr (yyp, yyarg[yyi++]);
1015 yyformat += 2;
1016 }
1017 else
1018 {
1019 yyp++;
1020 yyformat++;
1021 }
1022 }
1023 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001024}
1025#endif /* YYERROR_VERBOSE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001026
1027/*-----------------------------------------------.
1028| Release the memory associated to this symbol. |
1029`-----------------------------------------------*/
1030
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001031static void
1032yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001033{
1034 YYUSE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001035 if (!yymsg)
1036 yymsg = "Deleting";
1037 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1038
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001039 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1040 YYUSE (yytype);
1041 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001042}
1043
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001044
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001045
1046
1047/* The lookahead symbol. */
1048int yychar;
1049
1050/* The semantic value of the lookahead symbol. */
1051YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001052/* Number of syntax errors so far. */
1053int yynerrs;
1054
1055
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001056/*----------.
1057| yyparse. |
1058`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001059
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001060int
1061yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001062{
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001063 int yystate;
1064 /* Number of tokens to shift before error messages enabled. */
1065 int yyerrstatus;
1066
1067 /* The stacks and their tools:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001068 'yyss': related to states.
1069 'yyvs': related to semantic values.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001070
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001071 Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001072 to reallocate them elsewhere. */
1073
1074 /* The state stack. */
1075 yytype_int16 yyssa[YYINITDEPTH];
1076 yytype_int16 *yyss;
1077 yytype_int16 *yyssp;
1078
1079 /* The semantic value stack. */
1080 YYSTYPE yyvsa[YYINITDEPTH];
1081 YYSTYPE *yyvs;
1082 YYSTYPE *yyvsp;
1083
1084 YYSIZE_T yystacksize;
1085
1086 int yyn;
1087 int yyresult;
1088 /* Lookahead token as an internal (translated) token number. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001089 int yytoken = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001090 /* The variables used to return semantic value and location from the
1091 action routines. */
1092 YYSTYPE yyval;
1093
1094#if YYERROR_VERBOSE
1095 /* Buffer for error messages, and its allocated size. */
1096 char yymsgbuf[128];
1097 char *yymsg = yymsgbuf;
1098 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1099#endif
1100
1101#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1102
1103 /* The number of symbols on the RHS of the reduced rule.
1104 Keep to zero when no symbol should be popped. */
1105 int yylen = 0;
1106
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001107 yyssp = yyss = yyssa;
1108 yyvsp = yyvs = yyvsa;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001109 yystacksize = YYINITDEPTH;
1110
1111 YYDPRINTF ((stderr, "Starting parse\n"));
1112
1113 yystate = 0;
1114 yyerrstatus = 0;
1115 yynerrs = 0;
1116 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001117 goto yysetstate;
1118
1119/*------------------------------------------------------------.
1120| yynewstate -- Push a new state, which is found in yystate. |
1121`------------------------------------------------------------*/
1122 yynewstate:
1123 /* In all cases, when you get here, the value and location stacks
1124 have just been pushed. So pushing a state here evens the stacks. */
1125 yyssp++;
1126
1127 yysetstate:
1128 *yyssp = yystate;
1129
1130 if (yyss + yystacksize - 1 <= yyssp)
1131 {
1132 /* Get the current used size of the three stacks, in elements. */
1133 YYSIZE_T yysize = yyssp - yyss + 1;
1134
1135#ifdef yyoverflow
1136 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001137 /* Give user a chance to reallocate the stack. Use copies of
1138 these so that the &'s don't force the real ones into
1139 memory. */
1140 YYSTYPE *yyvs1 = yyvs;
1141 yytype_int16 *yyss1 = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001142
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001143 /* Each stack pointer address is followed by the size of the
1144 data in use in that stack, in bytes. This used to be a
1145 conditional around just the two extra args, but that might
1146 be undefined if yyoverflow is a macro. */
1147 yyoverflow (YY_("memory exhausted"),
1148 &yyss1, yysize * sizeof (*yyssp),
1149 &yyvs1, yysize * sizeof (*yyvsp),
1150 &yystacksize);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001151
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001152 yyss = yyss1;
1153 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001154 }
1155#else /* no yyoverflow */
1156# ifndef YYSTACK_RELOCATE
1157 goto yyexhaustedlab;
1158# else
1159 /* Extend the stack our own way. */
1160 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001161 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001162 yystacksize *= 2;
1163 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001164 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001165
1166 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001167 yytype_int16 *yyss1 = yyss;
1168 union yyalloc *yyptr =
1169 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1170 if (! yyptr)
1171 goto yyexhaustedlab;
1172 YYSTACK_RELOCATE (yyss_alloc, yyss);
1173 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001174# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001175 if (yyss1 != yyssa)
1176 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001177 }
1178# endif
1179#endif /* no yyoverflow */
1180
1181 yyssp = yyss + yysize - 1;
1182 yyvsp = yyvs + yysize - 1;
1183
1184 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001185 (unsigned long int) yystacksize));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001186
1187 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001188 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001189 }
1190
1191 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1192
1193 if (yystate == YYFINAL)
1194 YYACCEPT;
1195
1196 goto yybackup;
1197
1198/*-----------.
1199| yybackup. |
1200`-----------*/
1201yybackup:
1202
1203 /* Do appropriate processing given the current state. Read a
1204 lookahead token if we need one and don't already have one. */
1205
1206 /* First try to decide what to do without reference to lookahead token. */
1207 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001208 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001209 goto yydefault;
1210
1211 /* Not known => get a lookahead token if don't already have one. */
1212
1213 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1214 if (yychar == YYEMPTY)
1215 {
1216 YYDPRINTF ((stderr, "Reading a token: "));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001217 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001218 }
1219
1220 if (yychar <= YYEOF)
1221 {
1222 yychar = yytoken = YYEOF;
1223 YYDPRINTF ((stderr, "Now at end of input.\n"));
1224 }
1225 else
1226 {
1227 yytoken = YYTRANSLATE (yychar);
1228 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1229 }
1230
1231 /* If the proper action on seeing token YYTOKEN is to reduce or to
1232 detect an error, take that action. */
1233 yyn += yytoken;
1234 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1235 goto yydefault;
1236 yyn = yytable[yyn];
1237 if (yyn <= 0)
1238 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001239 if (yytable_value_is_error (yyn))
1240 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001241 yyn = -yyn;
1242 goto yyreduce;
1243 }
1244
1245 /* Count tokens shifted since error; after three, turn off error
1246 status. */
1247 if (yyerrstatus)
1248 yyerrstatus--;
1249
1250 /* Shift the lookahead token. */
1251 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1252
1253 /* Discard the shifted token. */
1254 yychar = YYEMPTY;
1255
1256 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001257 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001258 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001259 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001260
1261 goto yynewstate;
1262
1263
1264/*-----------------------------------------------------------.
1265| yydefault -- do the default action for the current state. |
1266`-----------------------------------------------------------*/
1267yydefault:
1268 yyn = yydefact[yystate];
1269 if (yyn == 0)
1270 goto yyerrlab;
1271 goto yyreduce;
1272
1273
1274/*-----------------------------.
1275| yyreduce -- Do a reduction. |
1276`-----------------------------*/
1277yyreduce:
1278 /* yyn is the number of a rule to reduce with. */
1279 yylen = yyr2[yyn];
1280
1281 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001282 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001283
1284 Otherwise, the following line sets YYVAL to garbage.
1285 This behavior is undocumented and Bison
1286 users should not rely upon it. Assigning to YYVAL
1287 unconditionally makes the parser a bit smaller, and it avoids a
1288 GCC warning that YYVAL may be used uninitialized. */
1289 yyval = yyvsp[1-yylen];
1290
1291
1292 YY_REDUCE_PRINT (yyn);
1293 switch (yyn)
1294 {
1295 case 2:
1296
Furquan Shaikh93198262018-06-03 04:22:17 -07001297 { cur_parent = root_parent; }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001298
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001299 break;
1300
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001301 case 15:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001302
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001303 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001304 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1305 chip_enqueue_tail(cur_chip_instance);
1306 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001307}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001308
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001309 break;
1310
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001311 case 16:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001312
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001313 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001314 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001315}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001316
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001317 break;
1318
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001319 case 17:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001320
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001321 {
Furquan Shaikh93198262018-06-03 04:22:17 -07001322 (yyval.dev) = new_device(cur_parent, cur_chip_instance, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number));
1323 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001324}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001325
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001326 break;
1327
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001328 case 18:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001329
1330 {
Furquan Shaikh93198262018-06-03 04:22:17 -07001331 cur_parent = (yyvsp[-2].dev)->parent;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001332}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001333
Patrick Georgi68befd52010-05-05 12:05:25 +00001334 break;
1335
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001336 case 21:
Patrick Georgi68befd52010-05-05 12:05:25 +00001337
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001338 { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
1339
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001340 break;
1341
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001342 case 22:
Sven Schnelle270a9082011-03-01 19:58:15 +00001343
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001344 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001345
Sven Schnelle270a9082011-03-01 19:58:15 +00001346 break;
1347
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001348 case 23:
Sven Schnelle270a9082011-03-01 19:58:15 +00001349
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001350 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
1351
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001352 break;
1353
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001354 case 24:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001355
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001356 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
1357
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001358 break;
1359
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001360 case 25:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001361
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001362 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1363
Sven Schnelle270a9082011-03-01 19:58:15 +00001364 break;
1365
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001366 case 26:
1367
1368 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1369
1370 break;
1371
1372 case 27:
1373
1374 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1375
1376 break;
1377
1378 case 28:
1379
1380 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1381
1382 break;
1383
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001384
1385
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001386 default: break;
1387 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001388 /* User semantic actions sometimes alter yychar, and that requires
1389 that yytoken be updated with the new translation. We take the
1390 approach of translating immediately before every use of yytoken.
1391 One alternative is translating here after every semantic action,
1392 but that translation would be missed if the semantic action invokes
1393 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1394 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1395 incorrect destructor might then be invoked immediately. In the
1396 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1397 to an incorrect destructor call or verbose syntax error message
1398 before the lookahead is translated. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001399 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1400
1401 YYPOPSTACK (yylen);
1402 yylen = 0;
1403 YY_STACK_PRINT (yyss, yyssp);
1404
1405 *++yyvsp = yyval;
1406
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001407 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001408 that goes to, based on the state we popped back to and the rule
1409 number reduced by. */
1410
1411 yyn = yyr1[yyn];
1412
1413 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1414 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1415 yystate = yytable[yystate];
1416 else
1417 yystate = yydefgoto[yyn - YYNTOKENS];
1418
1419 goto yynewstate;
1420
1421
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001422/*--------------------------------------.
1423| yyerrlab -- here on detecting error. |
1424`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001425yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001426 /* Make sure we have latest lookahead translation. See comments at
1427 user semantic actions for why this is necessary. */
1428 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1429
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001430 /* If not already recovering from an error, report this error. */
1431 if (!yyerrstatus)
1432 {
1433 ++yynerrs;
1434#if ! YYERROR_VERBOSE
1435 yyerror (YY_("syntax error"));
1436#else
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001437# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1438 yyssp, yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001439 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001440 char const *yymsgp = YY_("syntax error");
1441 int yysyntax_error_status;
1442 yysyntax_error_status = YYSYNTAX_ERROR;
1443 if (yysyntax_error_status == 0)
1444 yymsgp = yymsg;
1445 else if (yysyntax_error_status == 1)
1446 {
1447 if (yymsg != yymsgbuf)
1448 YYSTACK_FREE (yymsg);
1449 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1450 if (!yymsg)
1451 {
1452 yymsg = yymsgbuf;
1453 yymsg_alloc = sizeof yymsgbuf;
1454 yysyntax_error_status = 2;
1455 }
1456 else
1457 {
1458 yysyntax_error_status = YYSYNTAX_ERROR;
1459 yymsgp = yymsg;
1460 }
1461 }
1462 yyerror (yymsgp);
1463 if (yysyntax_error_status == 2)
1464 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001465 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001466# undef YYSYNTAX_ERROR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001467#endif
1468 }
1469
1470
1471
1472 if (yyerrstatus == 3)
1473 {
1474 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001475 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001476
1477 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001478 {
1479 /* Return failure if at end of input. */
1480 if (yychar == YYEOF)
1481 YYABORT;
1482 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001483 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001484 {
1485 yydestruct ("Error: discarding",
1486 yytoken, &yylval);
1487 yychar = YYEMPTY;
1488 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001489 }
1490
1491 /* Else will try to reuse lookahead token after shifting the error
1492 token. */
1493 goto yyerrlab1;
1494
1495
1496/*---------------------------------------------------.
1497| yyerrorlab -- error raised explicitly by YYERROR. |
1498`---------------------------------------------------*/
1499yyerrorlab:
1500
1501 /* Pacify compilers like GCC when the user code never invokes
1502 YYERROR and the label yyerrorlab therefore never appears in user
1503 code. */
1504 if (/*CONSTCOND*/ 0)
1505 goto yyerrorlab;
1506
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001507 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001508 this YYERROR. */
1509 YYPOPSTACK (yylen);
1510 yylen = 0;
1511 YY_STACK_PRINT (yyss, yyssp);
1512 yystate = *yyssp;
1513 goto yyerrlab1;
1514
1515
1516/*-------------------------------------------------------------.
1517| yyerrlab1 -- common code for both syntax error and YYERROR. |
1518`-------------------------------------------------------------*/
1519yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001520 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001521
1522 for (;;)
1523 {
1524 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001525 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001526 {
1527 yyn += YYTERROR;
1528 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1529 {
1530 yyn = yytable[yyn];
1531 if (0 < yyn)
1532 break;
1533 }
1534 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001535
1536 /* Pop the current state because it cannot handle the error token. */
1537 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001538 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001539
1540
1541 yydestruct ("Error: popping",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001542 yystos[yystate], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001543 YYPOPSTACK (1);
1544 yystate = *yyssp;
1545 YY_STACK_PRINT (yyss, yyssp);
1546 }
1547
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001548 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001549 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001550 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001551
1552
1553 /* Shift the error token. */
1554 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1555
1556 yystate = yyn;
1557 goto yynewstate;
1558
1559
1560/*-------------------------------------.
1561| yyacceptlab -- YYACCEPT comes here. |
1562`-------------------------------------*/
1563yyacceptlab:
1564 yyresult = 0;
1565 goto yyreturn;
1566
1567/*-----------------------------------.
1568| yyabortlab -- YYABORT comes here. |
1569`-----------------------------------*/
1570yyabortlab:
1571 yyresult = 1;
1572 goto yyreturn;
1573
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001574#if !defined yyoverflow || YYERROR_VERBOSE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001575/*-------------------------------------------------.
1576| yyexhaustedlab -- memory exhaustion comes here. |
1577`-------------------------------------------------*/
1578yyexhaustedlab:
1579 yyerror (YY_("memory exhausted"));
1580 yyresult = 2;
1581 /* Fall through. */
1582#endif
1583
1584yyreturn:
1585 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001586 {
1587 /* Make sure we have latest lookahead translation. See comments at
1588 user semantic actions for why this is necessary. */
1589 yytoken = YYTRANSLATE (yychar);
1590 yydestruct ("Cleanup: discarding lookahead",
1591 yytoken, &yylval);
1592 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001593 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001594 this YYABORT or YYACCEPT. */
1595 YYPOPSTACK (yylen);
1596 YY_STACK_PRINT (yyss, yyssp);
1597 while (yyssp != yyss)
1598 {
1599 yydestruct ("Cleanup: popping",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001600 yystos[*yyssp], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001601 YYPOPSTACK (1);
1602 }
1603#ifndef yyoverflow
1604 if (yyss != yyssa)
1605 YYSTACK_FREE (yyss);
1606#endif
1607#if YYERROR_VERBOSE
1608 if (yymsg != yymsgbuf)
1609 YYSTACK_FREE (yymsg);
1610#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001611 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001612}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001613
1614