blob: 6155dc0ea34389d823ad720c2a1c1cee84729cd5 [file] [log] [blame]
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001/* A Bison parser, made by GNU Bison 3.7.5. */
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
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
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. */
49#define YYBISON 30705
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000050
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060051/* Bison version string. */
52#define YYBISON_VERSION "3.7.5"
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 */
160 YYSYMBOL_chipchildren = 47, /* chipchildren */
161 YYSYMBOL_devicechildren = 48, /* devicechildren */
162 YYSYMBOL_chip = 49, /* chip */
163 YYSYMBOL_50_1 = 50, /* @1 */
164 YYSYMBOL_device = 51, /* device */
165 YYSYMBOL_52_2 = 52, /* @2 */
166 YYSYMBOL_53_3 = 53, /* @3 */
167 YYSYMBOL_alias = 54, /* alias */
168 YYSYMBOL_status = 55, /* status */
169 YYSYMBOL_resource = 56, /* resource */
170 YYSYMBOL_reference = 57, /* reference */
171 YYSYMBOL_registers = 58, /* registers */
172 YYSYMBOL_subsystemid = 59, /* subsystemid */
173 YYSYMBOL_ioapic_irq = 60, /* ioapic_irq */
174 YYSYMBOL_smbios_slot_desc = 61, /* smbios_slot_desc */
175 YYSYMBOL_fw_config_table = 62, /* fw_config_table */
176 YYSYMBOL_fw_config_table_children = 63, /* fw_config_table_children */
177 YYSYMBOL_fw_config_field_children = 64, /* fw_config_field_children */
178 YYSYMBOL_fw_config_field_bits = 65, /* fw_config_field_bits */
179 YYSYMBOL_fw_config_field_bits_repeating = 66, /* fw_config_field_bits_repeating */
180 YYSYMBOL_fw_config_field = 67, /* fw_config_field */
181 YYSYMBOL_68_4 = 68, /* $@4 */
182 YYSYMBOL_69_5 = 69, /* $@5 */
183 YYSYMBOL_70_6 = 70, /* $@6 */
184 YYSYMBOL_fw_config_option = 71, /* fw_config_option */
185 YYSYMBOL_fw_config_probe = 72 /* fw_config_probe */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700186};
187typedef enum yysymbol_kind_t yysymbol_kind_t;
188
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000189
190
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000191
192#ifdef short
193# undef short
194#endif
195
Nico Huberd9b2f792020-04-28 16:28:03 +0200196/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
197 <limits.h> and (if available) <stdint.h> are included
198 so that the code can choose integer types of a good width. */
199
200#ifndef __PTRDIFF_MAX__
201# include <limits.h> /* INFRINGES ON USER NAME SPACE */
202# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
203# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
204# define YY_STDINT_H
205# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000206#endif
207
Nico Huberd9b2f792020-04-28 16:28:03 +0200208/* Narrow types that promote to a signed type and that can represent a
209 signed or unsigned integer of at least N bits. In tables they can
210 save space and decrease cache pressure. Promoting to a signed type
211 helps avoid bugs in integer arithmetic. */
212
213#ifdef __INT_LEAST8_MAX__
214typedef __INT_LEAST8_TYPE__ yytype_int8;
215#elif defined YY_STDINT_H
216typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000217#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700218typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000219#endif
220
Nico Huberd9b2f792020-04-28 16:28:03 +0200221#ifdef __INT_LEAST16_MAX__
222typedef __INT_LEAST16_TYPE__ yytype_int16;
223#elif defined YY_STDINT_H
224typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000225#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200226typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000227#endif
228
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600229/* Work around bug in HP-UX 11.23, which defines these macros
230 incorrectly for preprocessor constants. This workaround can likely
231 be removed in 2023, as HPE has promised support for HP-UX 11.23
232 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
233 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
234#ifdef __hpux
235# undef UINT_LEAST8_MAX
236# undef UINT_LEAST16_MAX
237# define UINT_LEAST8_MAX 255
238# define UINT_LEAST16_MAX 65535
239#endif
240
Nico Huberd9b2f792020-04-28 16:28:03 +0200241#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
242typedef __UINT_LEAST8_TYPE__ yytype_uint8;
243#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
244 && UINT_LEAST8_MAX <= INT_MAX)
245typedef uint_least8_t yytype_uint8;
246#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
247typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000248#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200249typedef short yytype_uint8;
250#endif
251
252#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
253typedef __UINT_LEAST16_TYPE__ yytype_uint16;
254#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
255 && UINT_LEAST16_MAX <= INT_MAX)
256typedef uint_least16_t yytype_uint16;
257#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
258typedef unsigned short yytype_uint16;
259#else
260typedef int yytype_uint16;
261#endif
262
263#ifndef YYPTRDIFF_T
264# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
265# define YYPTRDIFF_T __PTRDIFF_TYPE__
266# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
267# elif defined PTRDIFF_MAX
268# ifndef ptrdiff_t
269# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
270# endif
271# define YYPTRDIFF_T ptrdiff_t
272# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
273# else
274# define YYPTRDIFF_T long
275# define YYPTRDIFF_MAXIMUM LONG_MAX
276# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000277#endif
278
279#ifndef YYSIZE_T
280# ifdef __SIZE_TYPE__
281# define YYSIZE_T __SIZE_TYPE__
282# elif defined size_t
283# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200284# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000285# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
286# define YYSIZE_T size_t
287# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200288# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000289# endif
290#endif
291
Nico Huberd9b2f792020-04-28 16:28:03 +0200292#define YYSIZE_MAXIMUM \
293 YY_CAST (YYPTRDIFF_T, \
294 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
295 ? YYPTRDIFF_MAXIMUM \
296 : YY_CAST (YYSIZE_T, -1)))
297
298#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
299
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700300
Nico Huberd9b2f792020-04-28 16:28:03 +0200301/* Stored state numbers (used for stacks). */
302typedef yytype_int8 yy_state_t;
303
304/* State numbers in computations. */
305typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000306
307#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200308# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000309# if ENABLE_NLS
310# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700311# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000312# endif
313# endif
314# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700315# define YY_(Msgid) Msgid
316# endif
317#endif
318
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700319
Nico Huberd9b2f792020-04-28 16:28:03 +0200320#ifndef YY_ATTRIBUTE_PURE
321# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
322# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700323# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200324# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700325# endif
326#endif
327
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700328#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200329# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
330# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700331# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200332# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000333# endif
334#endif
335
336/* Suppress unused-variable warnings by "using" E. */
337#if ! defined lint || defined __GNUC__
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600338# define YY_USE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000339#else
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600340# define YY_USE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000341#endif
342
Nico Huberd9b2f792020-04-28 16:28:03 +0200343#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700344/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200345# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
346 _Pragma ("GCC diagnostic push") \
347 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700348 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Nico Huberd9b2f792020-04-28 16:28:03 +0200349# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700350 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000351#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700352# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000353#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700354#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
355# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
356# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000357#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700358#ifndef YY_INITIAL_VALUE
359# define YY_INITIAL_VALUE(Value) /* Nothing. */
360#endif
361
Nico Huberd9b2f792020-04-28 16:28:03 +0200362#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
363# define YY_IGNORE_USELESS_CAST_BEGIN \
364 _Pragma ("GCC diagnostic push") \
365 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
366# define YY_IGNORE_USELESS_CAST_END \
367 _Pragma ("GCC diagnostic pop")
368#endif
369#ifndef YY_IGNORE_USELESS_CAST_BEGIN
370# define YY_IGNORE_USELESS_CAST_BEGIN
371# define YY_IGNORE_USELESS_CAST_END
372#endif
373
374
375#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000376
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700377#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000378
379/* The parser invokes alloca or malloc; define the necessary symbols. */
380
381# ifdef YYSTACK_USE_ALLOCA
382# if YYSTACK_USE_ALLOCA
383# ifdef __GNUC__
384# define YYSTACK_ALLOC __builtin_alloca
385# elif defined __BUILTIN_VA_ARG_INCR
386# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
387# elif defined _AIX
388# define YYSTACK_ALLOC __alloca
389# elif defined _MSC_VER
390# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
391# define alloca _alloca
392# else
393# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700394# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000395# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700396 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200397# ifndef EXIT_SUCCESS
398# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000399# endif
400# endif
401# endif
402# endif
403# endif
404
405# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700406 /* Pacify GCC's 'empty if-body' warning. */
407# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000408# ifndef YYSTACK_ALLOC_MAXIMUM
409 /* The OS might guarantee only one guard page at the bottom of the stack,
410 and a page size can be as small as 4096 bytes. So we cannot safely
411 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
412 to allow for a few compiler-allocated temporary stack slots. */
413# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
414# endif
415# else
416# define YYSTACK_ALLOC YYMALLOC
417# define YYSTACK_FREE YYFREE
418# ifndef YYSTACK_ALLOC_MAXIMUM
419# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
420# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200421# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000422 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700423 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000424# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200425# ifndef EXIT_SUCCESS
426# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000427# endif
428# endif
429# ifndef YYMALLOC
430# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700431# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000432void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
433# endif
434# endif
435# ifndef YYFREE
436# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700437# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000438void free (void *); /* INFRINGES ON USER NAME SPACE */
439# endif
440# endif
441# endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700442#endif /* !defined yyoverflow */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000443
444#if (! defined yyoverflow \
445 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700446 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000447
448/* A type that is properly aligned for any stack member. */
449union yyalloc
450{
Nico Huberd9b2f792020-04-28 16:28:03 +0200451 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000452 YYSTYPE yyvs_alloc;
453};
454
455/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200456# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000457
458/* The size of an array large to enough to hold all stacks, each with
459 N elements. */
460# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200461 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000462 + YYSTACK_GAP_MAXIMUM)
463
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200464# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000465
466/* Relocate STACK from its old location to the new one. The
467 local variables YYSIZE and YYSTACKSIZE give the old and new number of
468 elements in the stack, and YYPTR gives the new location of the
469 stack. Advance YYPTR to a properly aligned location for the next
470 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700471# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
472 do \
473 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200474 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700475 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
476 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200477 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
478 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700479 } \
480 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000481
482#endif
483
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200484#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700485/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200486 not overlap. */
487# ifndef YYCOPY
488# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700489# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200490 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200491# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700492# define YYCOPY(Dst, Src, Count) \
493 do \
494 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200495 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700496 for (yyi = 0; yyi < (Count); yyi++) \
497 (Dst)[yyi] = (Src)[yyi]; \
498 } \
499 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200500# endif
501# endif
502#endif /* !YYCOPY_NEEDED */
503
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000504/* YYFINAL -- State number of the termination state. */
Duncan Laurie47b7b342020-05-15 15:39:08 -0700505#define YYFINAL 2
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000506/* YYLAST -- Last index in YYTABLE. */
Martin Roth29955882021-07-10 16:37:39 -0600507#define YYLAST 97
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000508
509/* YYNTOKENS -- Number of terminals. */
Martin Roth29955882021-07-10 16:37:39 -0600510#define YYNTOKENS 45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000511/* YYNNTS -- Number of nonterminals. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600512#define YYNNTS 28
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000513/* YYNRULES -- Number of rules. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600514#define YYNRULES 53
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700515/* YYNSTATES -- Number of states. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600516#define YYNSTATES 95
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000517
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100518/* YYMAXUTOK -- Last valid token kind. */
Martin Roth29955882021-07-10 16:37:39 -0600519#define YYMAXUTOK 299
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000520
Nico Huberd9b2f792020-04-28 16:28:03 +0200521
522/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
523 as returned by yylex, with out-of-bounds checking. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700524#define YYTRANSLATE(YYX) \
525 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
526 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
527 : YYSYMBOL_YYUNDEF)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000528
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700529/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200530 as returned by yylex. */
531static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000532{
533 0, 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, 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, 1, 2, 3, 4,
559 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200560 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000561 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Martin Roth29955882021-07-10 16:37:39 -0600562 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000563};
564
565#if YYDEBUG
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700566 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600567static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000568{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600569 0, 26, 26, 26, 26, 28, 28, 28, 28, 28,
570 30, 30, 30, 30, 30, 30, 30, 30, 30, 32,
571 32, 41, 41, 49, 49, 57, 59, 63, 63, 65,
572 68, 71, 74, 77, 80, 83, 86, 89, 93, 96,
573 96, 99, 99, 102, 108, 108, 111, 110, 115, 115,
574 123, 123, 129, 133
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000575};
576#endif
577
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700578/** Accessing symbol of state STATE. */
579#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
580
581#if YYDEBUG || 0
582/* The user-facing name of the symbol whose (internal) number is
583 YYSYMBOL. No bounds checking. */
584static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
585
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000586/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
587 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
588static const char *const yytname[] =
589{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700590 "\"end of file\"", "error", "\"invalid token\"", "CHIP", "DEVICE",
591 "REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
592 "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
593 "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
594 "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ",
Martin Roth29955882021-07-10 16:37:39 -0600595 "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "GPIO",
596 "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600597 "FW_CONFIG_PROBE", "PIPE", "$accept", "devtree", "chipchildren",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700598 "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status",
599 "resource", "reference", "registers", "subsystemid", "ioapic_irq",
600 "smbios_slot_desc", "fw_config_table", "fw_config_table_children",
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600601 "fw_config_field_children", "fw_config_field_bits",
602 "fw_config_field_bits_repeating", "fw_config_field", "$@4", "$@5", "$@6",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700603 "fw_config_option", "fw_config_probe", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000604};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700605
606static const char *
607yysymbol_name (yysymbol_kind_t yysymbol)
608{
609 return yytname[yysymbol];
610}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000611#endif
612
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700613#ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700614/* YYTOKNUM[NUM] -- (External) token number corresponding to the
615 (internal) symbol number NUM (which must be that of a token). */
Nico Huberd9b2f792020-04-28 16:28:03 +0200616static const yytype_int16 yytoknum[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000617{
618 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
619 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800620 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Duncan Laurie47b7b342020-05-15 15:39:08 -0700621 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
Martin Roth29955882021-07-10 16:37:39 -0600622 295, 296, 297, 298, 299
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000623};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700624#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000625
Martin Roth29955882021-07-10 16:37:39 -0600626#define YYPACT_NINF (-27)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700627
Nico Huberd9b2f792020-04-28 16:28:03 +0200628#define yypact_value_is_default(Yyn) \
629 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700630
Nico Huberd9b2f792020-04-28 16:28:03 +0200631#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700632
Nico Huberd9b2f792020-04-28 16:28:03 +0200633#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700634 0
635
636 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
637 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000638static const yytype_int8 yypact[] =
639{
Martin Roth29955882021-07-10 16:37:39 -0600640 -27, 9, -27, 2, -27, -27, -27, -27, -11, -27,
641 -27, 4, -27, 43, -13, 10, 20, 21, -27, -27,
642 -27, -27, -27, 13, -26, -27, 22, 14, 30, 44,
643 -27, -27, 24, -27, -7, 16, 45, 37, 38, -6,
644 13, -26, -27, -27, 39, -27, -27, -27, -27, 41,
645 16, -27, -27, -27, -27, -1, 31, -27, -27, -27,
646 -27, -27, -3, -27, 32, -27, 42, 33, 34, 47,
647 -27, -27, -27, -27, -27, -27, -27, -27, 1, 50,
648 49, 40, 36, 51, -27, 46, 54, 48, 52, -27,
649 -27, 55, -27, -27, -27
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000650};
651
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700652 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
653 Performed when YYTABLE does not specify something else to do. Zero
654 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200655static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700656{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700657 2, 0, 1, 0, 40, 3, 4, 19, 0, 9,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600658 38, 0, 39, 0, 50, 0, 0, 0, 20, 6,
659 5, 8, 7, 48, 45, 42, 0, 0, 0, 0,
660 43, 42, 0, 46, 0, 0, 25, 0, 0, 0,
661 0, 45, 42, 51, 0, 41, 27, 28, 23, 0,
662 0, 31, 30, 49, 44, 0, 0, 18, 26, 21,
663 47, 52, 0, 18, 0, 24, 0, 0, 0, 0,
664 11, 10, 12, 16, 13, 14, 15, 17, 0, 0,
665 0, 0, 0, 0, 22, 0, 37, 32, 0, 53,
666 29, 36, 33, 34, 35
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700667};
668
669 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000670static const yytype_int8 yypgoto[] =
671{
Martin Roth29955882021-07-10 16:37:39 -0600672 -27, -27, -27, 11, 19, -27, 60, -27, -27, -27,
673 17, -27, -27, 63, -27, -27, -27, -27, -27, -8,
674 53, 56, -27, -27, -27, -27, -27, -27
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000675};
676
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700677 /* YYDEFGOTO[NTERM-NUM]. */
678static const yytype_int8 yydefgoto[] =
679{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600680 0, 1, 13, 62, 70, 9, 71, 63, 57, 50,
681 48, 72, 21, 73, 74, 75, 76, 6, 8, 34,
682 24, 33, 12, 42, 31, 25, 45, 77
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700683};
684
685 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
686 positive, shift that token. If negative, reduce the rule whose
687 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200688static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000689{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600690 3, 15, 16, 10, 3, 15, 16, 43, 53, 2,
Martin Roth29955882021-07-10 16:37:39 -0600691 64, 65, 3, 60, 64, 84, 23, 26, 32, 7,
692 5, 14, 27, 39, 66, 46, 47, 67, 66, 68,
693 11, 67, 19, 68, 55, 44, 44, 28, 29, 35,
694 69, 44, 30, 36, 69, 37, 3, 15, 16, 4,
695 17, 49, 38, 40, 51, 52, 56, 18, 58, 80,
696 61, 79, 81, 82, 83, 85, 86, 59, 89, 87,
697 88, 91, 94, 20, 78, 90, 22, 0, 0, 92,
698 0, 93, 0, 0, 0, 41, 0, 0, 0, 0,
699 0, 0, 0, 0, 0, 0, 0, 54
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000700};
701
Patrick Georgi8f625f62010-05-05 13:13:47 +0000702static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000703{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700704 3, 4, 5, 14, 3, 4, 5, 14, 14, 0,
Martin Roth29955882021-07-10 16:37:39 -0600705 13, 14, 3, 14, 13, 14, 29, 7, 44, 17,
706 1, 17, 12, 31, 27, 9, 10, 30, 27, 32,
707 41, 30, 13, 32, 42, 42, 42, 17, 17, 17,
708 43, 42, 29, 29, 43, 15, 3, 4, 5, 40,
709 7, 6, 8, 29, 17, 17, 17, 14, 17, 17,
710 29, 29, 29, 29, 17, 15, 17, 50, 17, 29,
711 34, 17, 17, 13, 63, 29, 13, -1, -1, 31,
712 -1, 29, -1, -1, -1, 32, -1, -1, -1, -1,
713 -1, -1, -1, -1, -1, -1, -1, 41
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000714};
715
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700716 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
717 symbol of state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200718static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000719{
Martin Roth29955882021-07-10 16:37:39 -0600720 0, 46, 0, 3, 40, 49, 62, 17, 63, 50,
721 14, 41, 67, 47, 17, 4, 5, 7, 14, 49,
722 51, 57, 58, 29, 65, 70, 7, 12, 17, 17,
723 29, 69, 44, 66, 64, 17, 29, 15, 8, 64,
724 29, 65, 68, 14, 42, 71, 9, 10, 55, 6,
725 54, 17, 17, 14, 66, 64, 17, 53, 17, 55,
726 14, 29, 48, 52, 13, 14, 27, 30, 32, 43,
727 49, 51, 56, 58, 59, 60, 61, 72, 48, 29,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600728 17, 29, 29, 17, 14, 15, 17, 29, 34, 17,
729 29, 17, 31, 29, 17
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000730};
731
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700732 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200733static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700734{
Martin Roth29955882021-07-10 16:37:39 -0600735 0, 45, 46, 46, 46, 47, 47, 47, 47, 47,
736 48, 48, 48, 48, 48, 48, 48, 48, 48, 50,
737 49, 52, 51, 53, 51, 54, 54, 55, 55, 56,
738 57, 58, 59, 59, 60, 61, 61, 61, 62, 63,
739 63, 64, 64, 65, 66, 66, 68, 67, 69, 67,
740 70, 67, 71, 72
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700741};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000742
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700743 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200744static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700745{
Nico Huber8e1ea522020-06-03 10:20:07 -0700746 0, 2, 0, 2, 2, 2, 2, 2, 2, 0,
747 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700748 5, 0, 8, 0, 7, 0, 2, 1, 1, 4,
749 4, 4, 3, 4, 4, 5, 4, 3, 3, 2,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600750 0, 2, 0, 2, 3, 0, 0, 7, 0, 6,
751 0, 5, 3, 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700752};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000753
754
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700755enum { YYENOMEM = -2 };
756
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700757#define yyerrok (yyerrstatus = 0)
758#define yyclearin (yychar = YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000759
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700760#define YYACCEPT goto yyacceptlab
761#define YYABORT goto yyabortlab
762#define YYERROR goto yyerrorlab
763
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000764
765#define YYRECOVERING() (!!yyerrstatus)
766
Nico Huberd9b2f792020-04-28 16:28:03 +0200767#define YYBACKUP(Token, Value) \
768 do \
769 if (yychar == YYEMPTY) \
770 { \
771 yychar = (Token); \
772 yylval = (Value); \
773 YYPOPSTACK (yylen); \
774 yystate = *yyssp; \
775 goto yybackup; \
776 } \
777 else \
778 { \
779 yyerror (YY_("syntax error: cannot back up")); \
780 YYERROR; \
781 } \
782 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700783
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700784/* Backward compatibility with an undocumented macro.
785 Use YYerror or YYUNDEF. */
786#define YYERRCODE YYUNDEF
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000787
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000788
789/* Enable debugging if requested. */
790#if YYDEBUG
791
792# ifndef YYFPRINTF
793# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
794# define YYFPRINTF fprintf
795# endif
796
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700797# define YYDPRINTF(Args) \
798do { \
799 if (yydebug) \
800 YYFPRINTF Args; \
801} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000802
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700803/* This macro is provided for backward compatibility. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700804# ifndef YY_LOCATION_PRINT
805# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
806# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000807
808
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700809# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700810do { \
811 if (yydebug) \
812 { \
813 YYFPRINTF (stderr, "%s ", Title); \
814 yy_symbol_print (stderr, \
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700815 Kind, Value); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700816 YYFPRINTF (stderr, "\n"); \
817 } \
818} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000819
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700820
Nico Huberd9b2f792020-04-28 16:28:03 +0200821/*-----------------------------------.
822| Print this symbol's value on YYO. |
823`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700824
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000825static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700826yy_symbol_value_print (FILE *yyo,
827 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000828{
Nico Huberd9b2f792020-04-28 16:28:03 +0200829 FILE *yyoutput = yyo;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600830 YY_USE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000831 if (!yyvaluep)
832 return;
833# ifdef YYPRINT
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700834 if (yykind < YYNTOKENS)
835 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000836# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200837 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600838 YY_USE (yykind);
Nico Huberd9b2f792020-04-28 16:28:03 +0200839 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000840}
841
842
Nico Huberd9b2f792020-04-28 16:28:03 +0200843/*---------------------------.
844| Print this symbol on YYO. |
845`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000846
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000847static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700848yy_symbol_print (FILE *yyo,
849 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000850{
Nico Huberd9b2f792020-04-28 16:28:03 +0200851 YYFPRINTF (yyo, "%s %s (",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700852 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000853
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700854 yy_symbol_value_print (yyo, yykind, yyvaluep);
Nico Huberd9b2f792020-04-28 16:28:03 +0200855 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000856}
857
858/*------------------------------------------------------------------.
859| yy_stack_print -- Print the state stack from its BOTTOM up to its |
860| TOP (included). |
861`------------------------------------------------------------------*/
862
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000863static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200864yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000865{
866 YYFPRINTF (stderr, "Stack now");
867 for (; yybottom <= yytop; yybottom++)
868 {
869 int yybot = *yybottom;
870 YYFPRINTF (stderr, " %d", yybot);
871 }
872 YYFPRINTF (stderr, "\n");
873}
874
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700875# define YY_STACK_PRINT(Bottom, Top) \
876do { \
877 if (yydebug) \
878 yy_stack_print ((Bottom), (Top)); \
879} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000880
881
882/*------------------------------------------------.
883| Report that the YYRULE is going to be reduced. |
884`------------------------------------------------*/
885
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000886static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700887yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
888 int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000889{
Nico Huberd9b2f792020-04-28 16:28:03 +0200890 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000891 int yynrhs = yyr2[yyrule];
892 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200893 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700894 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000895 /* The symbols being reduced. */
896 for (yyi = 0; yyi < yynrhs; yyi++)
897 {
898 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700899 yy_symbol_print (stderr,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700900 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
901 &yyvsp[(yyi + 1) - (yynrhs)]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000902 YYFPRINTF (stderr, "\n");
903 }
904}
905
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700906# define YY_REDUCE_PRINT(Rule) \
907do { \
908 if (yydebug) \
909 yy_reduce_print (yyssp, yyvsp, Rule); \
910} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000911
912/* Nonzero means print parse trace. It is left uninitialized so that
913 multiple parsers can coexist. */
914int yydebug;
915#else /* !YYDEBUG */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700916# define YYDPRINTF(Args) ((void) 0)
917# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000918# define YY_STACK_PRINT(Bottom, Top)
919# define YY_REDUCE_PRINT(Rule)
920#endif /* !YYDEBUG */
921
922
923/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700924#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000925# define YYINITDEPTH 200
926#endif
927
928/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
929 if the built-in stack extension method is used).
930
931 Do not make this value too large; the results are undefined if
932 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
933 evaluated with infinite-precision integer arithmetic. */
934
935#ifndef YYMAXDEPTH
936# define YYMAXDEPTH 10000
937#endif
938
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000939
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000940
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000941
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000942
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000943
944/*-----------------------------------------------.
945| Release the memory associated to this symbol. |
946`-----------------------------------------------*/
947
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000948static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700949yydestruct (const char *yymsg,
950 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000951{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600952 YY_USE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000953 if (!yymsg)
954 yymsg = "Deleting";
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700955 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000956
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700957 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600958 YY_USE (yykind);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700959 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000960}
961
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200962
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100963/* Lookahead token kind. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000964int yychar;
965
966/* The semantic value of the lookahead symbol. */
967YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000968/* Number of syntax errors so far. */
969int yynerrs;
970
971
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700972
973
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200974/*----------.
975| yyparse. |
976`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000977
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000978int
979yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000980{
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100981 yy_state_fast_t yystate = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000982 /* Number of tokens to shift before error messages enabled. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100983 int yyerrstatus = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000984
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100985 /* Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000986 to reallocate them elsewhere. */
987
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700988 /* Their size. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100989 YYPTRDIFF_T yystacksize = YYINITDEPTH;
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700990
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100991 /* The state stack: array, bottom, top. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200992 yy_state_t yyssa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100993 yy_state_t *yyss = yyssa;
994 yy_state_t *yyssp = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000995
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100996 /* The semantic value stack: array, bottom, top. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000997 YYSTYPE yyvsa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100998 YYSTYPE *yyvs = yyvsa;
999 YYSTYPE *yyvsp = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001000
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001001 int yyn;
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001002 /* The return value of yyparse. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001003 int yyresult;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001004 /* Lookahead symbol kind. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001005 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001006 /* The variables used to return semantic value and location from the
1007 action routines. */
1008 YYSTYPE yyval;
1009
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001010
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001011
1012#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1013
1014 /* The number of symbols on the RHS of the reduced rule.
1015 Keep to zero when no symbol should be popped. */
1016 int yylen = 0;
1017
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001018 YYDPRINTF ((stderr, "Starting parse\n"));
1019
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001020 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001021 goto yysetstate;
1022
Nico Huberd9b2f792020-04-28 16:28:03 +02001023
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001024/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001025| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001026`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001027yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001028 /* In all cases, when you get here, the value and location stacks
1029 have just been pushed. So pushing a state here evens the stacks. */
1030 yyssp++;
1031
Nico Huberd9b2f792020-04-28 16:28:03 +02001032
1033/*--------------------------------------------------------------------.
1034| yysetstate -- set current state (the top of the stack) to yystate. |
1035`--------------------------------------------------------------------*/
1036yysetstate:
1037 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1038 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1039 YY_IGNORE_USELESS_CAST_BEGIN
1040 *yyssp = YY_CAST (yy_state_t, yystate);
1041 YY_IGNORE_USELESS_CAST_END
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001042 YY_STACK_PRINT (yyss, yyssp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001043
1044 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001045#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1046 goto yyexhaustedlab;
1047#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001048 {
1049 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001050 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001051
Nico Huberd9b2f792020-04-28 16:28:03 +02001052# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001053 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001054 /* Give user a chance to reallocate the stack. Use copies of
1055 these so that the &'s don't force the real ones into
1056 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001057 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001058 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001059
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001060 /* Each stack pointer address is followed by the size of the
1061 data in use in that stack, in bytes. This used to be a
1062 conditional around just the two extra args, but that might
1063 be undefined if yyoverflow is a macro. */
1064 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001065 &yyss1, yysize * YYSIZEOF (*yyssp),
1066 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001067 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001068 yyss = yyss1;
1069 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001070 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001071# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001072 /* Extend the stack our own way. */
1073 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001074 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001075 yystacksize *= 2;
1076 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001077 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001078
1079 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001080 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001081 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001082 YY_CAST (union yyalloc *,
1083 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001084 if (! yyptr)
1085 goto yyexhaustedlab;
1086 YYSTACK_RELOCATE (yyss_alloc, yyss);
1087 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001088# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001089 if (yyss1 != yyssa)
1090 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001091 }
1092# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001093
1094 yyssp = yyss + yysize - 1;
1095 yyvsp = yyvs + yysize - 1;
1096
Nico Huberd9b2f792020-04-28 16:28:03 +02001097 YY_IGNORE_USELESS_CAST_BEGIN
1098 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1099 YY_CAST (long, yystacksize)));
1100 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001101
1102 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001103 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001104 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001105#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001106
1107 if (yystate == YYFINAL)
1108 YYACCEPT;
1109
1110 goto yybackup;
1111
Nico Huberd9b2f792020-04-28 16:28:03 +02001112
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001113/*-----------.
1114| yybackup. |
1115`-----------*/
1116yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001117 /* Do appropriate processing given the current state. Read a
1118 lookahead token if we need one and don't already have one. */
1119
1120 /* First try to decide what to do without reference to lookahead token. */
1121 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001122 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001123 goto yydefault;
1124
1125 /* Not known => get a lookahead token if don't already have one. */
1126
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001127 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001128 if (yychar == YYEMPTY)
1129 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001130 YYDPRINTF ((stderr, "Reading a token\n"));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001131 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001132 }
1133
1134 if (yychar <= YYEOF)
1135 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001136 yychar = YYEOF;
1137 yytoken = YYSYMBOL_YYEOF;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001138 YYDPRINTF ((stderr, "Now at end of input.\n"));
1139 }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001140 else if (yychar == YYerror)
1141 {
1142 /* The scanner already issued an error message, process directly
1143 to error recovery. But do not keep the error token as
1144 lookahead, it is too special and may lead us to an endless
1145 loop in error recovery. */
1146 yychar = YYUNDEF;
1147 yytoken = YYSYMBOL_YYerror;
1148 goto yyerrlab1;
1149 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001150 else
1151 {
1152 yytoken = YYTRANSLATE (yychar);
1153 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1154 }
1155
1156 /* If the proper action on seeing token YYTOKEN is to reduce or to
1157 detect an error, take that action. */
1158 yyn += yytoken;
1159 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1160 goto yydefault;
1161 yyn = yytable[yyn];
1162 if (yyn <= 0)
1163 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001164 if (yytable_value_is_error (yyn))
1165 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001166 yyn = -yyn;
1167 goto yyreduce;
1168 }
1169
1170 /* Count tokens shifted since error; after three, turn off error
1171 status. */
1172 if (yyerrstatus)
1173 yyerrstatus--;
1174
1175 /* Shift the lookahead token. */
1176 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001177 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001178 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001179 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001180 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001181
Nico Huberd9b2f792020-04-28 16:28:03 +02001182 /* Discard the shifted token. */
1183 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001184 goto yynewstate;
1185
1186
1187/*-----------------------------------------------------------.
1188| yydefault -- do the default action for the current state. |
1189`-----------------------------------------------------------*/
1190yydefault:
1191 yyn = yydefact[yystate];
1192 if (yyn == 0)
1193 goto yyerrlab;
1194 goto yyreduce;
1195
1196
1197/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001198| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001199`-----------------------------*/
1200yyreduce:
1201 /* yyn is the number of a rule to reduce with. */
1202 yylen = yyr2[yyn];
1203
1204 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001205 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001206
1207 Otherwise, the following line sets YYVAL to garbage.
1208 This behavior is undocumented and Bison
1209 users should not rely upon it. Assigning to YYVAL
1210 unconditionally makes the parser a bit smaller, and it avoids a
1211 GCC warning that YYVAL may be used uninitialized. */
1212 yyval = yyvsp[1-yylen];
1213
1214
1215 YY_REDUCE_PRINT (yyn);
1216 switch (yyn)
1217 {
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001218 case 2: /* devtree: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001219 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001220 break;
1221
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001222 case 19: /* @1: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001223 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001224 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1225 chip_enqueue_tail(cur_chip_instance);
1226 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001227}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001228 break;
1229
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001230 case 20: /* chip: CHIP STRING @1 chipchildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001231 {
1232 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001233}
1234 break;
1235
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001236 case 21: /* @2: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001237 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001238 (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 +02001239 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001240}
Patrick Georgi68befd52010-05-05 12:05:25 +00001241 break;
1242
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001243 case 22: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001244 {
1245 cur_parent = (yyvsp[-2].dev)->parent;
1246}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001247 break;
1248
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001249 case 23: /* @3: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001250 {
1251 (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1252 cur_parent = (yyval.dev)->last_bus;
1253}
1254 break;
1255
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001256 case 24: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001257 {
1258 cur_parent = (yyvsp[-2].dev)->parent;
1259}
1260 break;
1261
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001262 case 25: /* alias: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001263 {
1264 (yyval.string) = NULL;
1265}
1266 break;
1267
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001268 case 26: /* alias: ALIAS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001269 {
1270 (yyval.string) = (yyvsp[0].string);
1271}
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001272 break;
1273
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001274 case 29: /* resource: RESOURCE NUMBER EQUALS NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001275 { 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 +00001276 break;
1277
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001278 case 30: /* reference: REFERENCE STRING ASSOCIATION STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001279 { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001280 break;
1281
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001282 case 31: /* registers: REGISTER STRING EQUALS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001283 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001284 break;
1285
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001286 case 32: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001287 { 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 +02001288 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001289
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001290 case 33: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
Nico Huber8e1ea522020-06-03 10:20:07 -07001291 { 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 +02001292 break;
1293
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001294 case 34: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001295 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1296 break;
1297
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001298 case 35: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001299 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1300 break;
1301
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001302 case 36: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001303 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1304 break;
1305
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001306 case 37: /* smbios_slot_desc: SLOT_DESC STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001307 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1308 break;
1309
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001310 case 38: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001311 { }
1312 break;
1313
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001314 case 43: /* fw_config_field_bits: NUMBER NUMBER */
1315{
1316 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 -07001317}
1318 break;
1319
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001320 case 46: /* $@4: %empty */
1321 { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
Nico Huber8e1ea522020-06-03 10:20:07 -07001322 break;
1323
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001324 case 47: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */
1325 { cur_bits = NULL; }
1326 break;
1327
1328 case 48: /* $@5: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001329 {
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001330 cur_bits = NULL;
1331 append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1332 cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits);
Nico Huber8e1ea522020-06-03 10:20:07 -07001333}
1334 break;
1335
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001336 case 49: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
1337 { cur_bits = NULL; }
Nico Huber8e1ea522020-06-03 10:20:07 -07001338 break;
1339
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001340 case 50: /* $@6: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001341 {
1342 cur_field = get_fw_config_field((yyvsp[0].string));
1343}
Nico Huber8e1ea522020-06-03 10:20:07 -07001344 break;
1345
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001346 case 51: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
1347 { cur_bits = NULL; }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001348 break;
1349
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001350 case 52: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001351 { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001352 break;
1353
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001354 case 53: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001355 { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1356 break;
1357
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001358
1359
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001360 default: break;
1361 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001362 /* User semantic actions sometimes alter yychar, and that requires
1363 that yytoken be updated with the new translation. We take the
1364 approach of translating immediately before every use of yytoken.
1365 One alternative is translating here after every semantic action,
1366 but that translation would be missed if the semantic action invokes
1367 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1368 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1369 incorrect destructor might then be invoked immediately. In the
1370 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1371 to an incorrect destructor call or verbose syntax error message
1372 before the lookahead is translated. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001373 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001374
1375 YYPOPSTACK (yylen);
1376 yylen = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001377
1378 *++yyvsp = yyval;
1379
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001380 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001381 that goes to, based on the state we popped back to and the rule
1382 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001383 {
1384 const int yylhs = yyr1[yyn] - YYNTOKENS;
1385 const int yyi = yypgoto[yylhs] + *yyssp;
1386 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1387 ? yytable[yyi]
1388 : yydefgoto[yylhs]);
1389 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001390
1391 goto yynewstate;
1392
1393
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001394/*--------------------------------------.
1395| yyerrlab -- here on detecting error. |
1396`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001397yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001398 /* Make sure we have latest lookahead translation. See comments at
1399 user semantic actions for why this is necessary. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001400 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001401 /* If not already recovering from an error, report this error. */
1402 if (!yyerrstatus)
1403 {
1404 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001405 yyerror (YY_("syntax error"));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001406 }
1407
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001408 if (yyerrstatus == 3)
1409 {
1410 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001411 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001412
1413 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001414 {
1415 /* Return failure if at end of input. */
1416 if (yychar == YYEOF)
1417 YYABORT;
1418 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001419 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001420 {
1421 yydestruct ("Error: discarding",
1422 yytoken, &yylval);
1423 yychar = YYEMPTY;
1424 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001425 }
1426
1427 /* Else will try to reuse lookahead token after shifting the error
1428 token. */
1429 goto yyerrlab1;
1430
1431
1432/*---------------------------------------------------.
1433| yyerrorlab -- error raised explicitly by YYERROR. |
1434`---------------------------------------------------*/
1435yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001436 /* Pacify compilers when the user code never invokes YYERROR and the
1437 label yyerrorlab therefore never appears in user code. */
1438 if (0)
1439 YYERROR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001440
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001441 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001442 this YYERROR. */
1443 YYPOPSTACK (yylen);
1444 yylen = 0;
1445 YY_STACK_PRINT (yyss, yyssp);
1446 yystate = *yyssp;
1447 goto yyerrlab1;
1448
1449
1450/*-------------------------------------------------------------.
1451| yyerrlab1 -- common code for both syntax error and YYERROR. |
1452`-------------------------------------------------------------*/
1453yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001454 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001455
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001456 /* Pop stack until we find a state that shifts the error token. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001457 for (;;)
1458 {
1459 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001460 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001461 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001462 yyn += YYSYMBOL_YYerror;
1463 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001464 {
1465 yyn = yytable[yyn];
1466 if (0 < yyn)
1467 break;
1468 }
1469 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001470
1471 /* Pop the current state because it cannot handle the error token. */
1472 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001473 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001474
1475
1476 yydestruct ("Error: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001477 YY_ACCESSING_SYMBOL (yystate), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001478 YYPOPSTACK (1);
1479 yystate = *yyssp;
1480 YY_STACK_PRINT (yyss, yyssp);
1481 }
1482
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001483 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001484 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001485 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001486
1487
1488 /* Shift the error token. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001489 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001490
1491 yystate = yyn;
1492 goto yynewstate;
1493
1494
1495/*-------------------------------------.
1496| yyacceptlab -- YYACCEPT comes here. |
1497`-------------------------------------*/
1498yyacceptlab:
1499 yyresult = 0;
1500 goto yyreturn;
1501
Nico Huberd9b2f792020-04-28 16:28:03 +02001502
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001503/*-----------------------------------.
1504| yyabortlab -- YYABORT comes here. |
1505`-----------------------------------*/
1506yyabortlab:
1507 yyresult = 1;
1508 goto yyreturn;
1509
Nico Huberd9b2f792020-04-28 16:28:03 +02001510
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001511#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001512/*-------------------------------------------------.
1513| yyexhaustedlab -- memory exhaustion comes here. |
1514`-------------------------------------------------*/
1515yyexhaustedlab:
1516 yyerror (YY_("memory exhausted"));
1517 yyresult = 2;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001518 goto yyreturn;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001519#endif
1520
Nico Huberd9b2f792020-04-28 16:28:03 +02001521
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001522/*-------------------------------------------------------.
1523| yyreturn -- parsing is finished, clean up and return. |
1524`-------------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001525yyreturn:
1526 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001527 {
1528 /* Make sure we have latest lookahead translation. See comments at
1529 user semantic actions for why this is necessary. */
1530 yytoken = YYTRANSLATE (yychar);
1531 yydestruct ("Cleanup: discarding lookahead",
1532 yytoken, &yylval);
1533 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001534 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001535 this YYABORT or YYACCEPT. */
1536 YYPOPSTACK (yylen);
1537 YY_STACK_PRINT (yyss, yyssp);
1538 while (yyssp != yyss)
1539 {
1540 yydestruct ("Cleanup: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001541 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001542 YYPOPSTACK (1);
1543 }
1544#ifndef yyoverflow
1545 if (yyss != yyssa)
1546 YYSTACK_FREE (yyss);
1547#endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001548
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001549 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001550}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001551
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001552