blob: b07adcb25e430cfa22c607bf585127d16aa35373 [file] [log] [blame]
Nico Huber859ecdf2021-02-28 16:18:18 +01001/* A Bison parser, made by GNU Bison 3.7.6. */
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
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06005 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Nico Huberd9b2f792020-04-28 16:28:03 +02006 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
Nico Huber859ecdf2021-02-28 16:18:18 +010019 along with this program. If not, see <https://www.gnu.org/licenses/>. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000020
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
Duncan Lauriee335c2e2020-07-29 16:28:43 -070037/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000041/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060048/* Identify Bison output, and Bison version. */
Nico Huber859ecdf2021-02-28 16:18:18 +010049#define YYBISON 30706
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000050
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060051/* Bison version string. */
Nico Huber859ecdf2021-02-28 16:18:18 +010052#define YYBISON_VERSION "3.7.6"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000053
54/* Skeleton name. */
55#define YYSKELETON_NAME "yacc.c"
56
57/* Pure parsers. */
58#define YYPURE 0
59
60/* Push parsers. */
61#define YYPUSH 0
62
63/* Pull parsers. */
64#define YYPULL 1
65
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000066
67
68
Nico Huberd9b2f792020-04-28 16:28:03 +020069/* First part of user prologue. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000070
Patrick Georgiea063cb2020-05-08 19:28:13 +020071/* sconfig, coreboot device tree compiler */
Patrick Georgi7333a112020-05-08 20:48:04 +020072/* SPDX-License-Identifier: GPL-2.0-only */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000073
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +010074#include <stdint.h>
Patrick Georgi114e7b22010-05-05 11:19:50 +000075#include "sconfig.h"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000076
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070077int yylex();
78void yyerror(const char *s);
79
Furquan Shaikh93198262018-06-03 04:22:17 -070080static struct bus *cur_parent;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -070081static struct chip_instance *cur_chip_instance;
Duncan Laurie47b7b342020-05-15 15:39:08 -070082static struct fw_config_field *cur_field;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060083static struct fw_config_field_bits *cur_bits;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000084
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000085
86
Nico Huberd9b2f792020-04-28 16:28:03 +020087# ifndef YY_CAST
88# ifdef __cplusplus
89# define YY_CAST(Type, Val) static_cast<Type> (Val)
90# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070091# else
Nico Huberd9b2f792020-04-28 16:28:03 +020092# define YY_CAST(Type, Val) ((Type) (Val))
93# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
94# endif
95# endif
96# ifndef YY_NULLPTR
97# if defined __cplusplus
98# if 201103L <= __cplusplus
99# define YY_NULLPTR nullptr
100# else
101# define YY_NULLPTR 0
102# endif
103# else
104# define YY_NULLPTR ((void*)0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700105# endif
106# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000107
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100108#include "sconfig.tab.h_shipped"
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700109/* Symbol kind. */
110enum yysymbol_kind_t
111{
112 YYSYMBOL_YYEMPTY = -2,
113 YYSYMBOL_YYEOF = 0, /* "end of file" */
114 YYSYMBOL_YYerror = 1, /* error */
115 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
116 YYSYMBOL_CHIP = 3, /* CHIP */
117 YYSYMBOL_DEVICE = 4, /* DEVICE */
118 YYSYMBOL_REGISTER = 5, /* REGISTER */
119 YYSYMBOL_ALIAS = 6, /* ALIAS */
120 YYSYMBOL_REFERENCE = 7, /* REFERENCE */
121 YYSYMBOL_ASSOCIATION = 8, /* ASSOCIATION */
122 YYSYMBOL_BOOL = 9, /* BOOL */
123 YYSYMBOL_STATUS = 10, /* STATUS */
124 YYSYMBOL_MANDATORY = 11, /* MANDATORY */
125 YYSYMBOL_BUS = 12, /* BUS */
126 YYSYMBOL_RESOURCE = 13, /* RESOURCE */
127 YYSYMBOL_END = 14, /* END */
128 YYSYMBOL_EQUALS = 15, /* EQUALS */
129 YYSYMBOL_HEX = 16, /* HEX */
130 YYSYMBOL_STRING = 17, /* STRING */
131 YYSYMBOL_PCI = 18, /* PCI */
132 YYSYMBOL_PNP = 19, /* PNP */
133 YYSYMBOL_I2C = 20, /* I2C */
134 YYSYMBOL_APIC = 21, /* APIC */
135 YYSYMBOL_CPU_CLUSTER = 22, /* CPU_CLUSTER */
136 YYSYMBOL_CPU = 23, /* CPU */
137 YYSYMBOL_DOMAIN = 24, /* DOMAIN */
138 YYSYMBOL_IRQ = 25, /* IRQ */
139 YYSYMBOL_DRQ = 26, /* DRQ */
140 YYSYMBOL_SLOT_DESC = 27, /* SLOT_DESC */
141 YYSYMBOL_IO = 28, /* IO */
142 YYSYMBOL_NUMBER = 29, /* NUMBER */
143 YYSYMBOL_SUBSYSTEMID = 30, /* SUBSYSTEMID */
144 YYSYMBOL_INHERIT = 31, /* INHERIT */
145 YYSYMBOL_IOAPIC_IRQ = 32, /* IOAPIC_IRQ */
146 YYSYMBOL_IOAPIC = 33, /* IOAPIC */
147 YYSYMBOL_PCIINT = 34, /* PCIINT */
148 YYSYMBOL_GENERIC = 35, /* GENERIC */
149 YYSYMBOL_SPI = 36, /* SPI */
150 YYSYMBOL_USB = 37, /* USB */
151 YYSYMBOL_MMIO = 38, /* MMIO */
Martin Roth29955882021-07-10 16:37:39 -0600152 YYSYMBOL_GPIO = 39, /* GPIO */
153 YYSYMBOL_FW_CONFIG_TABLE = 40, /* FW_CONFIG_TABLE */
154 YYSYMBOL_FW_CONFIG_FIELD = 41, /* FW_CONFIG_FIELD */
155 YYSYMBOL_FW_CONFIG_OPTION = 42, /* FW_CONFIG_OPTION */
156 YYSYMBOL_FW_CONFIG_PROBE = 43, /* FW_CONFIG_PROBE */
157 YYSYMBOL_PIPE = 44, /* PIPE */
158 YYSYMBOL_YYACCEPT = 45, /* $accept */
159 YYSYMBOL_devtree = 46, /* devtree */
Nico Huber859ecdf2021-02-28 16:18:18 +0100160 YYSYMBOL_chipchild_nondev = 47, /* chipchild_nondev */
161 YYSYMBOL_chipchild = 48, /* chipchild */
162 YYSYMBOL_chipchildren = 49, /* chipchildren */
163 YYSYMBOL_chipchildren_dev = 50, /* chipchildren_dev */
164 YYSYMBOL_devicechildren = 51, /* devicechildren */
165 YYSYMBOL_chip = 52, /* chip */
166 YYSYMBOL_53_1 = 53, /* @1 */
167 YYSYMBOL_device = 54, /* device */
168 YYSYMBOL_55_2 = 55, /* @2 */
169 YYSYMBOL_56_3 = 56, /* @3 */
170 YYSYMBOL_alias = 57, /* alias */
171 YYSYMBOL_status = 58, /* status */
172 YYSYMBOL_resource = 59, /* resource */
173 YYSYMBOL_reference = 60, /* reference */
174 YYSYMBOL_registers = 61, /* registers */
175 YYSYMBOL_subsystemid = 62, /* subsystemid */
176 YYSYMBOL_ioapic_irq = 63, /* ioapic_irq */
177 YYSYMBOL_smbios_slot_desc = 64, /* smbios_slot_desc */
178 YYSYMBOL_fw_config_table = 65, /* fw_config_table */
179 YYSYMBOL_fw_config_table_children = 66, /* fw_config_table_children */
180 YYSYMBOL_fw_config_field_children = 67, /* fw_config_field_children */
181 YYSYMBOL_fw_config_field_bits = 68, /* fw_config_field_bits */
182 YYSYMBOL_fw_config_field_bits_repeating = 69, /* fw_config_field_bits_repeating */
183 YYSYMBOL_fw_config_field = 70, /* fw_config_field */
184 YYSYMBOL_71_4 = 71, /* $@4 */
185 YYSYMBOL_72_5 = 72, /* $@5 */
186 YYSYMBOL_73_6 = 73, /* $@6 */
187 YYSYMBOL_fw_config_option = 74, /* fw_config_option */
188 YYSYMBOL_fw_config_probe = 75 /* fw_config_probe */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700189};
190typedef enum yysymbol_kind_t yysymbol_kind_t;
191
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000192
193
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000194
195#ifdef short
196# undef short
197#endif
198
Nico Huberd9b2f792020-04-28 16:28:03 +0200199/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
200 <limits.h> and (if available) <stdint.h> are included
201 so that the code can choose integer types of a good width. */
202
203#ifndef __PTRDIFF_MAX__
204# include <limits.h> /* INFRINGES ON USER NAME SPACE */
205# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
206# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
207# define YY_STDINT_H
208# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000209#endif
210
Nico Huberd9b2f792020-04-28 16:28:03 +0200211/* Narrow types that promote to a signed type and that can represent a
212 signed or unsigned integer of at least N bits. In tables they can
213 save space and decrease cache pressure. Promoting to a signed type
214 helps avoid bugs in integer arithmetic. */
215
216#ifdef __INT_LEAST8_MAX__
217typedef __INT_LEAST8_TYPE__ yytype_int8;
218#elif defined YY_STDINT_H
219typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000220#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700221typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000222#endif
223
Nico Huberd9b2f792020-04-28 16:28:03 +0200224#ifdef __INT_LEAST16_MAX__
225typedef __INT_LEAST16_TYPE__ yytype_int16;
226#elif defined YY_STDINT_H
227typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000228#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200229typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000230#endif
231
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600232/* Work around bug in HP-UX 11.23, which defines these macros
233 incorrectly for preprocessor constants. This workaround can likely
234 be removed in 2023, as HPE has promised support for HP-UX 11.23
235 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
236 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
237#ifdef __hpux
238# undef UINT_LEAST8_MAX
239# undef UINT_LEAST16_MAX
240# define UINT_LEAST8_MAX 255
241# define UINT_LEAST16_MAX 65535
242#endif
243
Nico Huberd9b2f792020-04-28 16:28:03 +0200244#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
245typedef __UINT_LEAST8_TYPE__ yytype_uint8;
246#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
247 && UINT_LEAST8_MAX <= INT_MAX)
248typedef uint_least8_t yytype_uint8;
249#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
250typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000251#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200252typedef short yytype_uint8;
253#endif
254
255#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
256typedef __UINT_LEAST16_TYPE__ yytype_uint16;
257#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
258 && UINT_LEAST16_MAX <= INT_MAX)
259typedef uint_least16_t yytype_uint16;
260#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
261typedef unsigned short yytype_uint16;
262#else
263typedef int yytype_uint16;
264#endif
265
266#ifndef YYPTRDIFF_T
267# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
268# define YYPTRDIFF_T __PTRDIFF_TYPE__
269# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
270# elif defined PTRDIFF_MAX
271# ifndef ptrdiff_t
272# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
273# endif
274# define YYPTRDIFF_T ptrdiff_t
275# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
276# else
277# define YYPTRDIFF_T long
278# define YYPTRDIFF_MAXIMUM LONG_MAX
279# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000280#endif
281
282#ifndef YYSIZE_T
283# ifdef __SIZE_TYPE__
284# define YYSIZE_T __SIZE_TYPE__
285# elif defined size_t
286# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200287# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000288# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
289# define YYSIZE_T size_t
290# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200291# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000292# endif
293#endif
294
Nico Huberd9b2f792020-04-28 16:28:03 +0200295#define YYSIZE_MAXIMUM \
296 YY_CAST (YYPTRDIFF_T, \
297 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
298 ? YYPTRDIFF_MAXIMUM \
299 : YY_CAST (YYSIZE_T, -1)))
300
301#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
302
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700303
Nico Huberd9b2f792020-04-28 16:28:03 +0200304/* Stored state numbers (used for stacks). */
305typedef yytype_int8 yy_state_t;
306
307/* State numbers in computations. */
308typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000309
310#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200311# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000312# if ENABLE_NLS
313# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700314# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000315# endif
316# endif
317# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700318# define YY_(Msgid) Msgid
319# endif
320#endif
321
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700322
Nico Huberd9b2f792020-04-28 16:28:03 +0200323#ifndef YY_ATTRIBUTE_PURE
324# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
325# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700326# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200327# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700328# endif
329#endif
330
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700331#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200332# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
333# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700334# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200335# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000336# endif
337#endif
338
339/* Suppress unused-variable warnings by "using" E. */
340#if ! defined lint || defined __GNUC__
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600341# define YY_USE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000342#else
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600343# define YY_USE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000344#endif
345
Nico Huberd9b2f792020-04-28 16:28:03 +0200346#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700347/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200348# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
349 _Pragma ("GCC diagnostic push") \
350 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700351 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Nico Huberd9b2f792020-04-28 16:28:03 +0200352# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700353 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000354#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700355# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000356#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700357#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
358# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
359# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000360#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700361#ifndef YY_INITIAL_VALUE
362# define YY_INITIAL_VALUE(Value) /* Nothing. */
363#endif
364
Nico Huberd9b2f792020-04-28 16:28:03 +0200365#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
366# define YY_IGNORE_USELESS_CAST_BEGIN \
367 _Pragma ("GCC diagnostic push") \
368 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
369# define YY_IGNORE_USELESS_CAST_END \
370 _Pragma ("GCC diagnostic pop")
371#endif
372#ifndef YY_IGNORE_USELESS_CAST_BEGIN
373# define YY_IGNORE_USELESS_CAST_BEGIN
374# define YY_IGNORE_USELESS_CAST_END
375#endif
376
377
378#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000379
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700380#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000381
382/* The parser invokes alloca or malloc; define the necessary symbols. */
383
384# ifdef YYSTACK_USE_ALLOCA
385# if YYSTACK_USE_ALLOCA
386# ifdef __GNUC__
387# define YYSTACK_ALLOC __builtin_alloca
388# elif defined __BUILTIN_VA_ARG_INCR
389# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
390# elif defined _AIX
391# define YYSTACK_ALLOC __alloca
392# elif defined _MSC_VER
393# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
394# define alloca _alloca
395# else
396# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700397# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000398# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700399 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200400# ifndef EXIT_SUCCESS
401# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000402# endif
403# endif
404# endif
405# endif
406# endif
407
408# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700409 /* Pacify GCC's 'empty if-body' warning. */
410# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000411# ifndef YYSTACK_ALLOC_MAXIMUM
412 /* The OS might guarantee only one guard page at the bottom of the stack,
413 and a page size can be as small as 4096 bytes. So we cannot safely
414 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
415 to allow for a few compiler-allocated temporary stack slots. */
416# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
417# endif
418# else
419# define YYSTACK_ALLOC YYMALLOC
420# define YYSTACK_FREE YYFREE
421# ifndef YYSTACK_ALLOC_MAXIMUM
422# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
423# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200424# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000425 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700426 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000427# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200428# ifndef EXIT_SUCCESS
429# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000430# endif
431# endif
432# ifndef YYMALLOC
433# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700434# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000435void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
436# endif
437# endif
438# ifndef YYFREE
439# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700440# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000441void free (void *); /* INFRINGES ON USER NAME SPACE */
442# endif
443# endif
444# endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700445#endif /* !defined yyoverflow */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000446
447#if (! defined yyoverflow \
448 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700449 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000450
451/* A type that is properly aligned for any stack member. */
452union yyalloc
453{
Nico Huberd9b2f792020-04-28 16:28:03 +0200454 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000455 YYSTYPE yyvs_alloc;
456};
457
458/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200459# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000460
461/* The size of an array large to enough to hold all stacks, each with
462 N elements. */
463# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200464 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000465 + YYSTACK_GAP_MAXIMUM)
466
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200467# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000468
469/* Relocate STACK from its old location to the new one. The
470 local variables YYSIZE and YYSTACKSIZE give the old and new number of
471 elements in the stack, and YYPTR gives the new location of the
472 stack. Advance YYPTR to a properly aligned location for the next
473 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700474# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
475 do \
476 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200477 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700478 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
479 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200480 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
481 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700482 } \
483 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000484
485#endif
486
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200487#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700488/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200489 not overlap. */
490# ifndef YYCOPY
491# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700492# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200493 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200494# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700495# define YYCOPY(Dst, Src, Count) \
496 do \
497 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200498 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700499 for (yyi = 0; yyi < (Count); yyi++) \
500 (Dst)[yyi] = (Src)[yyi]; \
501 } \
502 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200503# endif
504# endif
505#endif /* !YYCOPY_NEEDED */
506
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000507/* YYFINAL -- State number of the termination state. */
Duncan Laurie47b7b342020-05-15 15:39:08 -0700508#define YYFINAL 2
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000509/* YYLAST -- Last index in YYTABLE. */
Nico Huber859ecdf2021-02-28 16:18:18 +0100510#define YYLAST 90
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000511
512/* YYNTOKENS -- Number of terminals. */
Martin Roth29955882021-07-10 16:37:39 -0600513#define YYNTOKENS 45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000514/* YYNNTS -- Number of nonterminals. */
Nico Huber859ecdf2021-02-28 16:18:18 +0100515#define YYNNTS 31
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000516/* YYNRULES -- Number of rules. */
Nico Huber859ecdf2021-02-28 16:18:18 +0100517#define YYNRULES 57
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700518/* YYNSTATES -- Number of states. */
Nico Huber859ecdf2021-02-28 16:18:18 +0100519#define YYNSTATES 101
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000520
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100521/* YYMAXUTOK -- Last valid token kind. */
Martin Roth29955882021-07-10 16:37:39 -0600522#define YYMAXUTOK 299
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000523
Nico Huberd9b2f792020-04-28 16:28:03 +0200524
525/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
526 as returned by yylex, with out-of-bounds checking. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700527#define YYTRANSLATE(YYX) \
528 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
529 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
530 : YYSYMBOL_YYUNDEF)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000531
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700532/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200533 as returned by yylex. */
534static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000535{
536 0, 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, 2, 2, 2, 2,
552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
562 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200563 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000564 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Martin Roth29955882021-07-10 16:37:39 -0600565 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000566};
567
568#if YYDEBUG
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700569 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600570static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000571{
Nico Huber859ecdf2021-02-28 16:18:18 +0100572 0, 26, 26, 26, 26, 29, 29, 29, 30, 30,
573 31, 31, 32, 32, 34, 34, 34, 34, 34, 34,
574 34, 34, 34, 36, 36, 45, 45, 53, 53, 61,
575 63, 67, 67, 69, 72, 75, 78, 81, 84, 87,
576 90, 93, 97, 100, 100, 103, 103, 106, 112, 112,
577 115, 114, 119, 119, 127, 127, 133, 137
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000578};
579#endif
580
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700581/** Accessing symbol of state STATE. */
582#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
583
584#if YYDEBUG || 0
585/* The user-facing name of the symbol whose (internal) number is
586 YYSYMBOL. No bounds checking. */
587static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
588
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000589/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
590 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
591static const char *const yytname[] =
592{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700593 "\"end of file\"", "error", "\"invalid token\"", "CHIP", "DEVICE",
594 "REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
595 "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
596 "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
597 "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ",
Martin Roth29955882021-07-10 16:37:39 -0600598 "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "GPIO",
599 "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
Nico Huber859ecdf2021-02-28 16:18:18 +0100600 "FW_CONFIG_PROBE", "PIPE", "$accept", "devtree", "chipchild_nondev",
601 "chipchild", "chipchildren", "chipchildren_dev", "devicechildren",
602 "chip", "@1", "device", "@2", "@3", "alias", "status", "resource",
603 "reference", "registers", "subsystemid", "ioapic_irq",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700604 "smbios_slot_desc", "fw_config_table", "fw_config_table_children",
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600605 "fw_config_field_children", "fw_config_field_bits",
606 "fw_config_field_bits_repeating", "fw_config_field", "$@4", "$@5", "$@6",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700607 "fw_config_option", "fw_config_probe", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000608};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700609
610static const char *
611yysymbol_name (yysymbol_kind_t yysymbol)
612{
613 return yytname[yysymbol];
614}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000615#endif
616
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700617#ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700618/* YYTOKNUM[NUM] -- (External) token number corresponding to the
619 (internal) symbol number NUM (which must be that of a token). */
Nico Huberd9b2f792020-04-28 16:28:03 +0200620static const yytype_int16 yytoknum[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000621{
622 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
623 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800624 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Duncan Laurie47b7b342020-05-15 15:39:08 -0700625 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
Martin Roth29955882021-07-10 16:37:39 -0600626 295, 296, 297, 298, 299
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000627};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700628#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000629
Nico Huber859ecdf2021-02-28 16:18:18 +0100630#define YYPACT_NINF (-61)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700631
Nico Huberd9b2f792020-04-28 16:28:03 +0200632#define yypact_value_is_default(Yyn) \
633 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700634
Nico Huberd9b2f792020-04-28 16:28:03 +0200635#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700636
Nico Huberd9b2f792020-04-28 16:28:03 +0200637#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700638 0
639
640 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
641 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000642static const yytype_int8 yypact[] =
643{
Nico Huber859ecdf2021-02-28 16:18:18 +0100644 -61, 12, -61, -7, -61, -61, -61, -61, -12, 46,
645 -61, 8, -61, 14, 11, 18, 46, 23, -61, -61,
646 -61, -61, 16, 24, 17, 25, 34, -61, -61, 46,
647 26, 10, -61, 13, 51, 41, 42, -61, -61, -61,
648 -61, -61, 31, -61, -3, -61, -61, -61, 44, 13,
649 -61, -61, 2, 26, 10, -61, -61, 45, -61, -61,
650 -61, -61, -61, -61, 6, 35, 0, -61, -61, -61,
651 37, -61, 50, 39, 40, 53, -61, -61, -61, -61,
652 -61, -61, -61, -61, 4, 48, 54, 43, 47, 56,
653 -61, 49, 57, 55, 58, -61, -61, 59, -61, -61,
654 -61
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000655};
656
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700657 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
658 Performed when YYTABLE does not specify something else to do. Zero
659 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200660static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700661{
Nico Huber859ecdf2021-02-28 16:18:18 +0100662 2, 0, 1, 0, 44, 3, 4, 23, 0, 0,
663 42, 0, 43, 0, 0, 0, 0, 0, 5, 11,
664 7, 6, 54, 0, 0, 0, 0, 13, 24, 12,
665 52, 49, 46, 0, 29, 0, 0, 9, 10, 8,
666 47, 46, 0, 50, 0, 31, 32, 27, 0, 0,
667 35, 34, 0, 0, 49, 46, 55, 0, 45, 22,
668 30, 25, 53, 48, 0, 0, 0, 22, 51, 56,
669 0, 28, 0, 0, 0, 0, 15, 14, 16, 20,
670 17, 18, 19, 21, 0, 0, 0, 0, 0, 0,
671 26, 0, 41, 36, 0, 57, 33, 40, 37, 38,
672 39
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700673};
674
675 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000676static const yytype_int8 yypgoto[] =
677{
Nico Huber859ecdf2021-02-28 16:18:18 +0100678 -61, -61, 60, -61, -61, 61, 15, -1, -61, -28,
679 -61, -61, -61, 30, -61, -61, -60, -61, -61, -61,
680 -61, -61, -22, 33, 36, -61, -61, -61, -61, -61,
681 -61
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000682};
683
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700684 /* YYDEFGOTO[NTERM-NUM]. */
685static const yytype_int8 yydefgoto[] =
686{
Nico Huber859ecdf2021-02-28 16:18:18 +0100687 0, 1, 16, 38, 29, 17, 66, 18, 9, 19,
688 67, 59, 49, 47, 78, 20, 21, 80, 81, 82,
689 6, 8, 44, 31, 43, 12, 55, 41, 32, 58,
690 83
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700691};
692
693 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
694 positive, shift that token. If negative, reduce the rule whose
695 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200696static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000697{
Nico Huber859ecdf2021-02-28 16:18:18 +0100698 5, 39, 10, 3, 13, 14, 79, 3, 13, 14,
699 7, 56, 2, 70, 71, 3, 62, 70, 90, 52,
700 68, 23, 45, 46, 79, 22, 24, 72, 25, 11,
701 73, 72, 74, 64, 73, 26, 74, 28, 77, 57,
702 35, 33, 36, 75, 57, 30, 34, 75, 57, 3,
703 13, 14, 4, 15, 42, 40, 77, 48, 50, 51,
704 53, 60, 65, 91, 69, 76, 85, 86, 87, 88,
705 89, 92, 93, 95, 97, 54, 100, 27, 96, 61,
706 0, 94, 84, 76, 0, 0, 98, 99, 0, 37,
707 63
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000708};
709
Patrick Georgi8f625f62010-05-05 13:13:47 +0000710static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000711{
Nico Huber859ecdf2021-02-28 16:18:18 +0100712 1, 29, 14, 3, 4, 5, 66, 3, 4, 5,
713 17, 14, 0, 13, 14, 3, 14, 13, 14, 41,
714 14, 7, 9, 10, 84, 17, 12, 27, 17, 41,
715 30, 27, 32, 55, 30, 17, 32, 14, 66, 42,
716 15, 17, 8, 43, 42, 29, 29, 43, 42, 3,
717 4, 5, 40, 7, 44, 29, 84, 6, 17, 17,
718 29, 17, 17, 15, 29, 66, 29, 17, 29, 29,
719 17, 17, 29, 17, 17, 42, 17, 16, 29, 49,
720 -1, 34, 67, 84, -1, -1, 31, 29, -1, 29,
721 54
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000722};
723
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700724 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
725 symbol of state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200726static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000727{
Nico Huber859ecdf2021-02-28 16:18:18 +0100728 0, 46, 0, 3, 40, 52, 65, 17, 66, 53,
729 14, 41, 70, 4, 5, 7, 47, 50, 52, 54,
730 60, 61, 17, 7, 12, 17, 17, 50, 14, 49,
731 29, 68, 73, 17, 29, 15, 8, 47, 48, 54,
732 29, 72, 44, 69, 67, 9, 10, 58, 6, 57,
733 17, 17, 67, 29, 68, 71, 14, 42, 74, 56,
734 17, 58, 14, 69, 67, 17, 51, 55, 14, 29,
735 13, 14, 27, 30, 32, 43, 52, 54, 59, 61,
736 62, 63, 64, 75, 51, 29, 17, 29, 29, 17,
737 14, 15, 17, 29, 34, 17, 29, 17, 31, 29,
738 17
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000739};
740
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700741 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200742static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700743{
Nico Huber859ecdf2021-02-28 16:18:18 +0100744 0, 45, 46, 46, 46, 47, 47, 47, 48, 48,
745 49, 49, 50, 50, 51, 51, 51, 51, 51, 51,
746 51, 51, 51, 53, 52, 55, 54, 56, 54, 57,
747 57, 58, 58, 59, 60, 61, 62, 62, 63, 64,
748 64, 64, 65, 66, 66, 67, 67, 68, 69, 69,
749 71, 70, 72, 70, 73, 70, 74, 75
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700750};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000751
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700752 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200753static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700754{
Nico Huber859ecdf2021-02-28 16:18:18 +0100755 0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
756 2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
757 2, 2, 0, 0, 5, 0, 8, 0, 7, 0,
758 2, 1, 1, 4, 4, 4, 3, 4, 4, 5,
759 4, 3, 3, 2, 0, 2, 0, 2, 3, 0,
760 0, 7, 0, 6, 0, 5, 3, 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700761};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000762
763
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700764enum { YYENOMEM = -2 };
765
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700766#define yyerrok (yyerrstatus = 0)
767#define yyclearin (yychar = YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000768
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700769#define YYACCEPT goto yyacceptlab
770#define YYABORT goto yyabortlab
771#define YYERROR goto yyerrorlab
772
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000773
774#define YYRECOVERING() (!!yyerrstatus)
775
Nico Huberd9b2f792020-04-28 16:28:03 +0200776#define YYBACKUP(Token, Value) \
777 do \
778 if (yychar == YYEMPTY) \
779 { \
780 yychar = (Token); \
781 yylval = (Value); \
782 YYPOPSTACK (yylen); \
783 yystate = *yyssp; \
784 goto yybackup; \
785 } \
786 else \
787 { \
788 yyerror (YY_("syntax error: cannot back up")); \
789 YYERROR; \
790 } \
791 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700792
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700793/* Backward compatibility with an undocumented macro.
794 Use YYerror or YYUNDEF. */
795#define YYERRCODE YYUNDEF
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000796
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000797
798/* Enable debugging if requested. */
799#if YYDEBUG
800
801# ifndef YYFPRINTF
802# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
803# define YYFPRINTF fprintf
804# endif
805
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700806# define YYDPRINTF(Args) \
807do { \
808 if (yydebug) \
809 YYFPRINTF Args; \
810} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000811
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700812/* This macro is provided for backward compatibility. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700813# ifndef YY_LOCATION_PRINT
814# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
815# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000816
817
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700818# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700819do { \
820 if (yydebug) \
821 { \
822 YYFPRINTF (stderr, "%s ", Title); \
823 yy_symbol_print (stderr, \
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700824 Kind, Value); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700825 YYFPRINTF (stderr, "\n"); \
826 } \
827} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000828
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700829
Nico Huberd9b2f792020-04-28 16:28:03 +0200830/*-----------------------------------.
831| Print this symbol's value on YYO. |
832`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700833
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000834static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700835yy_symbol_value_print (FILE *yyo,
836 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000837{
Nico Huberd9b2f792020-04-28 16:28:03 +0200838 FILE *yyoutput = yyo;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600839 YY_USE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000840 if (!yyvaluep)
841 return;
842# ifdef YYPRINT
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700843 if (yykind < YYNTOKENS)
844 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000845# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200846 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600847 YY_USE (yykind);
Nico Huberd9b2f792020-04-28 16:28:03 +0200848 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000849}
850
851
Nico Huberd9b2f792020-04-28 16:28:03 +0200852/*---------------------------.
853| Print this symbol on YYO. |
854`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000855
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000856static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700857yy_symbol_print (FILE *yyo,
858 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000859{
Nico Huberd9b2f792020-04-28 16:28:03 +0200860 YYFPRINTF (yyo, "%s %s (",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700861 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000862
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700863 yy_symbol_value_print (yyo, yykind, yyvaluep);
Nico Huberd9b2f792020-04-28 16:28:03 +0200864 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000865}
866
867/*------------------------------------------------------------------.
868| yy_stack_print -- Print the state stack from its BOTTOM up to its |
869| TOP (included). |
870`------------------------------------------------------------------*/
871
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000872static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200873yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000874{
875 YYFPRINTF (stderr, "Stack now");
876 for (; yybottom <= yytop; yybottom++)
877 {
878 int yybot = *yybottom;
879 YYFPRINTF (stderr, " %d", yybot);
880 }
881 YYFPRINTF (stderr, "\n");
882}
883
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700884# define YY_STACK_PRINT(Bottom, Top) \
885do { \
886 if (yydebug) \
887 yy_stack_print ((Bottom), (Top)); \
888} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000889
890
891/*------------------------------------------------.
892| Report that the YYRULE is going to be reduced. |
893`------------------------------------------------*/
894
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000895static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700896yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
897 int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000898{
Nico Huberd9b2f792020-04-28 16:28:03 +0200899 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000900 int yynrhs = yyr2[yyrule];
901 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200902 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700903 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000904 /* The symbols being reduced. */
905 for (yyi = 0; yyi < yynrhs; yyi++)
906 {
907 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700908 yy_symbol_print (stderr,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700909 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
910 &yyvsp[(yyi + 1) - (yynrhs)]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000911 YYFPRINTF (stderr, "\n");
912 }
913}
914
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700915# define YY_REDUCE_PRINT(Rule) \
916do { \
917 if (yydebug) \
918 yy_reduce_print (yyssp, yyvsp, Rule); \
919} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000920
921/* Nonzero means print parse trace. It is left uninitialized so that
922 multiple parsers can coexist. */
923int yydebug;
924#else /* !YYDEBUG */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700925# define YYDPRINTF(Args) ((void) 0)
926# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000927# define YY_STACK_PRINT(Bottom, Top)
928# define YY_REDUCE_PRINT(Rule)
929#endif /* !YYDEBUG */
930
931
932/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700933#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000934# define YYINITDEPTH 200
935#endif
936
937/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
938 if the built-in stack extension method is used).
939
940 Do not make this value too large; the results are undefined if
941 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
942 evaluated with infinite-precision integer arithmetic. */
943
944#ifndef YYMAXDEPTH
945# define YYMAXDEPTH 10000
946#endif
947
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000948
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000949
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000950
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000951
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000952
953/*-----------------------------------------------.
954| Release the memory associated to this symbol. |
955`-----------------------------------------------*/
956
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000957static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700958yydestruct (const char *yymsg,
959 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000960{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600961 YY_USE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000962 if (!yymsg)
963 yymsg = "Deleting";
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700964 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000965
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700966 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600967 YY_USE (yykind);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700968 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000969}
970
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200971
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100972/* Lookahead token kind. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000973int yychar;
974
975/* The semantic value of the lookahead symbol. */
976YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000977/* Number of syntax errors so far. */
978int yynerrs;
979
980
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700981
982
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200983/*----------.
984| yyparse. |
985`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000986
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000987int
988yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000989{
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100990 yy_state_fast_t yystate = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000991 /* Number of tokens to shift before error messages enabled. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100992 int yyerrstatus = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000993
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100994 /* Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000995 to reallocate them elsewhere. */
996
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700997 /* Their size. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100998 YYPTRDIFF_T yystacksize = YYINITDEPTH;
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700999
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001000 /* The state stack: array, bottom, top. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001001 yy_state_t yyssa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001002 yy_state_t *yyss = yyssa;
1003 yy_state_t *yyssp = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001004
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001005 /* The semantic value stack: array, bottom, top. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001006 YYSTYPE yyvsa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001007 YYSTYPE *yyvs = yyvsa;
1008 YYSTYPE *yyvsp = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001009
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001010 int yyn;
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001011 /* The return value of yyparse. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001012 int yyresult;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001013 /* Lookahead symbol kind. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001014 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001015 /* The variables used to return semantic value and location from the
1016 action routines. */
1017 YYSTYPE yyval;
1018
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001019
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001020
1021#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1022
1023 /* The number of symbols on the RHS of the reduced rule.
1024 Keep to zero when no symbol should be popped. */
1025 int yylen = 0;
1026
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001027 YYDPRINTF ((stderr, "Starting parse\n"));
1028
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001029 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001030 goto yysetstate;
1031
Nico Huberd9b2f792020-04-28 16:28:03 +02001032
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001033/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001034| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001035`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001036yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001037 /* In all cases, when you get here, the value and location stacks
1038 have just been pushed. So pushing a state here evens the stacks. */
1039 yyssp++;
1040
Nico Huberd9b2f792020-04-28 16:28:03 +02001041
1042/*--------------------------------------------------------------------.
1043| yysetstate -- set current state (the top of the stack) to yystate. |
1044`--------------------------------------------------------------------*/
1045yysetstate:
1046 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1047 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1048 YY_IGNORE_USELESS_CAST_BEGIN
1049 *yyssp = YY_CAST (yy_state_t, yystate);
1050 YY_IGNORE_USELESS_CAST_END
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001051 YY_STACK_PRINT (yyss, yyssp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001052
1053 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001054#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1055 goto yyexhaustedlab;
1056#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001057 {
1058 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001059 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001060
Nico Huberd9b2f792020-04-28 16:28:03 +02001061# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001062 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001063 /* Give user a chance to reallocate the stack. Use copies of
1064 these so that the &'s don't force the real ones into
1065 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001066 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001067 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001068
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001069 /* Each stack pointer address is followed by the size of the
1070 data in use in that stack, in bytes. This used to be a
1071 conditional around just the two extra args, but that might
1072 be undefined if yyoverflow is a macro. */
1073 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001074 &yyss1, yysize * YYSIZEOF (*yyssp),
1075 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001076 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001077 yyss = yyss1;
1078 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001079 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001080# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001081 /* Extend the stack our own way. */
1082 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001083 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001084 yystacksize *= 2;
1085 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001086 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001087
1088 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001089 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001090 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001091 YY_CAST (union yyalloc *,
1092 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001093 if (! yyptr)
1094 goto yyexhaustedlab;
1095 YYSTACK_RELOCATE (yyss_alloc, yyss);
1096 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001097# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001098 if (yyss1 != yyssa)
1099 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001100 }
1101# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001102
1103 yyssp = yyss + yysize - 1;
1104 yyvsp = yyvs + yysize - 1;
1105
Nico Huberd9b2f792020-04-28 16:28:03 +02001106 YY_IGNORE_USELESS_CAST_BEGIN
1107 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1108 YY_CAST (long, yystacksize)));
1109 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001110
1111 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001112 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001113 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001114#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001115
1116 if (yystate == YYFINAL)
1117 YYACCEPT;
1118
1119 goto yybackup;
1120
Nico Huberd9b2f792020-04-28 16:28:03 +02001121
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001122/*-----------.
1123| yybackup. |
1124`-----------*/
1125yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001126 /* Do appropriate processing given the current state. Read a
1127 lookahead token if we need one and don't already have one. */
1128
1129 /* First try to decide what to do without reference to lookahead token. */
1130 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001131 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001132 goto yydefault;
1133
1134 /* Not known => get a lookahead token if don't already have one. */
1135
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001136 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001137 if (yychar == YYEMPTY)
1138 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001139 YYDPRINTF ((stderr, "Reading a token\n"));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001140 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001141 }
1142
1143 if (yychar <= YYEOF)
1144 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001145 yychar = YYEOF;
1146 yytoken = YYSYMBOL_YYEOF;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001147 YYDPRINTF ((stderr, "Now at end of input.\n"));
1148 }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001149 else if (yychar == YYerror)
1150 {
1151 /* The scanner already issued an error message, process directly
1152 to error recovery. But do not keep the error token as
1153 lookahead, it is too special and may lead us to an endless
1154 loop in error recovery. */
1155 yychar = YYUNDEF;
1156 yytoken = YYSYMBOL_YYerror;
1157 goto yyerrlab1;
1158 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001159 else
1160 {
1161 yytoken = YYTRANSLATE (yychar);
1162 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1163 }
1164
1165 /* If the proper action on seeing token YYTOKEN is to reduce or to
1166 detect an error, take that action. */
1167 yyn += yytoken;
1168 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1169 goto yydefault;
1170 yyn = yytable[yyn];
1171 if (yyn <= 0)
1172 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001173 if (yytable_value_is_error (yyn))
1174 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001175 yyn = -yyn;
1176 goto yyreduce;
1177 }
1178
1179 /* Count tokens shifted since error; after three, turn off error
1180 status. */
1181 if (yyerrstatus)
1182 yyerrstatus--;
1183
1184 /* Shift the lookahead token. */
1185 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001186 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001187 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001188 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001189 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001190
Nico Huberd9b2f792020-04-28 16:28:03 +02001191 /* Discard the shifted token. */
1192 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001193 goto yynewstate;
1194
1195
1196/*-----------------------------------------------------------.
1197| yydefault -- do the default action for the current state. |
1198`-----------------------------------------------------------*/
1199yydefault:
1200 yyn = yydefact[yystate];
1201 if (yyn == 0)
1202 goto yyerrlab;
1203 goto yyreduce;
1204
1205
1206/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001207| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001208`-----------------------------*/
1209yyreduce:
1210 /* yyn is the number of a rule to reduce with. */
1211 yylen = yyr2[yyn];
1212
1213 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001214 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001215
1216 Otherwise, the following line sets YYVAL to garbage.
1217 This behavior is undocumented and Bison
1218 users should not rely upon it. Assigning to YYVAL
1219 unconditionally makes the parser a bit smaller, and it avoids a
1220 GCC warning that YYVAL may be used uninitialized. */
1221 yyval = yyvsp[1-yylen];
1222
1223
1224 YY_REDUCE_PRINT (yyn);
1225 switch (yyn)
1226 {
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001227 case 2: /* devtree: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001228 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001229 break;
1230
Nico Huber859ecdf2021-02-28 16:18:18 +01001231 case 23: /* @1: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001232 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001233 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1234 chip_enqueue_tail(cur_chip_instance);
1235 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001236}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001237 break;
1238
Nico Huber859ecdf2021-02-28 16:18:18 +01001239 case 24: /* chip: CHIP STRING @1 chipchildren_dev END */
1240 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001241 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001242}
1243 break;
1244
Nico Huber859ecdf2021-02-28 16:18:18 +01001245 case 25: /* @2: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001246 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001247 (yyval.dev) = new_device_raw(cur_parent, cur_chip_instance, (yyvsp[-3].number), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].number));
Nico Huberd9b2f792020-04-28 16:28:03 +02001248 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001249}
Patrick Georgi68befd52010-05-05 12:05:25 +00001250 break;
1251
Nico Huber859ecdf2021-02-28 16:18:18 +01001252 case 26: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001253 {
1254 cur_parent = (yyvsp[-2].dev)->parent;
1255}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001256 break;
1257
Nico Huber859ecdf2021-02-28 16:18:18 +01001258 case 27: /* @3: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001259 {
1260 (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1261 cur_parent = (yyval.dev)->last_bus;
1262}
1263 break;
1264
Nico Huber859ecdf2021-02-28 16:18:18 +01001265 case 28: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001266 {
1267 cur_parent = (yyvsp[-2].dev)->parent;
1268}
1269 break;
1270
Nico Huber859ecdf2021-02-28 16:18:18 +01001271 case 29: /* alias: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001272 {
1273 (yyval.string) = NULL;
1274}
1275 break;
1276
Nico Huber859ecdf2021-02-28 16:18:18 +01001277 case 30: /* alias: ALIAS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001278 {
1279 (yyval.string) = (yyvsp[0].string);
1280}
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001281 break;
1282
Nico Huber859ecdf2021-02-28 16:18:18 +01001283 case 33: /* resource: RESOURCE NUMBER EQUALS NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001284 { 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 +00001285 break;
1286
Nico Huber859ecdf2021-02-28 16:18:18 +01001287 case 34: /* reference: REFERENCE STRING ASSOCIATION STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001288 { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001289 break;
1290
Nico Huber859ecdf2021-02-28 16:18:18 +01001291 case 35: /* registers: REGISTER STRING EQUALS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001292 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001293 break;
1294
Nico Huber859ecdf2021-02-28 16:18:18 +01001295 case 36: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001296 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
Nico Huberd9b2f792020-04-28 16:28:03 +02001297 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001298
Nico Huber859ecdf2021-02-28 16:18:18 +01001299 case 37: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
Nico Huber8e1ea522020-06-03 10:20:07 -07001300 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001301 break;
1302
Nico Huber859ecdf2021-02-28 16:18:18 +01001303 case 38: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001304 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1305 break;
1306
Nico Huber859ecdf2021-02-28 16:18:18 +01001307 case 39: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001308 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1309 break;
1310
Nico Huber859ecdf2021-02-28 16:18:18 +01001311 case 40: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001312 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1313 break;
1314
Nico Huber859ecdf2021-02-28 16:18:18 +01001315 case 41: /* smbios_slot_desc: SLOT_DESC STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001316 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1317 break;
1318
Nico Huber859ecdf2021-02-28 16:18:18 +01001319 case 42: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001320 { }
1321 break;
1322
Nico Huber859ecdf2021-02-28 16:18:18 +01001323 case 47: /* fw_config_field_bits: NUMBER NUMBER */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001324{
1325 append_fw_config_bits(&cur_bits, strtoul((yyvsp[-1].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
Duncan Laurie47b7b342020-05-15 15:39:08 -07001326}
1327 break;
1328
Nico Huber859ecdf2021-02-28 16:18:18 +01001329 case 50: /* $@4: %empty */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001330 { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
Nico Huber8e1ea522020-06-03 10:20:07 -07001331 break;
1332
Nico Huber859ecdf2021-02-28 16:18:18 +01001333 case 51: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001334 { cur_bits = NULL; }
1335 break;
1336
Nico Huber859ecdf2021-02-28 16:18:18 +01001337 case 52: /* $@5: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001338 {
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001339 cur_bits = NULL;
1340 append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1341 cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits);
Nico Huber8e1ea522020-06-03 10:20:07 -07001342}
1343 break;
1344
Nico Huber859ecdf2021-02-28 16:18:18 +01001345 case 53: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001346 { cur_bits = NULL; }
Nico Huber8e1ea522020-06-03 10:20:07 -07001347 break;
1348
Nico Huber859ecdf2021-02-28 16:18:18 +01001349 case 54: /* $@6: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001350 {
1351 cur_field = get_fw_config_field((yyvsp[0].string));
1352}
Nico Huber8e1ea522020-06-03 10:20:07 -07001353 break;
1354
Nico Huber859ecdf2021-02-28 16:18:18 +01001355 case 55: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001356 { cur_bits = NULL; }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001357 break;
1358
Nico Huber859ecdf2021-02-28 16:18:18 +01001359 case 56: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001360 { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001361 break;
1362
Nico Huber859ecdf2021-02-28 16:18:18 +01001363 case 57: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001364 { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1365 break;
1366
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001367
1368
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001369 default: break;
1370 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001371 /* User semantic actions sometimes alter yychar, and that requires
1372 that yytoken be updated with the new translation. We take the
1373 approach of translating immediately before every use of yytoken.
1374 One alternative is translating here after every semantic action,
1375 but that translation would be missed if the semantic action invokes
1376 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1377 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1378 incorrect destructor might then be invoked immediately. In the
1379 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1380 to an incorrect destructor call or verbose syntax error message
1381 before the lookahead is translated. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001382 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001383
1384 YYPOPSTACK (yylen);
1385 yylen = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001386
1387 *++yyvsp = yyval;
1388
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001389 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001390 that goes to, based on the state we popped back to and the rule
1391 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001392 {
1393 const int yylhs = yyr1[yyn] - YYNTOKENS;
1394 const int yyi = yypgoto[yylhs] + *yyssp;
1395 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1396 ? yytable[yyi]
1397 : yydefgoto[yylhs]);
1398 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001399
1400 goto yynewstate;
1401
1402
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001403/*--------------------------------------.
1404| yyerrlab -- here on detecting error. |
1405`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001406yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001407 /* Make sure we have latest lookahead translation. See comments at
1408 user semantic actions for why this is necessary. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001409 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001410 /* If not already recovering from an error, report this error. */
1411 if (!yyerrstatus)
1412 {
1413 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001414 yyerror (YY_("syntax error"));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001415 }
1416
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001417 if (yyerrstatus == 3)
1418 {
1419 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001420 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001421
1422 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001423 {
1424 /* Return failure if at end of input. */
1425 if (yychar == YYEOF)
1426 YYABORT;
1427 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001428 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001429 {
1430 yydestruct ("Error: discarding",
1431 yytoken, &yylval);
1432 yychar = YYEMPTY;
1433 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001434 }
1435
1436 /* Else will try to reuse lookahead token after shifting the error
1437 token. */
1438 goto yyerrlab1;
1439
1440
1441/*---------------------------------------------------.
1442| yyerrorlab -- error raised explicitly by YYERROR. |
1443`---------------------------------------------------*/
1444yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001445 /* Pacify compilers when the user code never invokes YYERROR and the
1446 label yyerrorlab therefore never appears in user code. */
1447 if (0)
1448 YYERROR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001449
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001450 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001451 this YYERROR. */
1452 YYPOPSTACK (yylen);
1453 yylen = 0;
1454 YY_STACK_PRINT (yyss, yyssp);
1455 yystate = *yyssp;
1456 goto yyerrlab1;
1457
1458
1459/*-------------------------------------------------------------.
1460| yyerrlab1 -- common code for both syntax error and YYERROR. |
1461`-------------------------------------------------------------*/
1462yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001463 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001464
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001465 /* Pop stack until we find a state that shifts the error token. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001466 for (;;)
1467 {
1468 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001469 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001470 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001471 yyn += YYSYMBOL_YYerror;
1472 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001473 {
1474 yyn = yytable[yyn];
1475 if (0 < yyn)
1476 break;
1477 }
1478 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001479
1480 /* Pop the current state because it cannot handle the error token. */
1481 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001482 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001483
1484
1485 yydestruct ("Error: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001486 YY_ACCESSING_SYMBOL (yystate), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001487 YYPOPSTACK (1);
1488 yystate = *yyssp;
1489 YY_STACK_PRINT (yyss, yyssp);
1490 }
1491
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001492 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001493 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001494 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001495
1496
1497 /* Shift the error token. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001498 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001499
1500 yystate = yyn;
1501 goto yynewstate;
1502
1503
1504/*-------------------------------------.
1505| yyacceptlab -- YYACCEPT comes here. |
1506`-------------------------------------*/
1507yyacceptlab:
1508 yyresult = 0;
1509 goto yyreturn;
1510
Nico Huberd9b2f792020-04-28 16:28:03 +02001511
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001512/*-----------------------------------.
1513| yyabortlab -- YYABORT comes here. |
1514`-----------------------------------*/
1515yyabortlab:
1516 yyresult = 1;
1517 goto yyreturn;
1518
Nico Huberd9b2f792020-04-28 16:28:03 +02001519
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001520#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001521/*-------------------------------------------------.
1522| yyexhaustedlab -- memory exhaustion comes here. |
1523`-------------------------------------------------*/
1524yyexhaustedlab:
1525 yyerror (YY_("memory exhausted"));
1526 yyresult = 2;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001527 goto yyreturn;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001528#endif
1529
Nico Huberd9b2f792020-04-28 16:28:03 +02001530
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001531/*-------------------------------------------------------.
1532| yyreturn -- parsing is finished, clean up and return. |
1533`-------------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001534yyreturn:
1535 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001536 {
1537 /* Make sure we have latest lookahead translation. See comments at
1538 user semantic actions for why this is necessary. */
1539 yytoken = YYTRANSLATE (yychar);
1540 yydestruct ("Cleanup: discarding lookahead",
1541 yytoken, &yylval);
1542 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001543 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001544 this YYABORT or YYACCEPT. */
1545 YYPOPSTACK (yylen);
1546 YY_STACK_PRINT (yyss, yyssp);
1547 while (yyssp != yyss)
1548 {
1549 yydestruct ("Cleanup: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001550 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001551 YYPOPSTACK (1);
1552 }
1553#ifndef yyoverflow
1554 if (yyss != yyssa)
1555 YYSTACK_FREE (yyss);
1556#endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001557
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001558 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001559}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001560
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001561