blob: f0233a500cc9cc36c9bb5ff7e10d79961b01e34d [file] [log] [blame]
Nico Huberd9b2f792020-04-28 16:28:03 +02001/* A Bison parser, made by GNU Bison 3.5.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
Nico Huberd9b2f792020-04-28 16:28:03 +02005 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6 Inc.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07007
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00008 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070012
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000013 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070017
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000018 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070030
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000031 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
Nico Huberd9b2f792020-04-28 16:28:03 +020044/* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
46
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000047/* Identify Bison output. */
48#define YYBISON 1
49
50/* Bison version. */
Nico Huberd9b2f792020-04-28 16:28:03 +020051#define YYBISON_VERSION "3.5.4"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000052
53/* Skeleton name. */
54#define YYSKELETON_NAME "yacc.c"
55
56/* Pure parsers. */
57#define YYPURE 0
58
59/* Push parsers. */
60#define YYPUSH 0
61
62/* Pull parsers. */
63#define YYPULL 1
64
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000065
66
67
Nico Huberd9b2f792020-04-28 16:28:03 +020068/* First part of user prologue. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000069
Patrick Georgiea063cb2020-05-08 19:28:13 +020070/* sconfig, coreboot device tree compiler */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000071/*
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000072 * This program is free software; you can redistribute it and/or modify
73 * it under the terms of the GNU General Public License as published by
74 * the Free Software Foundation; version 2 of the License.
75 *
76 * This program is distributed in the hope that it will be useful,
77 * but WITHOUT ANY WARRANTY; without even the implied warranty of
78 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
79 * GNU General Public License for more details.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000080 */
81
Patrick Georgi114e7b22010-05-05 11:19:50 +000082#include "sconfig.h"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000083
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070084int yylex();
85void yyerror(const char *s);
86
Furquan Shaikh93198262018-06-03 04:22:17 -070087static struct bus *cur_parent;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -070088static struct chip_instance *cur_chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000089
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000090
91
Nico Huberd9b2f792020-04-28 16:28:03 +020092# ifndef YY_CAST
93# ifdef __cplusplus
94# define YY_CAST(Type, Val) static_cast<Type> (Val)
95# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070096# else
Nico Huberd9b2f792020-04-28 16:28:03 +020097# define YY_CAST(Type, Val) ((Type) (Val))
98# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
99# endif
100# endif
101# ifndef YY_NULLPTR
102# if defined __cplusplus
103# if 201103L <= __cplusplus
104# define YY_NULLPTR nullptr
105# else
106# define YY_NULLPTR 0
107# endif
108# else
109# define YY_NULLPTR ((void*)0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700110# endif
111# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000112
113/* Enabling verbose error messages. */
114#ifdef YYERROR_VERBOSE
115# undef YYERROR_VERBOSE
116# define YYERROR_VERBOSE 1
117#else
118# define YYERROR_VERBOSE 0
119#endif
120
Nico Huberd9b2f792020-04-28 16:28:03 +0200121/* Use api.header.include to #include this header
122 instead of duplicating it here. */
123#ifndef YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
124# define YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700125/* Debug traces. */
126#ifndef YYDEBUG
127# define YYDEBUG 0
128#endif
129#if YYDEBUG
130extern int yydebug;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000131#endif
132
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700133/* Token type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000134#ifndef YYTOKENTYPE
135# define YYTOKENTYPE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700136 enum yytokentype
137 {
138 CHIP = 258,
139 DEVICE = 259,
140 REGISTER = 260,
141 BOOL = 261,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000142 STATUS = 262,
143 MANDATORY = 263,
144 BUS = 264,
145 RESOURCE = 265,
146 END = 266,
147 EQUALS = 267,
148 HEX = 268,
149 STRING = 269,
150 PCI = 270,
151 PNP = 271,
152 I2C = 272,
153 APIC = 273,
154 CPU_CLUSTER = 274,
155 CPU = 275,
156 DOMAIN = 276,
157 IRQ = 277,
158 DRQ = 278,
159 SLOT_DESC = 279,
160 IO = 280,
161 NUMBER = 281,
162 SUBSYSTEMID = 282,
163 INHERIT = 283,
164 IOAPIC_IRQ = 284,
165 IOAPIC = 285,
166 PCIINT = 286,
167 GENERIC = 287,
168 SPI = 288,
169 USB = 289,
170 MMIO = 290
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700171 };
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000172#endif
173
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700174/* Value type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000175#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700176union YYSTYPE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000177{
178
Furquan Shaikh93198262018-06-03 04:22:17 -0700179 struct device *dev;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -0700180 struct chip_instance *chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000181 char *string;
182 int number;
183
184
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700185};
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700186typedef union YYSTYPE YYSTYPE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000187# define YYSTYPE_IS_TRIVIAL 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000188# define YYSTYPE_IS_DECLARED 1
189#endif
190
191
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700192extern YYSTYPE yylval;
193
194int yyparse (void);
195
Nico Huberd9b2f792020-04-28 16:28:03 +0200196#endif /* !YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000197
198
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000199
200#ifdef short
201# undef short
202#endif
203
Nico Huberd9b2f792020-04-28 16:28:03 +0200204/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
205 <limits.h> and (if available) <stdint.h> are included
206 so that the code can choose integer types of a good width. */
207
208#ifndef __PTRDIFF_MAX__
209# include <limits.h> /* INFRINGES ON USER NAME SPACE */
210# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
211# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
212# define YY_STDINT_H
213# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000214#endif
215
Nico Huberd9b2f792020-04-28 16:28:03 +0200216/* Narrow types that promote to a signed type and that can represent a
217 signed or unsigned integer of at least N bits. In tables they can
218 save space and decrease cache pressure. Promoting to a signed type
219 helps avoid bugs in integer arithmetic. */
220
221#ifdef __INT_LEAST8_MAX__
222typedef __INT_LEAST8_TYPE__ yytype_int8;
223#elif defined YY_STDINT_H
224typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000225#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700226typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000227#endif
228
Nico Huberd9b2f792020-04-28 16:28:03 +0200229#ifdef __INT_LEAST16_MAX__
230typedef __INT_LEAST16_TYPE__ yytype_int16;
231#elif defined YY_STDINT_H
232typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000233#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200234typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000235#endif
236
Nico Huberd9b2f792020-04-28 16:28:03 +0200237#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
238typedef __UINT_LEAST8_TYPE__ yytype_uint8;
239#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
240 && UINT_LEAST8_MAX <= INT_MAX)
241typedef uint_least8_t yytype_uint8;
242#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
243typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000244#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200245typedef short yytype_uint8;
246#endif
247
248#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
249typedef __UINT_LEAST16_TYPE__ yytype_uint16;
250#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
251 && UINT_LEAST16_MAX <= INT_MAX)
252typedef uint_least16_t yytype_uint16;
253#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
254typedef unsigned short yytype_uint16;
255#else
256typedef int yytype_uint16;
257#endif
258
259#ifndef YYPTRDIFF_T
260# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
261# define YYPTRDIFF_T __PTRDIFF_TYPE__
262# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
263# elif defined PTRDIFF_MAX
264# ifndef ptrdiff_t
265# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
266# endif
267# define YYPTRDIFF_T ptrdiff_t
268# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
269# else
270# define YYPTRDIFF_T long
271# define YYPTRDIFF_MAXIMUM LONG_MAX
272# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000273#endif
274
275#ifndef YYSIZE_T
276# ifdef __SIZE_TYPE__
277# define YYSIZE_T __SIZE_TYPE__
278# elif defined size_t
279# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200280# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000281# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
282# define YYSIZE_T size_t
283# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200284# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000285# endif
286#endif
287
Nico Huberd9b2f792020-04-28 16:28:03 +0200288#define YYSIZE_MAXIMUM \
289 YY_CAST (YYPTRDIFF_T, \
290 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
291 ? YYPTRDIFF_MAXIMUM \
292 : YY_CAST (YYSIZE_T, -1)))
293
294#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
295
296/* Stored state numbers (used for stacks). */
297typedef yytype_int8 yy_state_t;
298
299/* State numbers in computations. */
300typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000301
302#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200303# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000304# if ENABLE_NLS
305# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700306# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000307# endif
308# endif
309# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700310# define YY_(Msgid) Msgid
311# endif
312#endif
313
Nico Huberd9b2f792020-04-28 16:28:03 +0200314#ifndef YY_ATTRIBUTE_PURE
315# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
316# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700317# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200318# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700319# endif
320#endif
321
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700322#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200323# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
324# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700325# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200326# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000327# endif
328#endif
329
330/* Suppress unused-variable warnings by "using" E. */
331#if ! defined lint || defined __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700332# define YYUSE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000333#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700334# define YYUSE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000335#endif
336
Nico Huberd9b2f792020-04-28 16:28:03 +0200337#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700338/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200339# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
340 _Pragma ("GCC diagnostic push") \
341 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700342 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Nico Huberd9b2f792020-04-28 16:28:03 +0200343# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700344 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000345#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700346# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000347#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700348#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
349# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
350# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000351#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700352#ifndef YY_INITIAL_VALUE
353# define YY_INITIAL_VALUE(Value) /* Nothing. */
354#endif
355
Nico Huberd9b2f792020-04-28 16:28:03 +0200356#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
357# define YY_IGNORE_USELESS_CAST_BEGIN \
358 _Pragma ("GCC diagnostic push") \
359 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
360# define YY_IGNORE_USELESS_CAST_END \
361 _Pragma ("GCC diagnostic pop")
362#endif
363#ifndef YY_IGNORE_USELESS_CAST_BEGIN
364# define YY_IGNORE_USELESS_CAST_BEGIN
365# define YY_IGNORE_USELESS_CAST_END
366#endif
367
368
369#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000370
371#if ! defined yyoverflow || YYERROR_VERBOSE
372
373/* The parser invokes alloca or malloc; define the necessary symbols. */
374
375# ifdef YYSTACK_USE_ALLOCA
376# if YYSTACK_USE_ALLOCA
377# ifdef __GNUC__
378# define YYSTACK_ALLOC __builtin_alloca
379# elif defined __BUILTIN_VA_ARG_INCR
380# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
381# elif defined _AIX
382# define YYSTACK_ALLOC __alloca
383# elif defined _MSC_VER
384# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
385# define alloca _alloca
386# else
387# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700388# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000389# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700390 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200391# ifndef EXIT_SUCCESS
392# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000393# endif
394# endif
395# endif
396# endif
397# endif
398
399# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700400 /* Pacify GCC's 'empty if-body' warning. */
401# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000402# ifndef YYSTACK_ALLOC_MAXIMUM
403 /* The OS might guarantee only one guard page at the bottom of the stack,
404 and a page size can be as small as 4096 bytes. So we cannot safely
405 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
406 to allow for a few compiler-allocated temporary stack slots. */
407# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
408# endif
409# else
410# define YYSTACK_ALLOC YYMALLOC
411# define YYSTACK_FREE YYFREE
412# ifndef YYSTACK_ALLOC_MAXIMUM
413# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
414# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200415# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000416 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700417 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000418# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200419# ifndef EXIT_SUCCESS
420# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000421# endif
422# endif
423# ifndef YYMALLOC
424# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700425# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000426void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
427# endif
428# endif
429# ifndef YYFREE
430# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700431# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000432void free (void *); /* INFRINGES ON USER NAME SPACE */
433# endif
434# endif
435# endif
436#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
437
438
439#if (! defined yyoverflow \
440 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700441 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000442
443/* A type that is properly aligned for any stack member. */
444union yyalloc
445{
Nico Huberd9b2f792020-04-28 16:28:03 +0200446 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000447 YYSTYPE yyvs_alloc;
448};
449
450/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200451# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000452
453/* The size of an array large to enough to hold all stacks, each with
454 N elements. */
455# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200456 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000457 + YYSTACK_GAP_MAXIMUM)
458
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200459# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000460
461/* Relocate STACK from its old location to the new one. The
462 local variables YYSIZE and YYSTACKSIZE give the old and new number of
463 elements in the stack, and YYPTR gives the new location of the
464 stack. Advance YYPTR to a properly aligned location for the next
465 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700466# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
467 do \
468 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200469 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700470 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
471 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200472 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
473 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700474 } \
475 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000476
477#endif
478
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200479#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700480/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200481 not overlap. */
482# ifndef YYCOPY
483# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700484# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200485 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200486# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700487# define YYCOPY(Dst, Src, Count) \
488 do \
489 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200490 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700491 for (yyi = 0; yyi < (Count); yyi++) \
492 (Dst)[yyi] = (Src)[yyi]; \
493 } \
494 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200495# endif
496# endif
497#endif /* !YYCOPY_NEEDED */
498
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000499/* YYFINAL -- State number of the termination state. */
Patrick Georgi68befd52010-05-05 12:05:25 +0000500#define YYFINAL 3
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000501/* YYLAST -- Last index in YYTABLE. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200502#define YYLAST 45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000503
504/* YYNTOKENS -- Number of terminals. */
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000505#define YYNTOKENS 36
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000506/* YYNNTS -- Number of nonterminals. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200507#define YYNNTS 15
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000508/* YYNRULES -- Number of rules. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200509#define YYNRULES 29
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700510/* YYNSTATES -- Number of states. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200511#define YYNSTATES 50
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000512
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000513#define YYUNDEFTOK 2
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000514#define YYMAXUTOK 290
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000515
Nico Huberd9b2f792020-04-28 16:28:03 +0200516
517/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
518 as returned by yylex, with out-of-bounds checking. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700519#define YYTRANSLATE(YYX) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200520 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000521
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700522/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200523 as returned by yylex. */
524static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000525{
526 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
552 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200553 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000554 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
555 35
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000556};
557
558#if YYDEBUG
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700559 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200560static const yytype_int8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000561{
Furquan Shaikh79e84122018-05-30 15:09:09 -0700562 0, 36, 36, 36, 38, 38, 38, 38, 40, 40,
Nico Huberd9b2f792020-04-28 16:28:03 +0200563 40, 40, 40, 40, 40, 40, 42, 42, 51, 51,
564 59, 59, 61, 64, 67, 70, 73, 76, 79, 82
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000565};
566#endif
567
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700568#if YYDEBUG || YYERROR_VERBOSE || 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000569/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
570 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
571static const char *const yytname[] =
572{
573 "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000574 "STATUS", "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX",
575 "STRING", "PCI", "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN",
576 "IRQ", "DRQ", "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
577 "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
578 "$accept", "devtree", "$@1", "chipchildren", "devicechildren", "chip",
579 "@2", "device", "@3", "status", "resource", "registers", "subsystemid",
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200580 "ioapic_irq", "smbios_slot_desc", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000581};
582#endif
583
584# ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700585/* YYTOKNUM[NUM] -- (External) token number corresponding to the
586 (internal) symbol number NUM (which must be that of a token). */
Nico Huberd9b2f792020-04-28 16:28:03 +0200587static const yytype_int16 yytoknum[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000588{
589 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
590 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800591 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000592 285, 286, 287, 288, 289, 290
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000593};
594# endif
595
Nico Huberd9b2f792020-04-28 16:28:03 +0200596#define YYPACT_NINF (-10)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700597
Nico Huberd9b2f792020-04-28 16:28:03 +0200598#define yypact_value_is_default(Yyn) \
599 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700600
Nico Huberd9b2f792020-04-28 16:28:03 +0200601#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700602
Nico Huberd9b2f792020-04-28 16:28:03 +0200603#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700604 0
605
606 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
607 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000608static const yytype_int8 yypact[] =
609{
Nico Huberd9b2f792020-04-28 16:28:03 +0200610 -10, 11, 10, -10, 0, -10, -10, -10, 1, 6,
611 2, -10, -10, -10, -10, -9, 8, 3, 4, -10,
612 -10, -10, -10, -10, -3, -4, -10, 9, -1, 5,
613 -10, -10, -10, -10, -10, -10, -10, 15, 14, 7,
614 -2, 12, 16, 13, 17, -10, 18, -10, -10, -10
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000615};
616
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700617 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
618 Performed when YYTABLE does not specify something else to do. Zero
619 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200620static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700621{
Nico Huberd9b2f792020-04-28 16:28:03 +0200622 2, 0, 0, 1, 0, 3, 16, 7, 0, 0,
623 0, 17, 5, 4, 6, 0, 0, 0, 0, 20,
624 21, 18, 23, 15, 0, 0, 19, 0, 0, 0,
625 9, 8, 10, 14, 11, 12, 13, 0, 0, 0,
626 0, 0, 29, 24, 0, 22, 28, 25, 26, 27
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700627};
628
629 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000630static const yytype_int8 yypgoto[] =
631{
Nico Huberd9b2f792020-04-28 16:28:03 +0200632 -10, -10, -10, -10, -10, -5, -10, 20, -10, -10,
633 -10, 21, -10, -10, -10
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000634};
635
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700636 /* YYDEFGOTO[NTERM-NUM]. */
637static const yytype_int8 yydefgoto[] =
638{
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800639 -1, 1, 2, 8, 24, 5, 7, 13, 23, 21,
Nico Huberd9b2f792020-04-28 16:28:03 +0200640 32, 14, 34, 35, 36
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700641};
642
643 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
644 positive, shift that token. If negative, reduce the rule whose
645 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200646static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000647{
Nico Huberd9b2f792020-04-28 16:28:03 +0200648 4, 9, 10, 12, 4, 9, 10, 25, 26, 19,
649 20, 3, 11, 4, 6, 15, 16, 17, 22, 30,
650 18, 27, 37, 38, 28, 39, 29, 41, 42, 44,
651 46, 40, 49, 43, 0, 0, 0, 0, 45, 0,
652 0, 47, 0, 48, 31, 33
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000653};
654
Patrick Georgi8f625f62010-05-05 13:13:47 +0000655static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000656{
Nico Huberd9b2f792020-04-28 16:28:03 +0200657 3, 4, 5, 8, 3, 4, 5, 10, 11, 6,
658 7, 0, 11, 3, 14, 9, 14, 26, 14, 24,
659 12, 24, 26, 14, 27, 26, 29, 12, 14, 31,
660 14, 26, 14, 26, -1, -1, -1, -1, 26, -1,
661 -1, 28, -1, 26, 24, 24
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000662};
663
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700664 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
665 symbol of state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200666static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000667{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000668 0, 37, 38, 0, 3, 41, 14, 42, 39, 4,
669 5, 11, 41, 43, 47, 9, 14, 26, 12, 6,
670 7, 45, 14, 44, 40, 10, 11, 24, 27, 29,
Nico Huberd9b2f792020-04-28 16:28:03 +0200671 41, 43, 46, 47, 48, 49, 50, 26, 14, 26,
672 26, 12, 14, 26, 31, 26, 14, 28, 26, 14
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000673};
674
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700675 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200676static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700677{
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000678 0, 36, 38, 37, 39, 39, 39, 39, 40, 40,
Nico Huberd9b2f792020-04-28 16:28:03 +0200679 40, 40, 40, 40, 40, 40, 42, 41, 44, 43,
680 45, 45, 46, 47, 48, 48, 49, 50, 50, 50
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700681};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000682
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700683 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200684static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700685{
686 0, 2, 0, 2, 2, 2, 2, 0, 2, 2,
Nico Huberd9b2f792020-04-28 16:28:03 +0200687 2, 2, 2, 2, 2, 0, 0, 5, 0, 7,
688 1, 1, 4, 4, 3, 4, 4, 5, 4, 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700689};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000690
691
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700692#define yyerrok (yyerrstatus = 0)
693#define yyclearin (yychar = YYEMPTY)
694#define YYEMPTY (-2)
695#define YYEOF 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000696
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700697#define YYACCEPT goto yyacceptlab
698#define YYABORT goto yyabortlab
699#define YYERROR goto yyerrorlab
700
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000701
702#define YYRECOVERING() (!!yyerrstatus)
703
Nico Huberd9b2f792020-04-28 16:28:03 +0200704#define YYBACKUP(Token, Value) \
705 do \
706 if (yychar == YYEMPTY) \
707 { \
708 yychar = (Token); \
709 yylval = (Value); \
710 YYPOPSTACK (yylen); \
711 yystate = *yyssp; \
712 goto yybackup; \
713 } \
714 else \
715 { \
716 yyerror (YY_("syntax error: cannot back up")); \
717 YYERROR; \
718 } \
719 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700720
721/* Error token number */
722#define YYTERROR 1
723#define YYERRCODE 256
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000724
725
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000726
727/* Enable debugging if requested. */
728#if YYDEBUG
729
730# ifndef YYFPRINTF
731# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
732# define YYFPRINTF fprintf
733# endif
734
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700735# define YYDPRINTF(Args) \
736do { \
737 if (yydebug) \
738 YYFPRINTF Args; \
739} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000740
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700741/* This macro is provided for backward compatibility. */
742#ifndef YY_LOCATION_PRINT
743# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
744#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000745
746
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700747# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
748do { \
749 if (yydebug) \
750 { \
751 YYFPRINTF (stderr, "%s ", Title); \
752 yy_symbol_print (stderr, \
753 Type, Value); \
754 YYFPRINTF (stderr, "\n"); \
755 } \
756} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000757
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700758
Nico Huberd9b2f792020-04-28 16:28:03 +0200759/*-----------------------------------.
760| Print this symbol's value on YYO. |
761`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700762
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000763static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200764yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000765{
Nico Huberd9b2f792020-04-28 16:28:03 +0200766 FILE *yyoutput = yyo;
767 YYUSE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000768 if (!yyvaluep)
769 return;
770# ifdef YYPRINT
771 if (yytype < YYNTOKENS)
Nico Huberd9b2f792020-04-28 16:28:03 +0200772 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000773# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200774 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700775 YYUSE (yytype);
Nico Huberd9b2f792020-04-28 16:28:03 +0200776 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000777}
778
779
Nico Huberd9b2f792020-04-28 16:28:03 +0200780/*---------------------------.
781| Print this symbol on YYO. |
782`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000783
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000784static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200785yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000786{
Nico Huberd9b2f792020-04-28 16:28:03 +0200787 YYFPRINTF (yyo, "%s %s (",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700788 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000789
Nico Huberd9b2f792020-04-28 16:28:03 +0200790 yy_symbol_value_print (yyo, yytype, yyvaluep);
791 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000792}
793
794/*------------------------------------------------------------------.
795| yy_stack_print -- Print the state stack from its BOTTOM up to its |
796| TOP (included). |
797`------------------------------------------------------------------*/
798
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000799static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200800yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000801{
802 YYFPRINTF (stderr, "Stack now");
803 for (; yybottom <= yytop; yybottom++)
804 {
805 int yybot = *yybottom;
806 YYFPRINTF (stderr, " %d", yybot);
807 }
808 YYFPRINTF (stderr, "\n");
809}
810
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700811# define YY_STACK_PRINT(Bottom, Top) \
812do { \
813 if (yydebug) \
814 yy_stack_print ((Bottom), (Top)); \
815} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000816
817
818/*------------------------------------------------.
819| Report that the YYRULE is going to be reduced. |
820`------------------------------------------------*/
821
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000822static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200823yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000824{
Nico Huberd9b2f792020-04-28 16:28:03 +0200825 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000826 int yynrhs = yyr2[yyrule];
827 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200828 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700829 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000830 /* The symbols being reduced. */
831 for (yyi = 0; yyi < yynrhs; yyi++)
832 {
833 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700834 yy_symbol_print (stderr,
Nico Huberd9b2f792020-04-28 16:28:03 +0200835 yystos[+yyssp[yyi + 1 - yynrhs]],
836 &yyvsp[(yyi + 1) - (yynrhs)]
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700837 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000838 YYFPRINTF (stderr, "\n");
839 }
840}
841
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700842# define YY_REDUCE_PRINT(Rule) \
843do { \
844 if (yydebug) \
845 yy_reduce_print (yyssp, yyvsp, Rule); \
846} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000847
848/* Nonzero means print parse trace. It is left uninitialized so that
849 multiple parsers can coexist. */
850int yydebug;
851#else /* !YYDEBUG */
852# define YYDPRINTF(Args)
853# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
854# define YY_STACK_PRINT(Bottom, Top)
855# define YY_REDUCE_PRINT(Rule)
856#endif /* !YYDEBUG */
857
858
859/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700860#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000861# define YYINITDEPTH 200
862#endif
863
864/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
865 if the built-in stack extension method is used).
866
867 Do not make this value too large; the results are undefined if
868 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
869 evaluated with infinite-precision integer arithmetic. */
870
871#ifndef YYMAXDEPTH
872# define YYMAXDEPTH 10000
873#endif
874
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000875
876#if YYERROR_VERBOSE
877
878# ifndef yystrlen
879# if defined __GLIBC__ && defined _STRING_H
Nico Huberd9b2f792020-04-28 16:28:03 +0200880# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000881# else
882/* Return the length of YYSTR. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200883static YYPTRDIFF_T
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000884yystrlen (const char *yystr)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000885{
Nico Huberd9b2f792020-04-28 16:28:03 +0200886 YYPTRDIFF_T yylen;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000887 for (yylen = 0; yystr[yylen]; yylen++)
888 continue;
889 return yylen;
890}
891# endif
892# endif
893
894# ifndef yystpcpy
895# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
896# define yystpcpy stpcpy
897# else
898/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
899 YYDEST. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000900static char *
901yystpcpy (char *yydest, const char *yysrc)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000902{
903 char *yyd = yydest;
904 const char *yys = yysrc;
905
906 while ((*yyd++ = *yys++) != '\0')
907 continue;
908
909 return yyd - 1;
910}
911# endif
912# endif
913
914# ifndef yytnamerr
915/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
916 quotes and backslashes, so that it's suitable for yyerror. The
917 heuristic is that double-quoting is unnecessary unless the string
918 contains an apostrophe, a comma, or backslash (other than
919 backslash-backslash). YYSTR is taken from yytname. If YYRES is
920 null, do not copy; instead, return the length of what the result
921 would have been. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200922static YYPTRDIFF_T
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000923yytnamerr (char *yyres, const char *yystr)
924{
925 if (*yystr == '"')
926 {
Nico Huberd9b2f792020-04-28 16:28:03 +0200927 YYPTRDIFF_T yyn = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000928 char const *yyp = yystr;
929
930 for (;;)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700931 switch (*++yyp)
932 {
933 case '\'':
934 case ',':
935 goto do_not_strip_quotes;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000936
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700937 case '\\':
938 if (*++yyp != '\\')
939 goto do_not_strip_quotes;
Nico Huberd9b2f792020-04-28 16:28:03 +0200940 else
941 goto append;
942
943 append:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700944 default:
945 if (yyres)
946 yyres[yyn] = *yyp;
947 yyn++;
948 break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000949
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700950 case '"':
951 if (yyres)
952 yyres[yyn] = '\0';
953 return yyn;
954 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000955 do_not_strip_quotes: ;
956 }
957
Nico Huberd9b2f792020-04-28 16:28:03 +0200958 if (yyres)
959 return yystpcpy (yyres, yystr) - yyres;
960 else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000961 return yystrlen (yystr);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000962}
963# endif
964
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200965/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
966 about the unexpected token YYTOKEN for the state stack whose top is
967 YYSSP.
968
969 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
970 not large enough to hold the message. In that case, also set
971 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
972 required number of bytes is too large to store. */
973static int
Nico Huberd9b2f792020-04-28 16:28:03 +0200974yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
975 yy_state_t *yyssp, int yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000976{
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200977 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
978 /* Internationalized format string. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700979 const char *yyformat = YY_NULLPTR;
Nico Huberd9b2f792020-04-28 16:28:03 +0200980 /* Arguments of yyformat: reported tokens (one for the "unexpected",
981 one per "expected"). */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200982 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
Nico Huberd9b2f792020-04-28 16:28:03 +0200983 /* Actual size of YYARG. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200984 int yycount = 0;
Nico Huberd9b2f792020-04-28 16:28:03 +0200985 /* Cumulated lengths of YYARG. */
986 YYPTRDIFF_T yysize = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000987
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200988 /* There are many possibilities here to consider:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200989 - If this state is a consistent state with a default action, then
990 the only way this function was invoked is if the default action
991 is an error action. In that case, don't check for expected
992 tokens because there are none.
993 - The only way there can be no lookahead present (in yychar) is if
994 this state is a consistent state with a default action. Thus,
995 detecting the absence of a lookahead is sufficient to determine
996 that there is no unexpected or expected token to report. In that
997 case, just report a simple "syntax error".
998 - Don't assume there isn't a lookahead just because this state is a
999 consistent state with a default action. There might have been a
1000 previous inconsistent state, consistent state with a non-default
1001 action, or user semantic action that manipulated yychar.
1002 - Of course, the expected token list depends on states to have
1003 correct lookahead information, and it depends on the parser not
1004 to perform extra reductions after fetching a lookahead from the
1005 scanner and before detecting a syntax error. Thus, state merging
1006 (from LALR or IELR) and default reductions corrupt the expected
1007 token list. However, the list is correct for canonical LR with
1008 one exception: it will still contain any token that will not be
1009 accepted due to an error action in a later state.
1010 */
1011 if (yytoken != YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001012 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001013 int yyn = yypact[+*yyssp];
1014 YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1015 yysize = yysize0;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001016 yyarg[yycount++] = yytname[yytoken];
1017 if (!yypact_value_is_default (yyn))
1018 {
1019 /* Start YYX at -YYN if negative to avoid negative indexes in
1020 YYCHECK. In other words, skip the first -YYN actions for
1021 this state because they are default actions. */
1022 int yyxbegin = yyn < 0 ? -yyn : 0;
1023 /* Stay within bounds of both yycheck and yytname. */
1024 int yychecklim = YYLAST - yyn + 1;
1025 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1026 int yyx;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001027
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001028 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1029 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1030 && !yytable_value_is_error (yytable[yyx + yyn]))
1031 {
1032 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1033 {
1034 yycount = 1;
1035 yysize = yysize0;
1036 break;
1037 }
1038 yyarg[yycount++] = yytname[yyx];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001039 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001040 YYPTRDIFF_T yysize1
1041 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1042 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1043 yysize = yysize1;
1044 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001045 return 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001046 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001047 }
1048 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001049 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001050
1051 switch (yycount)
1052 {
1053# define YYCASE_(N, S) \
1054 case N: \
1055 yyformat = S; \
1056 break
Nico Huberd9b2f792020-04-28 16:28:03 +02001057 default: /* Avoid compiler warnings. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001058 YYCASE_(0, YY_("syntax error"));
1059 YYCASE_(1, YY_("syntax error, unexpected %s"));
1060 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1061 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1062 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1063 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1064# undef YYCASE_
1065 }
1066
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001067 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001068 /* Don't count the "%s"s in the final size, but reserve room for
1069 the terminator. */
1070 YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1071 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1072 yysize = yysize1;
1073 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001074 return 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001075 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001076
1077 if (*yymsg_alloc < yysize)
1078 {
1079 *yymsg_alloc = 2 * yysize;
1080 if (! (yysize <= *yymsg_alloc
1081 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1082 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1083 return 1;
1084 }
1085
1086 /* Avoid sprintf, as that infringes on the user's name space.
1087 Don't have undefined behavior even if the translation
1088 produced a string with the wrong number of "%s"s. */
1089 {
1090 char *yyp = *yymsg;
1091 int yyi = 0;
1092 while ((*yyp = *yyformat) != '\0')
1093 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1094 {
1095 yyp += yytnamerr (yyp, yyarg[yyi++]);
1096 yyformat += 2;
1097 }
1098 else
1099 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001100 ++yyp;
1101 ++yyformat;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001102 }
1103 }
1104 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001105}
1106#endif /* YYERROR_VERBOSE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001107
1108/*-----------------------------------------------.
1109| Release the memory associated to this symbol. |
1110`-----------------------------------------------*/
1111
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001112static void
1113yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001114{
1115 YYUSE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001116 if (!yymsg)
1117 yymsg = "Deleting";
1118 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1119
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001120 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1121 YYUSE (yytype);
1122 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001123}
1124
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001125
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001126
1127
1128/* The lookahead symbol. */
1129int yychar;
1130
1131/* The semantic value of the lookahead symbol. */
1132YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001133/* Number of syntax errors so far. */
1134int yynerrs;
1135
1136
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001137/*----------.
1138| yyparse. |
1139`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001140
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001141int
1142yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001143{
Nico Huberd9b2f792020-04-28 16:28:03 +02001144 yy_state_fast_t yystate;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001145 /* Number of tokens to shift before error messages enabled. */
1146 int yyerrstatus;
1147
1148 /* The stacks and their tools:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001149 'yyss': related to states.
1150 'yyvs': related to semantic values.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001151
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001152 Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001153 to reallocate them elsewhere. */
1154
1155 /* The state stack. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001156 yy_state_t yyssa[YYINITDEPTH];
1157 yy_state_t *yyss;
1158 yy_state_t *yyssp;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001159
1160 /* The semantic value stack. */
1161 YYSTYPE yyvsa[YYINITDEPTH];
1162 YYSTYPE *yyvs;
1163 YYSTYPE *yyvsp;
1164
Nico Huberd9b2f792020-04-28 16:28:03 +02001165 YYPTRDIFF_T yystacksize;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001166
1167 int yyn;
1168 int yyresult;
1169 /* Lookahead token as an internal (translated) token number. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001170 int yytoken = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001171 /* The variables used to return semantic value and location from the
1172 action routines. */
1173 YYSTYPE yyval;
1174
1175#if YYERROR_VERBOSE
1176 /* Buffer for error messages, and its allocated size. */
1177 char yymsgbuf[128];
1178 char *yymsg = yymsgbuf;
Nico Huberd9b2f792020-04-28 16:28:03 +02001179 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001180#endif
1181
1182#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1183
1184 /* The number of symbols on the RHS of the reduced rule.
1185 Keep to zero when no symbol should be popped. */
1186 int yylen = 0;
1187
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001188 yyssp = yyss = yyssa;
1189 yyvsp = yyvs = yyvsa;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001190 yystacksize = YYINITDEPTH;
1191
1192 YYDPRINTF ((stderr, "Starting parse\n"));
1193
1194 yystate = 0;
1195 yyerrstatus = 0;
1196 yynerrs = 0;
1197 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001198 goto yysetstate;
1199
Nico Huberd9b2f792020-04-28 16:28:03 +02001200
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001201/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001202| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001203`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001204yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001205 /* In all cases, when you get here, the value and location stacks
1206 have just been pushed. So pushing a state here evens the stacks. */
1207 yyssp++;
1208
Nico Huberd9b2f792020-04-28 16:28:03 +02001209
1210/*--------------------------------------------------------------------.
1211| yysetstate -- set current state (the top of the stack) to yystate. |
1212`--------------------------------------------------------------------*/
1213yysetstate:
1214 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1215 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1216 YY_IGNORE_USELESS_CAST_BEGIN
1217 *yyssp = YY_CAST (yy_state_t, yystate);
1218 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001219
1220 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001221#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1222 goto yyexhaustedlab;
1223#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001224 {
1225 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001226 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001227
Nico Huberd9b2f792020-04-28 16:28:03 +02001228# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001229 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001230 /* Give user a chance to reallocate the stack. Use copies of
1231 these so that the &'s don't force the real ones into
1232 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001233 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001234 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001235
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001236 /* Each stack pointer address is followed by the size of the
1237 data in use in that stack, in bytes. This used to be a
1238 conditional around just the two extra args, but that might
1239 be undefined if yyoverflow is a macro. */
1240 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001241 &yyss1, yysize * YYSIZEOF (*yyssp),
1242 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001243 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001244 yyss = yyss1;
1245 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001246 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001247# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001248 /* Extend the stack our own way. */
1249 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001250 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001251 yystacksize *= 2;
1252 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001253 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001254
1255 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001256 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001257 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001258 YY_CAST (union yyalloc *,
1259 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001260 if (! yyptr)
1261 goto yyexhaustedlab;
1262 YYSTACK_RELOCATE (yyss_alloc, yyss);
1263 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Nico Huberd9b2f792020-04-28 16:28:03 +02001264# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001265 if (yyss1 != yyssa)
1266 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001267 }
1268# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001269
1270 yyssp = yyss + yysize - 1;
1271 yyvsp = yyvs + yysize - 1;
1272
Nico Huberd9b2f792020-04-28 16:28:03 +02001273 YY_IGNORE_USELESS_CAST_BEGIN
1274 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1275 YY_CAST (long, yystacksize)));
1276 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001277
1278 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001279 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001280 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001281#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001282
1283 if (yystate == YYFINAL)
1284 YYACCEPT;
1285
1286 goto yybackup;
1287
Nico Huberd9b2f792020-04-28 16:28:03 +02001288
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001289/*-----------.
1290| yybackup. |
1291`-----------*/
1292yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001293 /* Do appropriate processing given the current state. Read a
1294 lookahead token if we need one and don't already have one. */
1295
1296 /* First try to decide what to do without reference to lookahead token. */
1297 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001298 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001299 goto yydefault;
1300
1301 /* Not known => get a lookahead token if don't already have one. */
1302
1303 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1304 if (yychar == YYEMPTY)
1305 {
1306 YYDPRINTF ((stderr, "Reading a token: "));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001307 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001308 }
1309
1310 if (yychar <= YYEOF)
1311 {
1312 yychar = yytoken = YYEOF;
1313 YYDPRINTF ((stderr, "Now at end of input.\n"));
1314 }
1315 else
1316 {
1317 yytoken = YYTRANSLATE (yychar);
1318 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1319 }
1320
1321 /* If the proper action on seeing token YYTOKEN is to reduce or to
1322 detect an error, take that action. */
1323 yyn += yytoken;
1324 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1325 goto yydefault;
1326 yyn = yytable[yyn];
1327 if (yyn <= 0)
1328 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001329 if (yytable_value_is_error (yyn))
1330 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001331 yyn = -yyn;
1332 goto yyreduce;
1333 }
1334
1335 /* Count tokens shifted since error; after three, turn off error
1336 status. */
1337 if (yyerrstatus)
1338 yyerrstatus--;
1339
1340 /* Shift the lookahead token. */
1341 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001342 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001343 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001344 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001345 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001346
Nico Huberd9b2f792020-04-28 16:28:03 +02001347 /* Discard the shifted token. */
1348 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001349 goto yynewstate;
1350
1351
1352/*-----------------------------------------------------------.
1353| yydefault -- do the default action for the current state. |
1354`-----------------------------------------------------------*/
1355yydefault:
1356 yyn = yydefact[yystate];
1357 if (yyn == 0)
1358 goto yyerrlab;
1359 goto yyreduce;
1360
1361
1362/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001363| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001364`-----------------------------*/
1365yyreduce:
1366 /* yyn is the number of a rule to reduce with. */
1367 yylen = yyr2[yyn];
1368
1369 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001370 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001371
1372 Otherwise, the following line sets YYVAL to garbage.
1373 This behavior is undocumented and Bison
1374 users should not rely upon it. Assigning to YYVAL
1375 unconditionally makes the parser a bit smaller, and it avoids a
1376 GCC warning that YYVAL may be used uninitialized. */
1377 yyval = yyvsp[1-yylen];
1378
1379
1380 YY_REDUCE_PRINT (yyn);
1381 switch (yyn)
1382 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001383 case 2:
1384 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001385 break;
1386
Nico Huberd9b2f792020-04-28 16:28:03 +02001387 case 16:
1388 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001389 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1390 chip_enqueue_tail(cur_chip_instance);
1391 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001392}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001393 break;
1394
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001395 case 17:
Nico Huberd9b2f792020-04-28 16:28:03 +02001396 {
1397 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001398}
1399 break;
1400
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001401 case 18:
Nico Huberd9b2f792020-04-28 16:28:03 +02001402 {
1403 (yyval.dev) = new_device(cur_parent, cur_chip_instance, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number));
1404 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001405}
Patrick Georgi68befd52010-05-05 12:05:25 +00001406 break;
1407
Nico Huberd9b2f792020-04-28 16:28:03 +02001408 case 19:
1409 {
1410 cur_parent = (yyvsp[-2].dev)->parent;
1411}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001412 break;
1413
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001414 case 22:
Nico Huberd9b2f792020-04-28 16:28:03 +02001415 { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
Sven Schnelle270a9082011-03-01 19:58:15 +00001416 break;
1417
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001418 case 23:
Nico Huberd9b2f792020-04-28 16:28:03 +02001419 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001420 break;
1421
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001422 case 24:
Nico Huberd9b2f792020-04-28 16:28:03 +02001423 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001424 break;
1425
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001426 case 25:
Nico Huberd9b2f792020-04-28 16:28:03 +02001427 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
Sven Schnelle270a9082011-03-01 19:58:15 +00001428 break;
1429
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001430 case 26:
Nico Huberd9b2f792020-04-28 16:28:03 +02001431 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001432 break;
1433
1434 case 27:
Nico Huberd9b2f792020-04-28 16:28:03 +02001435 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001436 break;
1437
1438 case 28:
Nico Huberd9b2f792020-04-28 16:28:03 +02001439 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1440 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001441
Nico Huberd9b2f792020-04-28 16:28:03 +02001442 case 29:
1443 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001444 break;
1445
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001446
1447
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001448 default: break;
1449 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001450 /* User semantic actions sometimes alter yychar, and that requires
1451 that yytoken be updated with the new translation. We take the
1452 approach of translating immediately before every use of yytoken.
1453 One alternative is translating here after every semantic action,
1454 but that translation would be missed if the semantic action invokes
1455 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1456 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1457 incorrect destructor might then be invoked immediately. In the
1458 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1459 to an incorrect destructor call or verbose syntax error message
1460 before the lookahead is translated. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001461 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1462
1463 YYPOPSTACK (yylen);
1464 yylen = 0;
1465 YY_STACK_PRINT (yyss, yyssp);
1466
1467 *++yyvsp = yyval;
1468
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001469 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001470 that goes to, based on the state we popped back to and the rule
1471 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001472 {
1473 const int yylhs = yyr1[yyn] - YYNTOKENS;
1474 const int yyi = yypgoto[yylhs] + *yyssp;
1475 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1476 ? yytable[yyi]
1477 : yydefgoto[yylhs]);
1478 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001479
1480 goto yynewstate;
1481
1482
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001483/*--------------------------------------.
1484| yyerrlab -- here on detecting error. |
1485`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001486yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001487 /* Make sure we have latest lookahead translation. See comments at
1488 user semantic actions for why this is necessary. */
1489 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1490
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001491 /* If not already recovering from an error, report this error. */
1492 if (!yyerrstatus)
1493 {
1494 ++yynerrs;
1495#if ! YYERROR_VERBOSE
1496 yyerror (YY_("syntax error"));
1497#else
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001498# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1499 yyssp, yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001500 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001501 char const *yymsgp = YY_("syntax error");
1502 int yysyntax_error_status;
1503 yysyntax_error_status = YYSYNTAX_ERROR;
1504 if (yysyntax_error_status == 0)
1505 yymsgp = yymsg;
1506 else if (yysyntax_error_status == 1)
1507 {
1508 if (yymsg != yymsgbuf)
1509 YYSTACK_FREE (yymsg);
Nico Huberd9b2f792020-04-28 16:28:03 +02001510 yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001511 if (!yymsg)
1512 {
1513 yymsg = yymsgbuf;
1514 yymsg_alloc = sizeof yymsgbuf;
1515 yysyntax_error_status = 2;
1516 }
1517 else
1518 {
1519 yysyntax_error_status = YYSYNTAX_ERROR;
1520 yymsgp = yymsg;
1521 }
1522 }
1523 yyerror (yymsgp);
1524 if (yysyntax_error_status == 2)
1525 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001526 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001527# undef YYSYNTAX_ERROR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001528#endif
1529 }
1530
1531
1532
1533 if (yyerrstatus == 3)
1534 {
1535 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001536 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001537
1538 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001539 {
1540 /* Return failure if at end of input. */
1541 if (yychar == YYEOF)
1542 YYABORT;
1543 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001544 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001545 {
1546 yydestruct ("Error: discarding",
1547 yytoken, &yylval);
1548 yychar = YYEMPTY;
1549 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001550 }
1551
1552 /* Else will try to reuse lookahead token after shifting the error
1553 token. */
1554 goto yyerrlab1;
1555
1556
1557/*---------------------------------------------------.
1558| yyerrorlab -- error raised explicitly by YYERROR. |
1559`---------------------------------------------------*/
1560yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001561 /* Pacify compilers when the user code never invokes YYERROR and the
1562 label yyerrorlab therefore never appears in user code. */
1563 if (0)
1564 YYERROR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001565
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001566 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001567 this YYERROR. */
1568 YYPOPSTACK (yylen);
1569 yylen = 0;
1570 YY_STACK_PRINT (yyss, yyssp);
1571 yystate = *yyssp;
1572 goto yyerrlab1;
1573
1574
1575/*-------------------------------------------------------------.
1576| yyerrlab1 -- common code for both syntax error and YYERROR. |
1577`-------------------------------------------------------------*/
1578yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001579 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001580
1581 for (;;)
1582 {
1583 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001584 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001585 {
1586 yyn += YYTERROR;
1587 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1588 {
1589 yyn = yytable[yyn];
1590 if (0 < yyn)
1591 break;
1592 }
1593 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001594
1595 /* Pop the current state because it cannot handle the error token. */
1596 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001597 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001598
1599
1600 yydestruct ("Error: popping",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001601 yystos[yystate], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001602 YYPOPSTACK (1);
1603 yystate = *yyssp;
1604 YY_STACK_PRINT (yyss, yyssp);
1605 }
1606
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001607 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001608 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001609 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001610
1611
1612 /* Shift the error token. */
1613 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1614
1615 yystate = yyn;
1616 goto yynewstate;
1617
1618
1619/*-------------------------------------.
1620| yyacceptlab -- YYACCEPT comes here. |
1621`-------------------------------------*/
1622yyacceptlab:
1623 yyresult = 0;
1624 goto yyreturn;
1625
Nico Huberd9b2f792020-04-28 16:28:03 +02001626
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001627/*-----------------------------------.
1628| yyabortlab -- YYABORT comes here. |
1629`-----------------------------------*/
1630yyabortlab:
1631 yyresult = 1;
1632 goto yyreturn;
1633
Nico Huberd9b2f792020-04-28 16:28:03 +02001634
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001635#if !defined yyoverflow || YYERROR_VERBOSE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001636/*-------------------------------------------------.
1637| yyexhaustedlab -- memory exhaustion comes here. |
1638`-------------------------------------------------*/
1639yyexhaustedlab:
1640 yyerror (YY_("memory exhausted"));
1641 yyresult = 2;
1642 /* Fall through. */
1643#endif
1644
Nico Huberd9b2f792020-04-28 16:28:03 +02001645
1646/*-----------------------------------------------------.
1647| yyreturn -- parsing is finished, return the result. |
1648`-----------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001649yyreturn:
1650 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001651 {
1652 /* Make sure we have latest lookahead translation. See comments at
1653 user semantic actions for why this is necessary. */
1654 yytoken = YYTRANSLATE (yychar);
1655 yydestruct ("Cleanup: discarding lookahead",
1656 yytoken, &yylval);
1657 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001658 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001659 this YYABORT or YYACCEPT. */
1660 YYPOPSTACK (yylen);
1661 YY_STACK_PRINT (yyss, yyssp);
1662 while (yyssp != yyss)
1663 {
1664 yydestruct ("Cleanup: popping",
Nico Huberd9b2f792020-04-28 16:28:03 +02001665 yystos[+*yyssp], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001666 YYPOPSTACK (1);
1667 }
1668#ifndef yyoverflow
1669 if (yyss != yyssa)
1670 YYSTACK_FREE (yyss);
1671#endif
1672#if YYERROR_VERBOSE
1673 if (yymsg != yymsgbuf)
1674 YYSTACK_FREE (yymsg);
1675#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001676 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001677}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001678