blob: 3df31a721b9bad1053f9092f8903d96652d13312 [file] [log] [blame]
Nico Huberc0fc38e2022-08-06 19:02:59 +02001/* A Bison parser, made by GNU Bison 3.8.2. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00002
Sven Schnelle0fa50a12012-06-21 22:19:48 +02003/* Bison implementation for Yacc-like parsers in C
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07004
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06005 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Nico Huberd9b2f792020-04-28 16:28:03 +02006 Inc.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07007
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00008 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070012
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000013 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070017
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000018 You should have received a copy of the GNU General Public License
Nico Huber859ecdf2021-02-28 16:18:18 +010019 along with this program. If not, see <https://www.gnu.org/licenses/>. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000020
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070030
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000031 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
Duncan Lauriee335c2e2020-07-29 16:28:43 -070037/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
40
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000041/* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
47
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060048/* Identify Bison output, and Bison version. */
Nico Huberc0fc38e2022-08-06 19:02:59 +020049#define YYBISON 30802
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000050
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060051/* Bison version string. */
Nico Huberc0fc38e2022-08-06 19:02:59 +020052#define YYBISON_VERSION "3.8.2"
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 */
Angel Pons437da712021-09-03 16:51:40 +0200141 YYSYMBOL_SMBIOS_DEV_INFO = 28, /* SMBIOS_DEV_INFO */
142 YYSYMBOL_IO = 29, /* IO */
143 YYSYMBOL_NUMBER = 30, /* NUMBER */
144 YYSYMBOL_SUBSYSTEMID = 31, /* SUBSYSTEMID */
145 YYSYMBOL_INHERIT = 32, /* INHERIT */
146 YYSYMBOL_IOAPIC_IRQ = 33, /* IOAPIC_IRQ */
147 YYSYMBOL_IOAPIC = 34, /* IOAPIC */
148 YYSYMBOL_PCIINT = 35, /* PCIINT */
149 YYSYMBOL_GENERIC = 36, /* GENERIC */
150 YYSYMBOL_SPI = 37, /* SPI */
151 YYSYMBOL_USB = 38, /* USB */
152 YYSYMBOL_MMIO = 39, /* MMIO */
153 YYSYMBOL_GPIO = 40, /* GPIO */
154 YYSYMBOL_FW_CONFIG_TABLE = 41, /* FW_CONFIG_TABLE */
155 YYSYMBOL_FW_CONFIG_FIELD = 42, /* FW_CONFIG_FIELD */
156 YYSYMBOL_FW_CONFIG_OPTION = 43, /* FW_CONFIG_OPTION */
157 YYSYMBOL_FW_CONFIG_PROBE = 44, /* FW_CONFIG_PROBE */
158 YYSYMBOL_PIPE = 45, /* PIPE */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200159 YYSYMBOL_OPS = 46, /* OPS */
160 YYSYMBOL_YYACCEPT = 47, /* $accept */
161 YYSYMBOL_devtree = 48, /* devtree */
162 YYSYMBOL_chipchild_nondev = 49, /* chipchild_nondev */
163 YYSYMBOL_chipchild = 50, /* chipchild */
164 YYSYMBOL_chipchildren = 51, /* chipchildren */
165 YYSYMBOL_chipchildren_dev = 52, /* chipchildren_dev */
166 YYSYMBOL_devicechildren = 53, /* devicechildren */
167 YYSYMBOL_chip = 54, /* chip */
168 YYSYMBOL_55_1 = 55, /* @1 */
169 YYSYMBOL_device = 56, /* device */
170 YYSYMBOL_57_2 = 57, /* @2 */
171 YYSYMBOL_58_3 = 58, /* @3 */
172 YYSYMBOL_alias = 59, /* alias */
173 YYSYMBOL_status = 60, /* status */
174 YYSYMBOL_resource = 61, /* resource */
175 YYSYMBOL_reference = 62, /* reference */
176 YYSYMBOL_registers = 63, /* registers */
177 YYSYMBOL_subsystemid = 64, /* subsystemid */
178 YYSYMBOL_ioapic_irq = 65, /* ioapic_irq */
179 YYSYMBOL_smbios_slot_desc = 66, /* smbios_slot_desc */
180 YYSYMBOL_smbios_dev_info = 67, /* smbios_dev_info */
181 YYSYMBOL_fw_config_table = 68, /* fw_config_table */
182 YYSYMBOL_fw_config_table_children = 69, /* fw_config_table_children */
183 YYSYMBOL_fw_config_field_children = 70, /* fw_config_field_children */
184 YYSYMBOL_fw_config_field_bits = 71, /* fw_config_field_bits */
185 YYSYMBOL_fw_config_field_bits_repeating = 72, /* fw_config_field_bits_repeating */
186 YYSYMBOL_fw_config_field = 73, /* fw_config_field */
187 YYSYMBOL_74_4 = 74, /* $@4 */
188 YYSYMBOL_75_5 = 75, /* $@5 */
189 YYSYMBOL_76_6 = 76, /* $@6 */
190 YYSYMBOL_fw_config_option = 77, /* fw_config_option */
191 YYSYMBOL_fw_config_probe = 78, /* fw_config_probe */
192 YYSYMBOL_ops = 79 /* ops */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700193};
194typedef enum yysymbol_kind_t yysymbol_kind_t;
195
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000196
197
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000198
199#ifdef short
200# undef short
201#endif
202
Nico Huberd9b2f792020-04-28 16:28:03 +0200203/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
204 <limits.h> and (if available) <stdint.h> are included
205 so that the code can choose integer types of a good width. */
206
207#ifndef __PTRDIFF_MAX__
208# include <limits.h> /* INFRINGES ON USER NAME SPACE */
209# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
210# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
211# define YY_STDINT_H
212# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000213#endif
214
Nico Huberd9b2f792020-04-28 16:28:03 +0200215/* Narrow types that promote to a signed type and that can represent a
216 signed or unsigned integer of at least N bits. In tables they can
217 save space and decrease cache pressure. Promoting to a signed type
218 helps avoid bugs in integer arithmetic. */
219
220#ifdef __INT_LEAST8_MAX__
221typedef __INT_LEAST8_TYPE__ yytype_int8;
222#elif defined YY_STDINT_H
223typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000224#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700225typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000226#endif
227
Nico Huberd9b2f792020-04-28 16:28:03 +0200228#ifdef __INT_LEAST16_MAX__
229typedef __INT_LEAST16_TYPE__ yytype_int16;
230#elif defined YY_STDINT_H
231typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000232#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200233typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000234#endif
235
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600236/* Work around bug in HP-UX 11.23, which defines these macros
237 incorrectly for preprocessor constants. This workaround can likely
238 be removed in 2023, as HPE has promised support for HP-UX 11.23
239 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
240 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
241#ifdef __hpux
242# undef UINT_LEAST8_MAX
243# undef UINT_LEAST16_MAX
244# define UINT_LEAST8_MAX 255
245# define UINT_LEAST16_MAX 65535
246#endif
247
Nico Huberd9b2f792020-04-28 16:28:03 +0200248#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
249typedef __UINT_LEAST8_TYPE__ yytype_uint8;
250#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
251 && UINT_LEAST8_MAX <= INT_MAX)
252typedef uint_least8_t yytype_uint8;
253#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
254typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000255#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200256typedef short yytype_uint8;
257#endif
258
259#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
260typedef __UINT_LEAST16_TYPE__ yytype_uint16;
261#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
262 && UINT_LEAST16_MAX <= INT_MAX)
263typedef uint_least16_t yytype_uint16;
264#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
265typedef unsigned short yytype_uint16;
266#else
267typedef int yytype_uint16;
268#endif
269
270#ifndef YYPTRDIFF_T
271# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
272# define YYPTRDIFF_T __PTRDIFF_TYPE__
273# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
274# elif defined PTRDIFF_MAX
275# ifndef ptrdiff_t
276# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
277# endif
278# define YYPTRDIFF_T ptrdiff_t
279# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
280# else
281# define YYPTRDIFF_T long
282# define YYPTRDIFF_MAXIMUM LONG_MAX
283# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000284#endif
285
286#ifndef YYSIZE_T
287# ifdef __SIZE_TYPE__
288# define YYSIZE_T __SIZE_TYPE__
289# elif defined size_t
290# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200291# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000292# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
293# define YYSIZE_T size_t
294# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200295# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000296# endif
297#endif
298
Nico Huberd9b2f792020-04-28 16:28:03 +0200299#define YYSIZE_MAXIMUM \
300 YY_CAST (YYPTRDIFF_T, \
301 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
302 ? YYPTRDIFF_MAXIMUM \
303 : YY_CAST (YYSIZE_T, -1)))
304
305#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
306
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700307
Nico Huberd9b2f792020-04-28 16:28:03 +0200308/* Stored state numbers (used for stacks). */
309typedef yytype_int8 yy_state_t;
310
311/* State numbers in computations. */
312typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000313
314#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200315# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000316# if ENABLE_NLS
317# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700318# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000319# endif
320# endif
321# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700322# define YY_(Msgid) Msgid
323# endif
324#endif
325
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700326
Nico Huberd9b2f792020-04-28 16:28:03 +0200327#ifndef YY_ATTRIBUTE_PURE
328# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
329# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700330# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200331# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700332# endif
333#endif
334
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700335#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200336# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
337# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700338# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200339# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000340# endif
341#endif
342
343/* Suppress unused-variable warnings by "using" E. */
344#if ! defined lint || defined __GNUC__
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600345# define YY_USE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000346#else
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600347# define YY_USE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000348#endif
349
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700350/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Angel Pons437da712021-09-03 16:51:40 +0200351#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
352# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
353# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
354 _Pragma ("GCC diagnostic push") \
355 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
356# else
357# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
Nico Huberd9b2f792020-04-28 16:28:03 +0200358 _Pragma ("GCC diagnostic push") \
359 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700360 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Angel Pons437da712021-09-03 16:51:40 +0200361# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200362# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700363 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000364#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700365# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000366#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700367#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
368# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
369# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000370#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700371#ifndef YY_INITIAL_VALUE
372# define YY_INITIAL_VALUE(Value) /* Nothing. */
373#endif
374
Nico Huberd9b2f792020-04-28 16:28:03 +0200375#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
376# define YY_IGNORE_USELESS_CAST_BEGIN \
377 _Pragma ("GCC diagnostic push") \
378 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
379# define YY_IGNORE_USELESS_CAST_END \
380 _Pragma ("GCC diagnostic pop")
381#endif
382#ifndef YY_IGNORE_USELESS_CAST_BEGIN
383# define YY_IGNORE_USELESS_CAST_BEGIN
384# define YY_IGNORE_USELESS_CAST_END
385#endif
386
387
388#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000389
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700390#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000391
392/* The parser invokes alloca or malloc; define the necessary symbols. */
393
394# ifdef YYSTACK_USE_ALLOCA
395# if YYSTACK_USE_ALLOCA
396# ifdef __GNUC__
397# define YYSTACK_ALLOC __builtin_alloca
398# elif defined __BUILTIN_VA_ARG_INCR
399# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
400# elif defined _AIX
401# define YYSTACK_ALLOC __alloca
402# elif defined _MSC_VER
403# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
404# define alloca _alloca
405# else
406# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700407# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000408# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700409 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200410# ifndef EXIT_SUCCESS
411# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000412# endif
413# endif
414# endif
415# endif
416# endif
417
418# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700419 /* Pacify GCC's 'empty if-body' warning. */
420# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000421# ifndef YYSTACK_ALLOC_MAXIMUM
422 /* The OS might guarantee only one guard page at the bottom of the stack,
423 and a page size can be as small as 4096 bytes. So we cannot safely
424 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
425 to allow for a few compiler-allocated temporary stack slots. */
426# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
427# endif
428# else
429# define YYSTACK_ALLOC YYMALLOC
430# define YYSTACK_FREE YYFREE
431# ifndef YYSTACK_ALLOC_MAXIMUM
432# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
433# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200434# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000435 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700436 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000437# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200438# ifndef EXIT_SUCCESS
439# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000440# endif
441# endif
442# ifndef YYMALLOC
443# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700444# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000445void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
446# endif
447# endif
448# ifndef YYFREE
449# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700450# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000451void free (void *); /* INFRINGES ON USER NAME SPACE */
452# endif
453# endif
454# endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700455#endif /* !defined yyoverflow */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000456
457#if (! defined yyoverflow \
458 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700459 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000460
461/* A type that is properly aligned for any stack member. */
462union yyalloc
463{
Nico Huberd9b2f792020-04-28 16:28:03 +0200464 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000465 YYSTYPE yyvs_alloc;
466};
467
468/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200469# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000470
471/* The size of an array large to enough to hold all stacks, each with
472 N elements. */
473# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200474 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000475 + YYSTACK_GAP_MAXIMUM)
476
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200477# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000478
479/* Relocate STACK from its old location to the new one. The
480 local variables YYSIZE and YYSTACKSIZE give the old and new number of
481 elements in the stack, and YYPTR gives the new location of the
482 stack. Advance YYPTR to a properly aligned location for the next
483 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700484# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
485 do \
486 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200487 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700488 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
489 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200490 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
491 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700492 } \
493 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000494
495#endif
496
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200497#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700498/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200499 not overlap. */
500# ifndef YYCOPY
501# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700502# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200503 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200504# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700505# define YYCOPY(Dst, Src, Count) \
506 do \
507 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200508 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700509 for (yyi = 0; yyi < (Count); yyi++) \
510 (Dst)[yyi] = (Src)[yyi]; \
511 } \
512 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200513# endif
514# endif
515#endif /* !YYCOPY_NEEDED */
516
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000517/* YYFINAL -- State number of the termination state. */
Duncan Laurie47b7b342020-05-15 15:39:08 -0700518#define YYFINAL 2
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000519/* YYLAST -- Last index in YYTABLE. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200520#define YYLAST 101
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000521
522/* YYNTOKENS -- Number of terminals. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200523#define YYNTOKENS 47
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000524/* YYNNTS -- Number of nonterminals. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200525#define YYNNTS 33
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000526/* YYNRULES -- Number of rules. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200527#define YYNRULES 62
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700528/* YYNSTATES -- Number of states. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200529#define YYNSTATES 108
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000530
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100531/* YYMAXUTOK -- Last valid token kind. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200532#define YYMAXUTOK 301
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000533
Nico Huberd9b2f792020-04-28 16:28:03 +0200534
535/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
536 as returned by yylex, with out-of-bounds checking. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700537#define YYTRANSLATE(YYX) \
538 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
539 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
540 : YYSYMBOL_YYUNDEF)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000541
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700542/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200543 as returned by yylex. */
544static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000545{
546 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
572 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200573 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000574 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Angel Pons437da712021-09-03 16:51:40 +0200575 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200576 45, 46
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000577};
578
579#if YYDEBUG
Angel Pons437da712021-09-03 16:51:40 +0200580/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600581static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000582{
Nico Huber859ecdf2021-02-28 16:18:18 +0100583 0, 26, 26, 26, 26, 29, 29, 29, 30, 30,
584 31, 31, 32, 32, 34, 34, 34, 34, 34, 34,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200585 34, 34, 34, 34, 34, 36, 36, 45, 45, 53,
586 53, 61, 63, 67, 67, 69, 72, 75, 78, 81,
587 84, 87, 90, 93, 96, 99, 103, 106, 106, 109,
588 109, 112, 118, 118, 121, 120, 125, 125, 133, 133,
589 139, 143, 146
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000590};
591#endif
592
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700593/** Accessing symbol of state STATE. */
594#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
595
596#if YYDEBUG || 0
597/* The user-facing name of the symbol whose (internal) number is
598 YYSYMBOL. No bounds checking. */
599static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
600
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000601/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
602 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
603static const char *const yytname[] =
604{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700605 "\"end of file\"", "error", "\"invalid token\"", "CHIP", "DEVICE",
606 "REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
607 "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
608 "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
Angel Pons437da712021-09-03 16:51:40 +0200609 "SLOT_DESC", "SMBIOS_DEV_INFO", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
610 "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
611 "GPIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
Nico Huberc0fc38e2022-08-06 19:02:59 +0200612 "FW_CONFIG_PROBE", "PIPE", "OPS", "$accept", "devtree",
613 "chipchild_nondev", "chipchild", "chipchildren", "chipchildren_dev",
614 "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status",
615 "resource", "reference", "registers", "subsystemid", "ioapic_irq",
Angel Pons437da712021-09-03 16:51:40 +0200616 "smbios_slot_desc", "smbios_dev_info", "fw_config_table",
617 "fw_config_table_children", "fw_config_field_children",
618 "fw_config_field_bits", "fw_config_field_bits_repeating",
619 "fw_config_field", "$@4", "$@5", "$@6", "fw_config_option",
Nico Huberc0fc38e2022-08-06 19:02:59 +0200620 "fw_config_probe", "ops", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000621};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700622
623static const char *
624yysymbol_name (yysymbol_kind_t yysymbol)
625{
626 return yytname[yysymbol];
627}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000628#endif
629
Nico Huberc0fc38e2022-08-06 19:02:59 +0200630#define YYPACT_NINF (-57)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700631
Nico Huberd9b2f792020-04-28 16:28:03 +0200632#define yypact_value_is_default(Yyn) \
633 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700634
Nico Huberd9b2f792020-04-28 16:28:03 +0200635#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700636
Nico Huberd9b2f792020-04-28 16:28:03 +0200637#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700638 0
639
Angel Pons437da712021-09-03 16:51:40 +0200640/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
641 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000642static const yytype_int8 yypact[] =
643{
Nico Huberc0fc38e2022-08-06 19:02:59 +0200644 -57, 6, -57, 2, -57, -57, -57, -57, -12, 45,
645 -57, 4, -57, 11, 5, 7, 45, -3, -57, -57,
646 -57, -57, 21, 18, 25, 14, 34, -57, -57, 45,
647 27, 16, -57, 44, 53, 46, 47, -57, -57, -57,
648 -57, -57, 32, -57, -7, -57, -57, -57, 49, 44,
649 -57, -57, -6, 27, 16, -57, -57, 50, -57, -57,
650 -57, -57, -57, -57, -2, 38, 0, -57, -57, -57,
651 39, -57, 54, 40, 42, 43, 57, 58, -57, -57,
652 -57, -57, -57, -57, -57, -57, -57, -57, 12, 61,
653 60, 62, 48, 51, 63, -57, -57, 52, 64, -57,
654 56, 55, -57, -57, 66, -57, -57, -57
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000655};
656
Angel Pons437da712021-09-03 16:51:40 +0200657/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
658 Performed when YYTABLE does not specify something else to do. Zero
659 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200660static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700661{
Nico Huberc0fc38e2022-08-06 19:02:59 +0200662 2, 0, 1, 0, 48, 3, 4, 25, 0, 0,
663 46, 0, 47, 0, 0, 0, 0, 0, 5, 11,
664 7, 6, 58, 0, 0, 0, 0, 13, 26, 12,
665 56, 53, 50, 0, 31, 0, 0, 9, 10, 8,
666 51, 50, 0, 54, 0, 33, 34, 29, 0, 0,
667 37, 36, 0, 0, 53, 50, 59, 0, 49, 24,
668 32, 27, 57, 52, 0, 0, 0, 24, 55, 60,
669 0, 30, 0, 0, 0, 0, 0, 0, 15, 14,
670 16, 21, 17, 18, 19, 20, 22, 23, 0, 0,
671 0, 45, 0, 0, 0, 62, 28, 0, 43, 44,
672 38, 0, 61, 35, 42, 39, 40, 41
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700673};
674
Angel Pons437da712021-09-03 16:51:40 +0200675/* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000676static const yytype_int8 yypgoto[] =
677{
Nico Huberc0fc38e2022-08-06 19:02:59 +0200678 -57, -57, 65, -57, -57, 68, 22, -1, -57, -28,
679 -57, -57, -57, 41, -57, -57, -56, -57, -57, -57,
680 -57, -57, -57, -21, 59, 37, -57, -57, -57, -57,
681 -57, -57, -57
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000682};
683
Angel Pons437da712021-09-03 16:51:40 +0200684/* YYDEFGOTO[NTERM-NUM]. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700685static const yytype_int8 yydefgoto[] =
686{
Nico Huber859ecdf2021-02-28 16:18:18 +0100687 0, 1, 16, 38, 29, 17, 66, 18, 9, 19,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200688 67, 59, 49, 47, 80, 20, 21, 82, 83, 84,
689 85, 6, 8, 44, 31, 43, 12, 55, 41, 32,
690 58, 86, 87
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700691};
692
Angel Pons437da712021-09-03 16:51:40 +0200693/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
694 positive, shift that token. If negative, reduce the rule whose
695 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200696static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000697{
Angel Pons437da712021-09-03 16:51:40 +0200698 5, 39, 10, 3, 13, 14, 2, 56, 62, 3,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200699 81, 28, 68, 70, 71, 3, 13, 14, 23, 7,
700 52, 22, 25, 24, 26, 70, 96, 72, 73, 35,
701 11, 74, 81, 75, 64, 33, 57, 57, 79, 72,
702 73, 57, 36, 74, 76, 75, 77, 4, 3, 13,
703 14, 30, 15, 45, 46, 34, 76, 40, 77, 48,
704 79, 42, 53, 50, 51, 78, 60, 65, 69, 89,
705 91, 90, 92, 93, 94, 95, 97, 98, 100, 99,
706 102, 104, 103, 107, 27, 106, 101, 78, 105, 88,
707 61, 63, 0, 0, 37, 0, 0, 0, 0, 0,
708 0, 54
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000709};
710
Patrick Georgi8f625f62010-05-05 13:13:47 +0000711static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000712{
Angel Pons437da712021-09-03 16:51:40 +0200713 1, 29, 14, 3, 4, 5, 0, 14, 14, 3,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200714 66, 14, 14, 13, 14, 3, 4, 5, 7, 17,
715 41, 17, 17, 12, 17, 13, 14, 27, 28, 15,
716 42, 31, 88, 33, 55, 17, 43, 43, 66, 27,
717 28, 43, 8, 31, 44, 33, 46, 41, 3, 4,
718 5, 30, 7, 9, 10, 30, 44, 30, 46, 6,
719 88, 45, 30, 17, 17, 66, 17, 17, 30, 30,
720 30, 17, 30, 30, 17, 17, 15, 17, 30, 17,
721 17, 17, 30, 17, 16, 30, 35, 88, 32, 67,
722 49, 54, -1, -1, 29, -1, -1, -1, -1, -1,
723 -1, 42
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000724};
725
Angel Pons437da712021-09-03 16:51:40 +0200726/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
727 state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200728static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000729{
Nico Huberc0fc38e2022-08-06 19:02:59 +0200730 0, 48, 0, 3, 41, 54, 68, 17, 69, 55,
731 14, 42, 73, 4, 5, 7, 49, 52, 54, 56,
732 62, 63, 17, 7, 12, 17, 17, 52, 14, 51,
733 30, 71, 76, 17, 30, 15, 8, 49, 50, 56,
734 30, 75, 45, 72, 70, 9, 10, 60, 6, 59,
735 17, 17, 70, 30, 71, 74, 14, 43, 77, 58,
736 17, 60, 14, 72, 70, 17, 53, 57, 14, 30,
737 13, 14, 27, 28, 31, 33, 44, 46, 54, 56,
738 61, 63, 64, 65, 66, 67, 78, 79, 53, 30,
739 17, 30, 30, 30, 17, 17, 14, 15, 17, 17,
740 30, 35, 17, 30, 17, 32, 30, 17
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000741};
742
Angel Pons437da712021-09-03 16:51:40 +0200743/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200744static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700745{
Nico Huberc0fc38e2022-08-06 19:02:59 +0200746 0, 47, 48, 48, 48, 49, 49, 49, 50, 50,
747 51, 51, 52, 52, 53, 53, 53, 53, 53, 53,
748 53, 53, 53, 53, 53, 55, 54, 57, 56, 58,
749 56, 59, 59, 60, 60, 61, 62, 63, 64, 64,
750 65, 66, 66, 66, 67, 67, 68, 69, 69, 70,
751 70, 71, 72, 72, 74, 73, 75, 73, 76, 73,
752 77, 78, 79
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700753};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000754
Angel Pons437da712021-09-03 16:51:40 +0200755/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200756static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700757{
Nico Huber859ecdf2021-02-28 16:18:18 +0100758 0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
759 2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200760 2, 2, 2, 2, 0, 0, 5, 0, 8, 0,
761 7, 0, 2, 1, 1, 4, 4, 4, 3, 4,
762 4, 5, 4, 3, 3, 2, 3, 2, 0, 2,
763 0, 2, 3, 0, 0, 7, 0, 6, 0, 5,
764 3, 3, 2
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700765};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000766
767
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700768enum { YYENOMEM = -2 };
769
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700770#define yyerrok (yyerrstatus = 0)
771#define yyclearin (yychar = YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000772
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700773#define YYACCEPT goto yyacceptlab
774#define YYABORT goto yyabortlab
775#define YYERROR goto yyerrorlab
Angel Pons437da712021-09-03 16:51:40 +0200776#define YYNOMEM goto yyexhaustedlab
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700777
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000778
779#define YYRECOVERING() (!!yyerrstatus)
780
Nico Huberd9b2f792020-04-28 16:28:03 +0200781#define YYBACKUP(Token, Value) \
782 do \
783 if (yychar == YYEMPTY) \
784 { \
785 yychar = (Token); \
786 yylval = (Value); \
787 YYPOPSTACK (yylen); \
788 yystate = *yyssp; \
789 goto yybackup; \
790 } \
791 else \
792 { \
793 yyerror (YY_("syntax error: cannot back up")); \
794 YYERROR; \
795 } \
796 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700797
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700798/* Backward compatibility with an undocumented macro.
799 Use YYerror or YYUNDEF. */
800#define YYERRCODE YYUNDEF
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000801
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000802
803/* Enable debugging if requested. */
804#if YYDEBUG
805
806# ifndef YYFPRINTF
807# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
808# define YYFPRINTF fprintf
809# endif
810
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700811# define YYDPRINTF(Args) \
812do { \
813 if (yydebug) \
814 YYFPRINTF Args; \
815} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000816
Angel Pons437da712021-09-03 16:51:40 +0200817
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000818
819
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700820# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700821do { \
822 if (yydebug) \
823 { \
824 YYFPRINTF (stderr, "%s ", Title); \
825 yy_symbol_print (stderr, \
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700826 Kind, Value); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700827 YYFPRINTF (stderr, "\n"); \
828 } \
829} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000830
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700831
Nico Huberd9b2f792020-04-28 16:28:03 +0200832/*-----------------------------------.
833| Print this symbol's value on YYO. |
834`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700835
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000836static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700837yy_symbol_value_print (FILE *yyo,
838 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000839{
Nico Huberd9b2f792020-04-28 16:28:03 +0200840 FILE *yyoutput = yyo;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600841 YY_USE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000842 if (!yyvaluep)
843 return;
Nico Huberd9b2f792020-04-28 16:28:03 +0200844 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600845 YY_USE (yykind);
Nico Huberd9b2f792020-04-28 16:28:03 +0200846 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000847}
848
849
Nico Huberd9b2f792020-04-28 16:28:03 +0200850/*---------------------------.
851| Print this symbol on YYO. |
852`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000853
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000854static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700855yy_symbol_print (FILE *yyo,
856 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000857{
Nico Huberd9b2f792020-04-28 16:28:03 +0200858 YYFPRINTF (yyo, "%s %s (",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700859 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000860
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700861 yy_symbol_value_print (yyo, yykind, yyvaluep);
Nico Huberd9b2f792020-04-28 16:28:03 +0200862 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000863}
864
865/*------------------------------------------------------------------.
866| yy_stack_print -- Print the state stack from its BOTTOM up to its |
867| TOP (included). |
868`------------------------------------------------------------------*/
869
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000870static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200871yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000872{
873 YYFPRINTF (stderr, "Stack now");
874 for (; yybottom <= yytop; yybottom++)
875 {
876 int yybot = *yybottom;
877 YYFPRINTF (stderr, " %d", yybot);
878 }
879 YYFPRINTF (stderr, "\n");
880}
881
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700882# define YY_STACK_PRINT(Bottom, Top) \
883do { \
884 if (yydebug) \
885 yy_stack_print ((Bottom), (Top)); \
886} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000887
888
889/*------------------------------------------------.
890| Report that the YYRULE is going to be reduced. |
891`------------------------------------------------*/
892
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000893static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700894yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
895 int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000896{
Nico Huberd9b2f792020-04-28 16:28:03 +0200897 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000898 int yynrhs = yyr2[yyrule];
899 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200900 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700901 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000902 /* The symbols being reduced. */
903 for (yyi = 0; yyi < yynrhs; yyi++)
904 {
905 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700906 yy_symbol_print (stderr,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700907 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
908 &yyvsp[(yyi + 1) - (yynrhs)]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000909 YYFPRINTF (stderr, "\n");
910 }
911}
912
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700913# define YY_REDUCE_PRINT(Rule) \
914do { \
915 if (yydebug) \
916 yy_reduce_print (yyssp, yyvsp, Rule); \
917} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000918
919/* Nonzero means print parse trace. It is left uninitialized so that
920 multiple parsers can coexist. */
921int yydebug;
922#else /* !YYDEBUG */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700923# define YYDPRINTF(Args) ((void) 0)
924# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000925# define YY_STACK_PRINT(Bottom, Top)
926# define YY_REDUCE_PRINT(Rule)
927#endif /* !YYDEBUG */
928
929
930/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700931#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000932# define YYINITDEPTH 200
933#endif
934
935/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
936 if the built-in stack extension method is used).
937
938 Do not make this value too large; the results are undefined if
939 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
940 evaluated with infinite-precision integer arithmetic. */
941
942#ifndef YYMAXDEPTH
943# define YYMAXDEPTH 10000
944#endif
945
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000946
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000947
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000948
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000949
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000950
951/*-----------------------------------------------.
952| Release the memory associated to this symbol. |
953`-----------------------------------------------*/
954
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000955static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700956yydestruct (const char *yymsg,
957 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000958{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600959 YY_USE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000960 if (!yymsg)
961 yymsg = "Deleting";
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700962 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000963
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700964 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600965 YY_USE (yykind);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700966 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000967}
968
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200969
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100970/* Lookahead token kind. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000971int yychar;
972
973/* The semantic value of the lookahead symbol. */
974YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000975/* Number of syntax errors so far. */
976int yynerrs;
977
978
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700979
980
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200981/*----------.
982| yyparse. |
983`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000984
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000985int
986yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000987{
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100988 yy_state_fast_t yystate = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000989 /* Number of tokens to shift before error messages enabled. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100990 int yyerrstatus = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000991
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100992 /* Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000993 to reallocate them elsewhere. */
994
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700995 /* Their size. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100996 YYPTRDIFF_T yystacksize = YYINITDEPTH;
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700997
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100998 /* The state stack: array, bottom, top. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200999 yy_state_t yyssa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001000 yy_state_t *yyss = yyssa;
1001 yy_state_t *yyssp = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001002
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001003 /* The semantic value stack: array, bottom, top. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001004 YYSTYPE yyvsa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001005 YYSTYPE *yyvs = yyvsa;
1006 YYSTYPE *yyvsp = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001007
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001008 int yyn;
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001009 /* The return value of yyparse. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001010 int yyresult;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001011 /* Lookahead symbol kind. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001012 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001013 /* The variables used to return semantic value and location from the
1014 action routines. */
1015 YYSTYPE yyval;
1016
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001017
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001018
1019#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1020
1021 /* The number of symbols on the RHS of the reduced rule.
1022 Keep to zero when no symbol should be popped. */
1023 int yylen = 0;
1024
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001025 YYDPRINTF ((stderr, "Starting parse\n"));
1026
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001027 yychar = YYEMPTY; /* Cause a token to be read. */
Angel Pons437da712021-09-03 16:51:40 +02001028
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001029 goto yysetstate;
1030
Nico Huberd9b2f792020-04-28 16:28:03 +02001031
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001032/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001033| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001034`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001035yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001036 /* In all cases, when you get here, the value and location stacks
1037 have just been pushed. So pushing a state here evens the stacks. */
1038 yyssp++;
1039
Nico Huberd9b2f792020-04-28 16:28:03 +02001040
1041/*--------------------------------------------------------------------.
1042| yysetstate -- set current state (the top of the stack) to yystate. |
1043`--------------------------------------------------------------------*/
1044yysetstate:
1045 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1046 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1047 YY_IGNORE_USELESS_CAST_BEGIN
1048 *yyssp = YY_CAST (yy_state_t, yystate);
1049 YY_IGNORE_USELESS_CAST_END
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001050 YY_STACK_PRINT (yyss, yyssp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001051
1052 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001053#if !defined yyoverflow && !defined YYSTACK_RELOCATE
Angel Pons437da712021-09-03 16:51:40 +02001054 YYNOMEM;
Nico Huberd9b2f792020-04-28 16:28:03 +02001055#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001056 {
1057 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001058 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001059
Nico Huberd9b2f792020-04-28 16:28:03 +02001060# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001061 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001062 /* Give user a chance to reallocate the stack. Use copies of
1063 these so that the &'s don't force the real ones into
1064 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001065 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001066 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001067
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001068 /* Each stack pointer address is followed by the size of the
1069 data in use in that stack, in bytes. This used to be a
1070 conditional around just the two extra args, but that might
1071 be undefined if yyoverflow is a macro. */
1072 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001073 &yyss1, yysize * YYSIZEOF (*yyssp),
1074 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001075 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001076 yyss = yyss1;
1077 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001078 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001079# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001080 /* Extend the stack our own way. */
1081 if (YYMAXDEPTH <= yystacksize)
Angel Pons437da712021-09-03 16:51:40 +02001082 YYNOMEM;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001083 yystacksize *= 2;
1084 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001085 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001086
1087 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001088 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001089 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001090 YY_CAST (union yyalloc *,
1091 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001092 if (! yyptr)
Angel Pons437da712021-09-03 16:51:40 +02001093 YYNOMEM;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001094 YYSTACK_RELOCATE (yyss_alloc, yyss);
1095 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001096# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001097 if (yyss1 != yyssa)
1098 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001099 }
1100# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001101
1102 yyssp = yyss + yysize - 1;
1103 yyvsp = yyvs + yysize - 1;
1104
Nico Huberd9b2f792020-04-28 16:28:03 +02001105 YY_IGNORE_USELESS_CAST_BEGIN
1106 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1107 YY_CAST (long, yystacksize)));
1108 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001109
1110 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001111 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001112 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001113#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001114
Angel Pons437da712021-09-03 16:51:40 +02001115
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001116 if (yystate == YYFINAL)
1117 YYACCEPT;
1118
1119 goto yybackup;
1120
Nico Huberd9b2f792020-04-28 16:28:03 +02001121
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001122/*-----------.
1123| yybackup. |
1124`-----------*/
1125yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001126 /* Do appropriate processing given the current state. Read a
1127 lookahead token if we need one and don't already have one. */
1128
1129 /* First try to decide what to do without reference to lookahead token. */
1130 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001131 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001132 goto yydefault;
1133
1134 /* Not known => get a lookahead token if don't already have one. */
1135
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001136 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001137 if (yychar == YYEMPTY)
1138 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001139 YYDPRINTF ((stderr, "Reading a token\n"));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001140 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001141 }
1142
1143 if (yychar <= YYEOF)
1144 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001145 yychar = YYEOF;
1146 yytoken = YYSYMBOL_YYEOF;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001147 YYDPRINTF ((stderr, "Now at end of input.\n"));
1148 }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001149 else if (yychar == YYerror)
1150 {
1151 /* The scanner already issued an error message, process directly
1152 to error recovery. But do not keep the error token as
1153 lookahead, it is too special and may lead us to an endless
1154 loop in error recovery. */
1155 yychar = YYUNDEF;
1156 yytoken = YYSYMBOL_YYerror;
1157 goto yyerrlab1;
1158 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001159 else
1160 {
1161 yytoken = YYTRANSLATE (yychar);
1162 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1163 }
1164
1165 /* If the proper action on seeing token YYTOKEN is to reduce or to
1166 detect an error, take that action. */
1167 yyn += yytoken;
1168 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1169 goto yydefault;
1170 yyn = yytable[yyn];
1171 if (yyn <= 0)
1172 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001173 if (yytable_value_is_error (yyn))
1174 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001175 yyn = -yyn;
1176 goto yyreduce;
1177 }
1178
1179 /* Count tokens shifted since error; after three, turn off error
1180 status. */
1181 if (yyerrstatus)
1182 yyerrstatus--;
1183
1184 /* Shift the lookahead token. */
1185 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001186 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001187 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001188 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001189 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001190
Nico Huberd9b2f792020-04-28 16:28:03 +02001191 /* Discard the shifted token. */
1192 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001193 goto yynewstate;
1194
1195
1196/*-----------------------------------------------------------.
1197| yydefault -- do the default action for the current state. |
1198`-----------------------------------------------------------*/
1199yydefault:
1200 yyn = yydefact[yystate];
1201 if (yyn == 0)
1202 goto yyerrlab;
1203 goto yyreduce;
1204
1205
1206/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001207| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001208`-----------------------------*/
1209yyreduce:
1210 /* yyn is the number of a rule to reduce with. */
1211 yylen = yyr2[yyn];
1212
1213 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001214 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001215
1216 Otherwise, the following line sets YYVAL to garbage.
1217 This behavior is undocumented and Bison
1218 users should not rely upon it. Assigning to YYVAL
1219 unconditionally makes the parser a bit smaller, and it avoids a
1220 GCC warning that YYVAL may be used uninitialized. */
1221 yyval = yyvsp[1-yylen];
1222
1223
1224 YY_REDUCE_PRINT (yyn);
1225 switch (yyn)
1226 {
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001227 case 2: /* devtree: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001228 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001229 break;
1230
Nico Huberc0fc38e2022-08-06 19:02:59 +02001231 case 25: /* @1: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001232 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001233 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1234 chip_enqueue_tail(cur_chip_instance);
1235 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001236}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001237 break;
1238
Nico Huberc0fc38e2022-08-06 19:02:59 +02001239 case 26: /* chip: CHIP STRING @1 chipchildren_dev END */
Nico Huber859ecdf2021-02-28 16:18:18 +01001240 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001241 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001242}
1243 break;
1244
Nico Huberc0fc38e2022-08-06 19:02:59 +02001245 case 27: /* @2: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001246 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001247 (yyval.dev) = new_device_raw(cur_parent, cur_chip_instance, (yyvsp[-3].number), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].number));
Nico Huberd9b2f792020-04-28 16:28:03 +02001248 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001249}
Patrick Georgi68befd52010-05-05 12:05:25 +00001250 break;
1251
Nico Huberc0fc38e2022-08-06 19:02:59 +02001252 case 28: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001253 {
1254 cur_parent = (yyvsp[-2].dev)->parent;
1255}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001256 break;
1257
Nico Huberc0fc38e2022-08-06 19:02:59 +02001258 case 29: /* @3: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001259 {
1260 (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1261 cur_parent = (yyval.dev)->last_bus;
1262}
1263 break;
1264
Nico Huberc0fc38e2022-08-06 19:02:59 +02001265 case 30: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001266 {
1267 cur_parent = (yyvsp[-2].dev)->parent;
1268}
1269 break;
1270
Nico Huberc0fc38e2022-08-06 19:02:59 +02001271 case 31: /* alias: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001272 {
1273 (yyval.string) = NULL;
1274}
1275 break;
1276
Nico Huberc0fc38e2022-08-06 19:02:59 +02001277 case 32: /* alias: ALIAS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001278 {
1279 (yyval.string) = (yyvsp[0].string);
1280}
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001281 break;
1282
Nico Huberc0fc38e2022-08-06 19:02:59 +02001283 case 35: /* resource: RESOURCE NUMBER EQUALS NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001284 { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); }
Sven Schnelle270a9082011-03-01 19:58:15 +00001285 break;
1286
Nico Huberc0fc38e2022-08-06 19:02:59 +02001287 case 36: /* reference: REFERENCE STRING ASSOCIATION STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001288 { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001289 break;
1290
Nico Huberc0fc38e2022-08-06 19:02:59 +02001291 case 37: /* registers: REGISTER STRING EQUALS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001292 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001293 break;
1294
Nico Huberc0fc38e2022-08-06 19:02:59 +02001295 case 38: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001296 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
Nico Huberd9b2f792020-04-28 16:28:03 +02001297 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001298
Nico Huberc0fc38e2022-08-06 19:02:59 +02001299 case 39: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
Nico Huber8e1ea522020-06-03 10:20:07 -07001300 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001301 break;
1302
Nico Huberc0fc38e2022-08-06 19:02:59 +02001303 case 40: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001304 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1305 break;
1306
Nico Huberc0fc38e2022-08-06 19:02:59 +02001307 case 41: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001308 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1309 break;
1310
Nico Huberc0fc38e2022-08-06 19:02:59 +02001311 case 42: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001312 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1313 break;
1314
Nico Huberc0fc38e2022-08-06 19:02:59 +02001315 case 43: /* smbios_slot_desc: SLOT_DESC STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001316 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1317 break;
1318
Nico Huberc0fc38e2022-08-06 19:02:59 +02001319 case 44: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER STRING */
Angel Pons437da712021-09-03 16:51:40 +02001320 { add_smbios_dev_info(cur_parent, strtol((yyvsp[-1].string), NULL, 0), (yyvsp[0].string)); }
1321 break;
1322
Nico Huberc0fc38e2022-08-06 19:02:59 +02001323 case 45: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER */
Angel Pons437da712021-09-03 16:51:40 +02001324 { add_smbios_dev_info(cur_parent, strtol((yyvsp[0].string), NULL, 0), NULL); }
1325 break;
1326
Nico Huberc0fc38e2022-08-06 19:02:59 +02001327 case 46: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001328 { }
1329 break;
1330
Nico Huberc0fc38e2022-08-06 19:02:59 +02001331 case 51: /* fw_config_field_bits: NUMBER NUMBER */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001332{
1333 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 -07001334}
1335 break;
1336
Nico Huberc0fc38e2022-08-06 19:02:59 +02001337 case 54: /* $@4: %empty */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001338 { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
Nico Huber8e1ea522020-06-03 10:20:07 -07001339 break;
1340
Nico Huberc0fc38e2022-08-06 19:02:59 +02001341 case 55: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001342 { cur_bits = NULL; }
1343 break;
1344
Nico Huberc0fc38e2022-08-06 19:02:59 +02001345 case 56: /* $@5: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001346 {
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001347 cur_bits = NULL;
1348 append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1349 cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits);
Nico Huber8e1ea522020-06-03 10:20:07 -07001350}
1351 break;
1352
Nico Huberc0fc38e2022-08-06 19:02:59 +02001353 case 57: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001354 { cur_bits = NULL; }
Nico Huber8e1ea522020-06-03 10:20:07 -07001355 break;
1356
Nico Huberc0fc38e2022-08-06 19:02:59 +02001357 case 58: /* $@6: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001358 {
1359 cur_field = get_fw_config_field((yyvsp[0].string));
1360}
Nico Huber8e1ea522020-06-03 10:20:07 -07001361 break;
1362
Nico Huberc0fc38e2022-08-06 19:02:59 +02001363 case 59: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001364 { cur_bits = NULL; }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001365 break;
1366
Nico Huberc0fc38e2022-08-06 19:02:59 +02001367 case 60: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001368 { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001369 break;
1370
Nico Huberc0fc38e2022-08-06 19:02:59 +02001371 case 61: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001372 { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1373 break;
1374
Nico Huberc0fc38e2022-08-06 19:02:59 +02001375 case 62: /* ops: OPS STRING */
1376 { add_device_ops(cur_parent, (yyvsp[0].string)); }
1377 break;
1378
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001379
1380
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001381 default: break;
1382 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001383 /* User semantic actions sometimes alter yychar, and that requires
1384 that yytoken be updated with the new translation. We take the
1385 approach of translating immediately before every use of yytoken.
1386 One alternative is translating here after every semantic action,
1387 but that translation would be missed if the semantic action invokes
1388 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1389 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1390 incorrect destructor might then be invoked immediately. In the
1391 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1392 to an incorrect destructor call or verbose syntax error message
1393 before the lookahead is translated. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001394 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001395
1396 YYPOPSTACK (yylen);
1397 yylen = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001398
1399 *++yyvsp = yyval;
1400
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001401 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001402 that goes to, based on the state we popped back to and the rule
1403 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001404 {
1405 const int yylhs = yyr1[yyn] - YYNTOKENS;
1406 const int yyi = yypgoto[yylhs] + *yyssp;
1407 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1408 ? yytable[yyi]
1409 : yydefgoto[yylhs]);
1410 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001411
1412 goto yynewstate;
1413
1414
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001415/*--------------------------------------.
1416| yyerrlab -- here on detecting error. |
1417`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001418yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001419 /* Make sure we have latest lookahead translation. See comments at
1420 user semantic actions for why this is necessary. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001421 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001422 /* If not already recovering from an error, report this error. */
1423 if (!yyerrstatus)
1424 {
1425 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001426 yyerror (YY_("syntax error"));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001427 }
1428
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001429 if (yyerrstatus == 3)
1430 {
1431 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001432 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001433
1434 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001435 {
1436 /* Return failure if at end of input. */
1437 if (yychar == YYEOF)
1438 YYABORT;
1439 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001440 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001441 {
1442 yydestruct ("Error: discarding",
1443 yytoken, &yylval);
1444 yychar = YYEMPTY;
1445 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001446 }
1447
1448 /* Else will try to reuse lookahead token after shifting the error
1449 token. */
1450 goto yyerrlab1;
1451
1452
1453/*---------------------------------------------------.
1454| yyerrorlab -- error raised explicitly by YYERROR. |
1455`---------------------------------------------------*/
1456yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001457 /* Pacify compilers when the user code never invokes YYERROR and the
1458 label yyerrorlab therefore never appears in user code. */
1459 if (0)
1460 YYERROR;
Angel Pons437da712021-09-03 16:51:40 +02001461 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001462
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001463 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001464 this YYERROR. */
1465 YYPOPSTACK (yylen);
1466 yylen = 0;
1467 YY_STACK_PRINT (yyss, yyssp);
1468 yystate = *yyssp;
1469 goto yyerrlab1;
1470
1471
1472/*-------------------------------------------------------------.
1473| yyerrlab1 -- common code for both syntax error and YYERROR. |
1474`-------------------------------------------------------------*/
1475yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001476 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001477
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001478 /* Pop stack until we find a state that shifts the error token. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001479 for (;;)
1480 {
1481 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001482 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001483 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001484 yyn += YYSYMBOL_YYerror;
1485 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001486 {
1487 yyn = yytable[yyn];
1488 if (0 < yyn)
1489 break;
1490 }
1491 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001492
1493 /* Pop the current state because it cannot handle the error token. */
1494 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001495 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001496
1497
1498 yydestruct ("Error: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001499 YY_ACCESSING_SYMBOL (yystate), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001500 YYPOPSTACK (1);
1501 yystate = *yyssp;
1502 YY_STACK_PRINT (yyss, yyssp);
1503 }
1504
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001505 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001506 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001507 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001508
1509
1510 /* Shift the error token. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001511 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001512
1513 yystate = yyn;
1514 goto yynewstate;
1515
1516
1517/*-------------------------------------.
1518| yyacceptlab -- YYACCEPT comes here. |
1519`-------------------------------------*/
1520yyacceptlab:
1521 yyresult = 0;
Angel Pons437da712021-09-03 16:51:40 +02001522 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001523
Nico Huberd9b2f792020-04-28 16:28:03 +02001524
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001525/*-----------------------------------.
1526| yyabortlab -- YYABORT comes here. |
1527`-----------------------------------*/
1528yyabortlab:
1529 yyresult = 1;
Angel Pons437da712021-09-03 16:51:40 +02001530 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001531
Nico Huberd9b2f792020-04-28 16:28:03 +02001532
Angel Pons437da712021-09-03 16:51:40 +02001533/*-----------------------------------------------------------.
1534| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
1535`-----------------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001536yyexhaustedlab:
1537 yyerror (YY_("memory exhausted"));
1538 yyresult = 2;
Angel Pons437da712021-09-03 16:51:40 +02001539 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001540
Nico Huberd9b2f792020-04-28 16:28:03 +02001541
Angel Pons437da712021-09-03 16:51:40 +02001542/*----------------------------------------------------------.
1543| yyreturnlab -- parsing is finished, clean up and return. |
1544`----------------------------------------------------------*/
1545yyreturnlab:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001546 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001547 {
1548 /* Make sure we have latest lookahead translation. See comments at
1549 user semantic actions for why this is necessary. */
1550 yytoken = YYTRANSLATE (yychar);
1551 yydestruct ("Cleanup: discarding lookahead",
1552 yytoken, &yylval);
1553 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001554 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001555 this YYABORT or YYACCEPT. */
1556 YYPOPSTACK (yylen);
1557 YY_STACK_PRINT (yyss, yyssp);
1558 while (yyssp != yyss)
1559 {
1560 yydestruct ("Cleanup: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001561 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001562 YYPOPSTACK (1);
1563 }
1564#ifndef yyoverflow
1565 if (yyss != yyssa)
1566 YYSTACK_FREE (yyss);
1567#endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001568
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001569 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001570}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001571
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001572