blob: 68421a15d9ad1a74ca8f403e07067407af0662b7 [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 */
152 YYSYMBOL_LPC = 39, /* LPC */
153 YYSYMBOL_ESPI = 40, /* ESPI */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100154 YYSYMBOL_GPIO = 41, /* GPIO */
155 YYSYMBOL_FW_CONFIG_TABLE = 42, /* FW_CONFIG_TABLE */
156 YYSYMBOL_FW_CONFIG_FIELD = 43, /* FW_CONFIG_FIELD */
157 YYSYMBOL_FW_CONFIG_OPTION = 44, /* FW_CONFIG_OPTION */
158 YYSYMBOL_FW_CONFIG_PROBE = 45, /* FW_CONFIG_PROBE */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600159 YYSYMBOL_PIPE = 46, /* PIPE */
160 YYSYMBOL_YYACCEPT = 47, /* $accept */
161 YYSYMBOL_devtree = 48, /* devtree */
162 YYSYMBOL_chipchildren = 49, /* chipchildren */
163 YYSYMBOL_devicechildren = 50, /* devicechildren */
164 YYSYMBOL_chip = 51, /* chip */
165 YYSYMBOL_52_1 = 52, /* @1 */
166 YYSYMBOL_device = 53, /* device */
167 YYSYMBOL_54_2 = 54, /* @2 */
168 YYSYMBOL_55_3 = 55, /* @3 */
169 YYSYMBOL_alias = 56, /* alias */
170 YYSYMBOL_status = 57, /* status */
171 YYSYMBOL_resource = 58, /* resource */
172 YYSYMBOL_reference = 59, /* reference */
173 YYSYMBOL_registers = 60, /* registers */
174 YYSYMBOL_subsystemid = 61, /* subsystemid */
175 YYSYMBOL_ioapic_irq = 62, /* ioapic_irq */
176 YYSYMBOL_smbios_slot_desc = 63, /* smbios_slot_desc */
177 YYSYMBOL_fw_config_table = 64, /* fw_config_table */
178 YYSYMBOL_fw_config_table_children = 65, /* fw_config_table_children */
179 YYSYMBOL_fw_config_field_children = 66, /* fw_config_field_children */
180 YYSYMBOL_fw_config_field_bits = 67, /* fw_config_field_bits */
181 YYSYMBOL_fw_config_field_bits_repeating = 68, /* fw_config_field_bits_repeating */
182 YYSYMBOL_fw_config_field = 69, /* fw_config_field */
183 YYSYMBOL_70_4 = 70, /* $@4 */
184 YYSYMBOL_71_5 = 71, /* $@5 */
185 YYSYMBOL_72_6 = 72, /* $@6 */
186 YYSYMBOL_fw_config_option = 73, /* fw_config_option */
187 YYSYMBOL_fw_config_probe = 74 /* fw_config_probe */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700188};
189typedef enum yysymbol_kind_t yysymbol_kind_t;
190
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000191
192
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000193
194#ifdef short
195# undef short
196#endif
197
Nico Huberd9b2f792020-04-28 16:28:03 +0200198/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
199 <limits.h> and (if available) <stdint.h> are included
200 so that the code can choose integer types of a good width. */
201
202#ifndef __PTRDIFF_MAX__
203# include <limits.h> /* INFRINGES ON USER NAME SPACE */
204# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
205# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
206# define YY_STDINT_H
207# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000208#endif
209
Nico Huberd9b2f792020-04-28 16:28:03 +0200210/* Narrow types that promote to a signed type and that can represent a
211 signed or unsigned integer of at least N bits. In tables they can
212 save space and decrease cache pressure. Promoting to a signed type
213 helps avoid bugs in integer arithmetic. */
214
215#ifdef __INT_LEAST8_MAX__
216typedef __INT_LEAST8_TYPE__ yytype_int8;
217#elif defined YY_STDINT_H
218typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000219#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700220typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000221#endif
222
Nico Huberd9b2f792020-04-28 16:28:03 +0200223#ifdef __INT_LEAST16_MAX__
224typedef __INT_LEAST16_TYPE__ yytype_int16;
225#elif defined YY_STDINT_H
226typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000227#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200228typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000229#endif
230
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600231/* Work around bug in HP-UX 11.23, which defines these macros
232 incorrectly for preprocessor constants. This workaround can likely
233 be removed in 2023, as HPE has promised support for HP-UX 11.23
234 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
235 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
236#ifdef __hpux
237# undef UINT_LEAST8_MAX
238# undef UINT_LEAST16_MAX
239# define UINT_LEAST8_MAX 255
240# define UINT_LEAST16_MAX 65535
241#endif
242
Nico Huberd9b2f792020-04-28 16:28:03 +0200243#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
244typedef __UINT_LEAST8_TYPE__ yytype_uint8;
245#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
246 && UINT_LEAST8_MAX <= INT_MAX)
247typedef uint_least8_t yytype_uint8;
248#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
249typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000250#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200251typedef short yytype_uint8;
252#endif
253
254#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
255typedef __UINT_LEAST16_TYPE__ yytype_uint16;
256#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
257 && UINT_LEAST16_MAX <= INT_MAX)
258typedef uint_least16_t yytype_uint16;
259#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
260typedef unsigned short yytype_uint16;
261#else
262typedef int yytype_uint16;
263#endif
264
265#ifndef YYPTRDIFF_T
266# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
267# define YYPTRDIFF_T __PTRDIFF_TYPE__
268# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
269# elif defined PTRDIFF_MAX
270# ifndef ptrdiff_t
271# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
272# endif
273# define YYPTRDIFF_T ptrdiff_t
274# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
275# else
276# define YYPTRDIFF_T long
277# define YYPTRDIFF_MAXIMUM LONG_MAX
278# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000279#endif
280
281#ifndef YYSIZE_T
282# ifdef __SIZE_TYPE__
283# define YYSIZE_T __SIZE_TYPE__
284# elif defined size_t
285# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200286# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000287# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
288# define YYSIZE_T size_t
289# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200290# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000291# endif
292#endif
293
Nico Huberd9b2f792020-04-28 16:28:03 +0200294#define YYSIZE_MAXIMUM \
295 YY_CAST (YYPTRDIFF_T, \
296 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
297 ? YYPTRDIFF_MAXIMUM \
298 : YY_CAST (YYSIZE_T, -1)))
299
300#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
301
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700302
Nico Huberd9b2f792020-04-28 16:28:03 +0200303/* Stored state numbers (used for stacks). */
304typedef yytype_int8 yy_state_t;
305
306/* State numbers in computations. */
307typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000308
309#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200310# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000311# if ENABLE_NLS
312# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700313# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000314# endif
315# endif
316# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700317# define YY_(Msgid) Msgid
318# endif
319#endif
320
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700321
Nico Huberd9b2f792020-04-28 16:28:03 +0200322#ifndef YY_ATTRIBUTE_PURE
323# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
324# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700325# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200326# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700327# endif
328#endif
329
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700330#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200331# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
332# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700333# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200334# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000335# endif
336#endif
337
338/* Suppress unused-variable warnings by "using" E. */
339#if ! defined lint || defined __GNUC__
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600340# define YY_USE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000341#else
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600342# define YY_USE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000343#endif
344
Nico Huberd9b2f792020-04-28 16:28:03 +0200345#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700346/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200347# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
348 _Pragma ("GCC diagnostic push") \
349 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700350 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Nico Huberd9b2f792020-04-28 16:28:03 +0200351# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700352 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000353#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700354# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000355#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700356#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
357# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
358# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000359#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700360#ifndef YY_INITIAL_VALUE
361# define YY_INITIAL_VALUE(Value) /* Nothing. */
362#endif
363
Nico Huberd9b2f792020-04-28 16:28:03 +0200364#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
365# define YY_IGNORE_USELESS_CAST_BEGIN \
366 _Pragma ("GCC diagnostic push") \
367 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
368# define YY_IGNORE_USELESS_CAST_END \
369 _Pragma ("GCC diagnostic pop")
370#endif
371#ifndef YY_IGNORE_USELESS_CAST_BEGIN
372# define YY_IGNORE_USELESS_CAST_BEGIN
373# define YY_IGNORE_USELESS_CAST_END
374#endif
375
376
377#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000378
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700379#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000380
381/* The parser invokes alloca or malloc; define the necessary symbols. */
382
383# ifdef YYSTACK_USE_ALLOCA
384# if YYSTACK_USE_ALLOCA
385# ifdef __GNUC__
386# define YYSTACK_ALLOC __builtin_alloca
387# elif defined __BUILTIN_VA_ARG_INCR
388# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
389# elif defined _AIX
390# define YYSTACK_ALLOC __alloca
391# elif defined _MSC_VER
392# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
393# define alloca _alloca
394# else
395# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700396# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000397# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700398 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200399# ifndef EXIT_SUCCESS
400# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000401# endif
402# endif
403# endif
404# endif
405# endif
406
407# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700408 /* Pacify GCC's 'empty if-body' warning. */
409# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000410# ifndef YYSTACK_ALLOC_MAXIMUM
411 /* The OS might guarantee only one guard page at the bottom of the stack,
412 and a page size can be as small as 4096 bytes. So we cannot safely
413 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
414 to allow for a few compiler-allocated temporary stack slots. */
415# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
416# endif
417# else
418# define YYSTACK_ALLOC YYMALLOC
419# define YYSTACK_FREE YYFREE
420# ifndef YYSTACK_ALLOC_MAXIMUM
421# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
422# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200423# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000424 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700425 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000426# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200427# ifndef EXIT_SUCCESS
428# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000429# endif
430# endif
431# ifndef YYMALLOC
432# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700433# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000434void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
435# endif
436# endif
437# ifndef YYFREE
438# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700439# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000440void free (void *); /* INFRINGES ON USER NAME SPACE */
441# endif
442# endif
443# endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700444#endif /* !defined yyoverflow */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000445
446#if (! defined yyoverflow \
447 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700448 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000449
450/* A type that is properly aligned for any stack member. */
451union yyalloc
452{
Nico Huberd9b2f792020-04-28 16:28:03 +0200453 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000454 YYSTYPE yyvs_alloc;
455};
456
457/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200458# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000459
460/* The size of an array large to enough to hold all stacks, each with
461 N elements. */
462# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200463 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000464 + YYSTACK_GAP_MAXIMUM)
465
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200466# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000467
468/* Relocate STACK from its old location to the new one. The
469 local variables YYSIZE and YYSTACKSIZE give the old and new number of
470 elements in the stack, and YYPTR gives the new location of the
471 stack. Advance YYPTR to a properly aligned location for the next
472 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700473# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
474 do \
475 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200476 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700477 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
478 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200479 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
480 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700481 } \
482 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000483
484#endif
485
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200486#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700487/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200488 not overlap. */
489# ifndef YYCOPY
490# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700491# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200492 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200493# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700494# define YYCOPY(Dst, Src, Count) \
495 do \
496 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200497 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700498 for (yyi = 0; yyi < (Count); yyi++) \
499 (Dst)[yyi] = (Src)[yyi]; \
500 } \
501 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200502# endif
503# endif
504#endif /* !YYCOPY_NEEDED */
505
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000506/* YYFINAL -- State number of the termination state. */
Duncan Laurie47b7b342020-05-15 15:39:08 -0700507#define YYFINAL 2
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000508/* YYLAST -- Last index in YYTABLE. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600509#define YYLAST 83
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000510
511/* YYNTOKENS -- Number of terminals. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600512#define YYNTOKENS 47
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000513/* YYNNTS -- Number of nonterminals. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600514#define YYNNTS 28
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000515/* YYNRULES -- Number of rules. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600516#define YYNRULES 53
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700517/* YYNSTATES -- Number of states. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600518#define YYNSTATES 95
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000519
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100520/* YYMAXUTOK -- Last valid token kind. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600521#define YYMAXUTOK 301
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000522
Nico Huberd9b2f792020-04-28 16:28:03 +0200523
524/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
525 as returned by yylex, with out-of-bounds checking. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700526#define YYTRANSLATE(YYX) \
527 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
528 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
529 : YYSYMBOL_YYUNDEF)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000530
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700531/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200532 as returned by yylex. */
533static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000534{
535 0, 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, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
561 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200562 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000563 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100564 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600565 45, 46
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{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600572 0, 26, 26, 26, 26, 28, 28, 28, 28, 28,
573 30, 30, 30, 30, 30, 30, 30, 30, 30, 32,
574 32, 41, 41, 49, 49, 57, 59, 63, 63, 65,
575 68, 71, 74, 77, 80, 83, 86, 89, 93, 96,
576 96, 99, 99, 102, 108, 108, 111, 110, 115, 115,
577 123, 123, 129, 133
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",
598 "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "LPC", "ESPI",
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100599 "GPIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600600 "FW_CONFIG_PROBE", "PIPE", "$accept", "devtree", "chipchildren",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700601 "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status",
602 "resource", "reference", "registers", "subsystemid", "ioapic_irq",
603 "smbios_slot_desc", "fw_config_table", "fw_config_table_children",
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600604 "fw_config_field_children", "fw_config_field_bits",
605 "fw_config_field_bits_repeating", "fw_config_field", "$@4", "$@5", "$@6",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700606 "fw_config_option", "fw_config_probe", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000607};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700608
609static const char *
610yysymbol_name (yysymbol_kind_t yysymbol)
611{
612 return yytname[yysymbol];
613}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000614#endif
615
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700616#ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700617/* YYTOKNUM[NUM] -- (External) token number corresponding to the
618 (internal) symbol number NUM (which must be that of a token). */
Nico Huberd9b2f792020-04-28 16:28:03 +0200619static const yytype_int16 yytoknum[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000620{
621 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
622 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800623 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Duncan Laurie47b7b342020-05-15 15:39:08 -0700624 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600625 295, 296, 297, 298, 299, 300, 301
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000626};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700627#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000628
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600629#define YYPACT_NINF (-21)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700630
Nico Huberd9b2f792020-04-28 16:28:03 +0200631#define yypact_value_is_default(Yyn) \
632 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700633
Nico Huberd9b2f792020-04-28 16:28:03 +0200634#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700635
Nico Huberd9b2f792020-04-28 16:28:03 +0200636#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700637 0
638
639 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
640 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000641static const yytype_int8 yypact[] =
642{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600643 -21, 9, -21, 2, -21, -21, -21, -21, -11, -21,
644 -21, 8, -21, 45, -13, 10, 18, 19, -21, -21,
645 -21, -21, -21, 12, -20, -21, 22, 15, 25, 37,
646 -21, -21, 24, -21, -7, 11, 41, 38, 39, -6,
647 12, -20, -21, -21, 40, -21, -21, -21, -21, 43,
648 11, -21, -21, -21, -21, -1, 29, -21, -21, -21,
649 -21, -21, -3, -21, 32, -21, 46, 33, 35, 48,
650 -21, -21, -21, -21, -21, -21, -21, -21, 1, 51,
651 50, 42, 20, 52, -21, 44, 53, 47, 54, -21,
652 -21, 55, -21, -21, -21
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000653};
654
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700655 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
656 Performed when YYTABLE does not specify something else to do. Zero
657 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200658static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700659{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700660 2, 0, 1, 0, 40, 3, 4, 19, 0, 9,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600661 38, 0, 39, 0, 50, 0, 0, 0, 20, 6,
662 5, 8, 7, 48, 45, 42, 0, 0, 0, 0,
663 43, 42, 0, 46, 0, 0, 25, 0, 0, 0,
664 0, 45, 42, 51, 0, 41, 27, 28, 23, 0,
665 0, 31, 30, 49, 44, 0, 0, 18, 26, 21,
666 47, 52, 0, 18, 0, 24, 0, 0, 0, 0,
667 11, 10, 12, 16, 13, 14, 15, 17, 0, 0,
668 0, 0, 0, 0, 22, 0, 37, 32, 0, 53,
669 29, 36, 33, 34, 35
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700670};
671
672 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000673static const yytype_int8 yypgoto[] =
674{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600675 -21, -21, -21, 5, 17, -21, 61, -21, -21, -21,
676 26, -21, -21, 62, -21, -21, -21, -21, -21, -8,
677 49, 36, -21, -21, -21, -21, -21, -21
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000678};
679
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700680 /* YYDEFGOTO[NTERM-NUM]. */
681static const yytype_int8 yydefgoto[] =
682{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600683 0, 1, 13, 62, 70, 9, 71, 63, 57, 50,
684 48, 72, 21, 73, 74, 75, 76, 6, 8, 34,
685 24, 33, 12, 42, 31, 25, 45, 77
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700686};
687
688 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
689 positive, shift that token. If negative, reduce the rule whose
690 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200691static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000692{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600693 3, 15, 16, 10, 3, 15, 16, 43, 53, 2,
694 64, 65, 3, 60, 64, 84, 23, 26, 5, 7,
695 46, 47, 27, 39, 66, 14, 32, 67, 66, 68,
696 19, 67, 11, 68, 55, 28, 29, 44, 44, 35,
697 37, 30, 69, 44, 36, 38, 69, 49, 3, 15,
698 16, 4, 17, 40, 88, 51, 52, 56, 61, 18,
699 58, 79, 81, 80, 82, 83, 85, 86, 78, 89,
700 91, 87, 94, 90, 20, 22, 59, 54, 92, 0,
701 0, 41, 0, 93
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000702};
703
Patrick Georgi8f625f62010-05-05 13:13:47 +0000704static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000705{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700706 3, 4, 5, 14, 3, 4, 5, 14, 14, 0,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600707 13, 14, 3, 14, 13, 14, 29, 7, 1, 17,
708 9, 10, 12, 31, 27, 17, 46, 30, 27, 32,
709 13, 30, 43, 32, 42, 17, 17, 44, 44, 17,
710 15, 29, 45, 44, 29, 8, 45, 6, 3, 4,
711 5, 42, 7, 29, 34, 17, 17, 17, 29, 14,
712 17, 29, 29, 17, 29, 17, 15, 17, 63, 17,
713 17, 29, 17, 29, 13, 13, 50, 41, 31, -1,
714 -1, 32, -1, 29
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000715};
716
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700717 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
718 symbol of state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200719static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000720{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600721 0, 48, 0, 3, 42, 51, 64, 17, 65, 52,
722 14, 43, 69, 49, 17, 4, 5, 7, 14, 51,
723 53, 59, 60, 29, 67, 72, 7, 12, 17, 17,
724 29, 71, 46, 68, 66, 17, 29, 15, 8, 66,
725 29, 67, 70, 14, 44, 73, 9, 10, 57, 6,
726 56, 17, 17, 14, 68, 66, 17, 55, 17, 57,
727 14, 29, 50, 54, 13, 14, 27, 30, 32, 45,
728 51, 53, 58, 60, 61, 62, 63, 74, 50, 29,
729 17, 29, 29, 17, 14, 15, 17, 29, 34, 17,
730 29, 17, 31, 29, 17
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000731};
732
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700733 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200734static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700735{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600736 0, 47, 48, 48, 48, 49, 49, 49, 49, 49,
737 50, 50, 50, 50, 50, 50, 50, 50, 50, 52,
738 51, 54, 53, 55, 53, 56, 56, 57, 57, 58,
739 59, 60, 61, 61, 62, 63, 63, 63, 64, 65,
740 65, 66, 66, 67, 68, 68, 70, 69, 71, 69,
741 72, 69, 73, 74
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700742};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000743
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700744 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200745static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700746{
Nico Huber8e1ea522020-06-03 10:20:07 -0700747 0, 2, 0, 2, 2, 2, 2, 2, 2, 0,
748 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700749 5, 0, 8, 0, 7, 0, 2, 1, 1, 4,
750 4, 4, 3, 4, 4, 5, 4, 3, 3, 2,
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600751 0, 2, 0, 2, 3, 0, 0, 7, 0, 6,
752 0, 5, 3, 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700753};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000754
755
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700756enum { YYENOMEM = -2 };
757
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700758#define yyerrok (yyerrstatus = 0)
759#define yyclearin (yychar = YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000760
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700761#define YYACCEPT goto yyacceptlab
762#define YYABORT goto yyabortlab
763#define YYERROR goto yyerrorlab
764
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000765
766#define YYRECOVERING() (!!yyerrstatus)
767
Nico Huberd9b2f792020-04-28 16:28:03 +0200768#define YYBACKUP(Token, Value) \
769 do \
770 if (yychar == YYEMPTY) \
771 { \
772 yychar = (Token); \
773 yylval = (Value); \
774 YYPOPSTACK (yylen); \
775 yystate = *yyssp; \
776 goto yybackup; \
777 } \
778 else \
779 { \
780 yyerror (YY_("syntax error: cannot back up")); \
781 YYERROR; \
782 } \
783 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700784
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700785/* Backward compatibility with an undocumented macro.
786 Use YYerror or YYUNDEF. */
787#define YYERRCODE YYUNDEF
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000788
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000789
790/* Enable debugging if requested. */
791#if YYDEBUG
792
793# ifndef YYFPRINTF
794# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
795# define YYFPRINTF fprintf
796# endif
797
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700798# define YYDPRINTF(Args) \
799do { \
800 if (yydebug) \
801 YYFPRINTF Args; \
802} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000803
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700804/* This macro is provided for backward compatibility. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700805# ifndef YY_LOCATION_PRINT
806# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
807# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000808
809
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700810# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700811do { \
812 if (yydebug) \
813 { \
814 YYFPRINTF (stderr, "%s ", Title); \
815 yy_symbol_print (stderr, \
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700816 Kind, Value); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700817 YYFPRINTF (stderr, "\n"); \
818 } \
819} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000820
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700821
Nico Huberd9b2f792020-04-28 16:28:03 +0200822/*-----------------------------------.
823| Print this symbol's value on YYO. |
824`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700825
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000826static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700827yy_symbol_value_print (FILE *yyo,
828 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000829{
Nico Huberd9b2f792020-04-28 16:28:03 +0200830 FILE *yyoutput = yyo;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600831 YY_USE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000832 if (!yyvaluep)
833 return;
834# ifdef YYPRINT
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700835 if (yykind < YYNTOKENS)
836 YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000837# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200838 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600839 YY_USE (yykind);
Nico Huberd9b2f792020-04-28 16:28:03 +0200840 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000841}
842
843
Nico Huberd9b2f792020-04-28 16:28:03 +0200844/*---------------------------.
845| Print this symbol on YYO. |
846`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000847
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000848static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700849yy_symbol_print (FILE *yyo,
850 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000851{
Nico Huberd9b2f792020-04-28 16:28:03 +0200852 YYFPRINTF (yyo, "%s %s (",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700853 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000854
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700855 yy_symbol_value_print (yyo, yykind, yyvaluep);
Nico Huberd9b2f792020-04-28 16:28:03 +0200856 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000857}
858
859/*------------------------------------------------------------------.
860| yy_stack_print -- Print the state stack from its BOTTOM up to its |
861| TOP (included). |
862`------------------------------------------------------------------*/
863
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000864static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200865yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000866{
867 YYFPRINTF (stderr, "Stack now");
868 for (; yybottom <= yytop; yybottom++)
869 {
870 int yybot = *yybottom;
871 YYFPRINTF (stderr, " %d", yybot);
872 }
873 YYFPRINTF (stderr, "\n");
874}
875
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700876# define YY_STACK_PRINT(Bottom, Top) \
877do { \
878 if (yydebug) \
879 yy_stack_print ((Bottom), (Top)); \
880} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000881
882
883/*------------------------------------------------.
884| Report that the YYRULE is going to be reduced. |
885`------------------------------------------------*/
886
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000887static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700888yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
889 int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000890{
Nico Huberd9b2f792020-04-28 16:28:03 +0200891 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000892 int yynrhs = yyr2[yyrule];
893 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200894 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700895 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000896 /* The symbols being reduced. */
897 for (yyi = 0; yyi < yynrhs; yyi++)
898 {
899 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700900 yy_symbol_print (stderr,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700901 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
902 &yyvsp[(yyi + 1) - (yynrhs)]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000903 YYFPRINTF (stderr, "\n");
904 }
905}
906
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700907# define YY_REDUCE_PRINT(Rule) \
908do { \
909 if (yydebug) \
910 yy_reduce_print (yyssp, yyvsp, Rule); \
911} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000912
913/* Nonzero means print parse trace. It is left uninitialized so that
914 multiple parsers can coexist. */
915int yydebug;
916#else /* !YYDEBUG */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700917# define YYDPRINTF(Args) ((void) 0)
918# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000919# define YY_STACK_PRINT(Bottom, Top)
920# define YY_REDUCE_PRINT(Rule)
921#endif /* !YYDEBUG */
922
923
924/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700925#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000926# define YYINITDEPTH 200
927#endif
928
929/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
930 if the built-in stack extension method is used).
931
932 Do not make this value too large; the results are undefined if
933 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
934 evaluated with infinite-precision integer arithmetic. */
935
936#ifndef YYMAXDEPTH
937# define YYMAXDEPTH 10000
938#endif
939
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
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000944
945/*-----------------------------------------------.
946| Release the memory associated to this symbol. |
947`-----------------------------------------------*/
948
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000949static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700950yydestruct (const char *yymsg,
951 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000952{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600953 YY_USE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000954 if (!yymsg)
955 yymsg = "Deleting";
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700956 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000957
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700958 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600959 YY_USE (yykind);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700960 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000961}
962
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200963
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100964/* Lookahead token kind. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000965int yychar;
966
967/* The semantic value of the lookahead symbol. */
968YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000969/* Number of syntax errors so far. */
970int yynerrs;
971
972
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700973
974
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200975/*----------.
976| yyparse. |
977`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000978
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000979int
980yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000981{
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100982 yy_state_fast_t yystate = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000983 /* Number of tokens to shift before error messages enabled. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100984 int yyerrstatus = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000985
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100986 /* Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000987 to reallocate them elsewhere. */
988
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700989 /* Their size. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100990 YYPTRDIFF_T yystacksize = YYINITDEPTH;
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700991
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100992 /* The state stack: array, bottom, top. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200993 yy_state_t yyssa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100994 yy_state_t *yyss = yyssa;
995 yy_state_t *yyssp = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000996
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100997 /* The semantic value stack: array, bottom, top. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000998 YYSTYPE yyvsa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100999 YYSTYPE *yyvs = yyvsa;
1000 YYSTYPE *yyvsp = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001001
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001002 int yyn;
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001003 /* The return value of yyparse. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001004 int yyresult;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001005 /* Lookahead symbol kind. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001006 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001007 /* The variables used to return semantic value and location from the
1008 action routines. */
1009 YYSTYPE yyval;
1010
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001011
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001012
1013#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1014
1015 /* The number of symbols on the RHS of the reduced rule.
1016 Keep to zero when no symbol should be popped. */
1017 int yylen = 0;
1018
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001019 YYDPRINTF ((stderr, "Starting parse\n"));
1020
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001021 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001022 goto yysetstate;
1023
Nico Huberd9b2f792020-04-28 16:28:03 +02001024
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001025/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001026| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001027`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001028yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001029 /* In all cases, when you get here, the value and location stacks
1030 have just been pushed. So pushing a state here evens the stacks. */
1031 yyssp++;
1032
Nico Huberd9b2f792020-04-28 16:28:03 +02001033
1034/*--------------------------------------------------------------------.
1035| yysetstate -- set current state (the top of the stack) to yystate. |
1036`--------------------------------------------------------------------*/
1037yysetstate:
1038 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1039 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1040 YY_IGNORE_USELESS_CAST_BEGIN
1041 *yyssp = YY_CAST (yy_state_t, yystate);
1042 YY_IGNORE_USELESS_CAST_END
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001043 YY_STACK_PRINT (yyss, yyssp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001044
1045 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001046#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1047 goto yyexhaustedlab;
1048#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001049 {
1050 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001051 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001052
Nico Huberd9b2f792020-04-28 16:28:03 +02001053# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001054 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001055 /* Give user a chance to reallocate the stack. Use copies of
1056 these so that the &'s don't force the real ones into
1057 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001058 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001059 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001060
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001061 /* Each stack pointer address is followed by the size of the
1062 data in use in that stack, in bytes. This used to be a
1063 conditional around just the two extra args, but that might
1064 be undefined if yyoverflow is a macro. */
1065 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001066 &yyss1, yysize * YYSIZEOF (*yyssp),
1067 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001068 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001069 yyss = yyss1;
1070 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001071 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001072# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001073 /* Extend the stack our own way. */
1074 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001075 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001076 yystacksize *= 2;
1077 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001078 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001079
1080 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001081 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001082 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001083 YY_CAST (union yyalloc *,
1084 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001085 if (! yyptr)
1086 goto yyexhaustedlab;
1087 YYSTACK_RELOCATE (yyss_alloc, yyss);
1088 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001089# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001090 if (yyss1 != yyssa)
1091 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001092 }
1093# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001094
1095 yyssp = yyss + yysize - 1;
1096 yyvsp = yyvs + yysize - 1;
1097
Nico Huberd9b2f792020-04-28 16:28:03 +02001098 YY_IGNORE_USELESS_CAST_BEGIN
1099 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1100 YY_CAST (long, yystacksize)));
1101 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001102
1103 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001104 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001105 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001106#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001107
1108 if (yystate == YYFINAL)
1109 YYACCEPT;
1110
1111 goto yybackup;
1112
Nico Huberd9b2f792020-04-28 16:28:03 +02001113
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001114/*-----------.
1115| yybackup. |
1116`-----------*/
1117yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001118 /* Do appropriate processing given the current state. Read a
1119 lookahead token if we need one and don't already have one. */
1120
1121 /* First try to decide what to do without reference to lookahead token. */
1122 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001123 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001124 goto yydefault;
1125
1126 /* Not known => get a lookahead token if don't already have one. */
1127
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001128 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001129 if (yychar == YYEMPTY)
1130 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001131 YYDPRINTF ((stderr, "Reading a token\n"));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001132 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001133 }
1134
1135 if (yychar <= YYEOF)
1136 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001137 yychar = YYEOF;
1138 yytoken = YYSYMBOL_YYEOF;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001139 YYDPRINTF ((stderr, "Now at end of input.\n"));
1140 }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001141 else if (yychar == YYerror)
1142 {
1143 /* The scanner already issued an error message, process directly
1144 to error recovery. But do not keep the error token as
1145 lookahead, it is too special and may lead us to an endless
1146 loop in error recovery. */
1147 yychar = YYUNDEF;
1148 yytoken = YYSYMBOL_YYerror;
1149 goto yyerrlab1;
1150 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001151 else
1152 {
1153 yytoken = YYTRANSLATE (yychar);
1154 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1155 }
1156
1157 /* If the proper action on seeing token YYTOKEN is to reduce or to
1158 detect an error, take that action. */
1159 yyn += yytoken;
1160 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1161 goto yydefault;
1162 yyn = yytable[yyn];
1163 if (yyn <= 0)
1164 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001165 if (yytable_value_is_error (yyn))
1166 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001167 yyn = -yyn;
1168 goto yyreduce;
1169 }
1170
1171 /* Count tokens shifted since error; after three, turn off error
1172 status. */
1173 if (yyerrstatus)
1174 yyerrstatus--;
1175
1176 /* Shift the lookahead token. */
1177 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001178 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001179 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001180 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001181 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001182
Nico Huberd9b2f792020-04-28 16:28:03 +02001183 /* Discard the shifted token. */
1184 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001185 goto yynewstate;
1186
1187
1188/*-----------------------------------------------------------.
1189| yydefault -- do the default action for the current state. |
1190`-----------------------------------------------------------*/
1191yydefault:
1192 yyn = yydefact[yystate];
1193 if (yyn == 0)
1194 goto yyerrlab;
1195 goto yyreduce;
1196
1197
1198/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001199| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001200`-----------------------------*/
1201yyreduce:
1202 /* yyn is the number of a rule to reduce with. */
1203 yylen = yyr2[yyn];
1204
1205 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001206 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001207
1208 Otherwise, the following line sets YYVAL to garbage.
1209 This behavior is undocumented and Bison
1210 users should not rely upon it. Assigning to YYVAL
1211 unconditionally makes the parser a bit smaller, and it avoids a
1212 GCC warning that YYVAL may be used uninitialized. */
1213 yyval = yyvsp[1-yylen];
1214
1215
1216 YY_REDUCE_PRINT (yyn);
1217 switch (yyn)
1218 {
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001219 case 2: /* devtree: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001220 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001221 break;
1222
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001223 case 19: /* @1: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001224 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001225 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1226 chip_enqueue_tail(cur_chip_instance);
1227 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001228}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001229 break;
1230
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001231 case 20: /* chip: CHIP STRING @1 chipchildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001232 {
1233 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001234}
1235 break;
1236
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001237 case 21: /* @2: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001238 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001239 (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 +02001240 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001241}
Patrick Georgi68befd52010-05-05 12:05:25 +00001242 break;
1243
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001244 case 22: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001245 {
1246 cur_parent = (yyvsp[-2].dev)->parent;
1247}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001248 break;
1249
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001250 case 23: /* @3: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001251 {
1252 (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1253 cur_parent = (yyval.dev)->last_bus;
1254}
1255 break;
1256
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001257 case 24: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001258 {
1259 cur_parent = (yyvsp[-2].dev)->parent;
1260}
1261 break;
1262
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001263 case 25: /* alias: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001264 {
1265 (yyval.string) = NULL;
1266}
1267 break;
1268
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001269 case 26: /* alias: ALIAS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001270 {
1271 (yyval.string) = (yyvsp[0].string);
1272}
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001273 break;
1274
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001275 case 29: /* resource: RESOURCE NUMBER EQUALS NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001276 { 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 +00001277 break;
1278
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001279 case 30: /* reference: REFERENCE STRING ASSOCIATION STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001280 { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001281 break;
1282
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001283 case 31: /* registers: REGISTER STRING EQUALS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001284 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001285 break;
1286
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001287 case 32: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001288 { 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 +02001289 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001290
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001291 case 33: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
Nico Huber8e1ea522020-06-03 10:20:07 -07001292 { 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 +02001293 break;
1294
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001295 case 34: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001296 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1297 break;
1298
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001299 case 35: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001300 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1301 break;
1302
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001303 case 36: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001304 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1305 break;
1306
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001307 case 37: /* smbios_slot_desc: SLOT_DESC STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001308 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1309 break;
1310
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001311 case 38: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001312 { }
1313 break;
1314
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001315 case 43: /* fw_config_field_bits: NUMBER NUMBER */
1316{
1317 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 -07001318}
1319 break;
1320
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001321 case 46: /* $@4: %empty */
1322 { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
Nico Huber8e1ea522020-06-03 10:20:07 -07001323 break;
1324
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001325 case 47: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */
1326 { cur_bits = NULL; }
1327 break;
1328
1329 case 48: /* $@5: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001330 {
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001331 cur_bits = NULL;
1332 append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1333 cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits);
Nico Huber8e1ea522020-06-03 10:20:07 -07001334}
1335 break;
1336
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001337 case 49: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
1338 { cur_bits = NULL; }
Nico Huber8e1ea522020-06-03 10:20:07 -07001339 break;
1340
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001341 case 50: /* $@6: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001342 {
1343 cur_field = get_fw_config_field((yyvsp[0].string));
1344}
Nico Huber8e1ea522020-06-03 10:20:07 -07001345 break;
1346
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001347 case 51: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
1348 { cur_bits = NULL; }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001349 break;
1350
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001351 case 52: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001352 { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001353 break;
1354
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001355 case 53: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001356 { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1357 break;
1358
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001359
1360
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001361 default: break;
1362 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001363 /* User semantic actions sometimes alter yychar, and that requires
1364 that yytoken be updated with the new translation. We take the
1365 approach of translating immediately before every use of yytoken.
1366 One alternative is translating here after every semantic action,
1367 but that translation would be missed if the semantic action invokes
1368 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1369 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1370 incorrect destructor might then be invoked immediately. In the
1371 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1372 to an incorrect destructor call or verbose syntax error message
1373 before the lookahead is translated. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001374 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001375
1376 YYPOPSTACK (yylen);
1377 yylen = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001378
1379 *++yyvsp = yyval;
1380
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001381 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001382 that goes to, based on the state we popped back to and the rule
1383 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001384 {
1385 const int yylhs = yyr1[yyn] - YYNTOKENS;
1386 const int yyi = yypgoto[yylhs] + *yyssp;
1387 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1388 ? yytable[yyi]
1389 : yydefgoto[yylhs]);
1390 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001391
1392 goto yynewstate;
1393
1394
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001395/*--------------------------------------.
1396| yyerrlab -- here on detecting error. |
1397`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001398yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001399 /* Make sure we have latest lookahead translation. See comments at
1400 user semantic actions for why this is necessary. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001401 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001402 /* If not already recovering from an error, report this error. */
1403 if (!yyerrstatus)
1404 {
1405 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001406 yyerror (YY_("syntax error"));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001407 }
1408
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001409 if (yyerrstatus == 3)
1410 {
1411 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001412 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001413
1414 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001415 {
1416 /* Return failure if at end of input. */
1417 if (yychar == YYEOF)
1418 YYABORT;
1419 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001420 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001421 {
1422 yydestruct ("Error: discarding",
1423 yytoken, &yylval);
1424 yychar = YYEMPTY;
1425 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001426 }
1427
1428 /* Else will try to reuse lookahead token after shifting the error
1429 token. */
1430 goto yyerrlab1;
1431
1432
1433/*---------------------------------------------------.
1434| yyerrorlab -- error raised explicitly by YYERROR. |
1435`---------------------------------------------------*/
1436yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001437 /* Pacify compilers when the user code never invokes YYERROR and the
1438 label yyerrorlab therefore never appears in user code. */
1439 if (0)
1440 YYERROR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001441
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001442 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001443 this YYERROR. */
1444 YYPOPSTACK (yylen);
1445 yylen = 0;
1446 YY_STACK_PRINT (yyss, yyssp);
1447 yystate = *yyssp;
1448 goto yyerrlab1;
1449
1450
1451/*-------------------------------------------------------------.
1452| yyerrlab1 -- common code for both syntax error and YYERROR. |
1453`-------------------------------------------------------------*/
1454yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001455 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001456
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001457 /* Pop stack until we find a state that shifts the error token. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001458 for (;;)
1459 {
1460 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001461 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001462 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001463 yyn += YYSYMBOL_YYerror;
1464 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001465 {
1466 yyn = yytable[yyn];
1467 if (0 < yyn)
1468 break;
1469 }
1470 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001471
1472 /* Pop the current state because it cannot handle the error token. */
1473 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001474 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001475
1476
1477 yydestruct ("Error: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001478 YY_ACCESSING_SYMBOL (yystate), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001479 YYPOPSTACK (1);
1480 yystate = *yyssp;
1481 YY_STACK_PRINT (yyss, yyssp);
1482 }
1483
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001484 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001485 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001486 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001487
1488
1489 /* Shift the error token. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001490 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001491
1492 yystate = yyn;
1493 goto yynewstate;
1494
1495
1496/*-------------------------------------.
1497| yyacceptlab -- YYACCEPT comes here. |
1498`-------------------------------------*/
1499yyacceptlab:
1500 yyresult = 0;
1501 goto yyreturn;
1502
Nico Huberd9b2f792020-04-28 16:28:03 +02001503
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001504/*-----------------------------------.
1505| yyabortlab -- YYABORT comes here. |
1506`-----------------------------------*/
1507yyabortlab:
1508 yyresult = 1;
1509 goto yyreturn;
1510
Nico Huberd9b2f792020-04-28 16:28:03 +02001511
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001512#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001513/*-------------------------------------------------.
1514| yyexhaustedlab -- memory exhaustion comes here. |
1515`-------------------------------------------------*/
1516yyexhaustedlab:
1517 yyerror (YY_("memory exhausted"));
1518 yyresult = 2;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001519 goto yyreturn;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001520#endif
1521
Nico Huberd9b2f792020-04-28 16:28:03 +02001522
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001523/*-------------------------------------------------------.
1524| yyreturn -- parsing is finished, clean up and return. |
1525`-------------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001526yyreturn:
1527 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001528 {
1529 /* Make sure we have latest lookahead translation. See comments at
1530 user semantic actions for why this is necessary. */
1531 yytoken = YYTRANSLATE (yychar);
1532 yydestruct ("Cleanup: discarding lookahead",
1533 yytoken, &yylval);
1534 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001535 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001536 this YYABORT or YYACCEPT. */
1537 YYPOPSTACK (yylen);
1538 YY_STACK_PRINT (yyss, yyssp);
1539 while (yyssp != yyss)
1540 {
1541 yydestruct ("Cleanup: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001542 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001543 YYPOPSTACK (1);
1544 }
1545#ifndef yyoverflow
1546 if (yyss != yyssa)
1547 YYSTACK_FREE (yyss);
1548#endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001549
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001550 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001551}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001552
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001553