blob: 6bc0e02f7dd12d6353e2005b022198060259213c [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 */
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100154 YYSYMBOL_MDIO = 41, /* MDIO */
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 */
159 YYSYMBOL_PIPE = 46, /* PIPE */
160 YYSYMBOL_OPS = 47, /* OPS */
161 YYSYMBOL_YYACCEPT = 48, /* $accept */
162 YYSYMBOL_devtree = 49, /* devtree */
163 YYSYMBOL_chipchild_nondev = 50, /* chipchild_nondev */
164 YYSYMBOL_chipchild = 51, /* chipchild */
165 YYSYMBOL_chipchildren = 52, /* chipchildren */
166 YYSYMBOL_chipchildren_dev = 53, /* chipchildren_dev */
167 YYSYMBOL_devicechildren = 54, /* devicechildren */
168 YYSYMBOL_chip = 55, /* chip */
169 YYSYMBOL_56_1 = 56, /* @1 */
170 YYSYMBOL_device = 57, /* device */
171 YYSYMBOL_58_2 = 58, /* @2 */
172 YYSYMBOL_59_3 = 59, /* @3 */
173 YYSYMBOL_alias = 60, /* alias */
174 YYSYMBOL_status = 61, /* status */
175 YYSYMBOL_resource = 62, /* resource */
176 YYSYMBOL_reference = 63, /* reference */
177 YYSYMBOL_registers = 64, /* registers */
178 YYSYMBOL_subsystemid = 65, /* subsystemid */
179 YYSYMBOL_ioapic_irq = 66, /* ioapic_irq */
180 YYSYMBOL_smbios_slot_desc = 67, /* smbios_slot_desc */
181 YYSYMBOL_smbios_dev_info = 68, /* smbios_dev_info */
182 YYSYMBOL_fw_config_table = 69, /* fw_config_table */
183 YYSYMBOL_fw_config_table_children = 70, /* fw_config_table_children */
184 YYSYMBOL_fw_config_field_children = 71, /* fw_config_field_children */
185 YYSYMBOL_fw_config_field_bits = 72, /* fw_config_field_bits */
186 YYSYMBOL_fw_config_field_bits_repeating = 73, /* fw_config_field_bits_repeating */
187 YYSYMBOL_fw_config_field = 74, /* fw_config_field */
188 YYSYMBOL_75_4 = 75, /* $@4 */
189 YYSYMBOL_76_5 = 76, /* $@5 */
190 YYSYMBOL_77_6 = 77, /* $@6 */
191 YYSYMBOL_fw_config_option = 78, /* fw_config_option */
192 YYSYMBOL_fw_config_probe = 79, /* fw_config_probe */
193 YYSYMBOL_ops = 80 /* ops */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700194};
195typedef enum yysymbol_kind_t yysymbol_kind_t;
196
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000197
198
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000199
200#ifdef short
201# undef short
202#endif
203
Nico Huberd9b2f792020-04-28 16:28:03 +0200204/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
205 <limits.h> and (if available) <stdint.h> are included
206 so that the code can choose integer types of a good width. */
207
208#ifndef __PTRDIFF_MAX__
209# include <limits.h> /* INFRINGES ON USER NAME SPACE */
210# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
211# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
212# define YY_STDINT_H
213# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000214#endif
215
Nico Huberd9b2f792020-04-28 16:28:03 +0200216/* Narrow types that promote to a signed type and that can represent a
217 signed or unsigned integer of at least N bits. In tables they can
218 save space and decrease cache pressure. Promoting to a signed type
219 helps avoid bugs in integer arithmetic. */
220
221#ifdef __INT_LEAST8_MAX__
222typedef __INT_LEAST8_TYPE__ yytype_int8;
223#elif defined YY_STDINT_H
224typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000225#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700226typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000227#endif
228
Nico Huberd9b2f792020-04-28 16:28:03 +0200229#ifdef __INT_LEAST16_MAX__
230typedef __INT_LEAST16_TYPE__ yytype_int16;
231#elif defined YY_STDINT_H
232typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000233#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200234typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000235#endif
236
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600237/* Work around bug in HP-UX 11.23, which defines these macros
238 incorrectly for preprocessor constants. This workaround can likely
239 be removed in 2023, as HPE has promised support for HP-UX 11.23
240 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
241 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
242#ifdef __hpux
243# undef UINT_LEAST8_MAX
244# undef UINT_LEAST16_MAX
245# define UINT_LEAST8_MAX 255
246# define UINT_LEAST16_MAX 65535
247#endif
248
Nico Huberd9b2f792020-04-28 16:28:03 +0200249#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
250typedef __UINT_LEAST8_TYPE__ yytype_uint8;
251#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
252 && UINT_LEAST8_MAX <= INT_MAX)
253typedef uint_least8_t yytype_uint8;
254#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
255typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000256#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200257typedef short yytype_uint8;
258#endif
259
260#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
261typedef __UINT_LEAST16_TYPE__ yytype_uint16;
262#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
263 && UINT_LEAST16_MAX <= INT_MAX)
264typedef uint_least16_t yytype_uint16;
265#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
266typedef unsigned short yytype_uint16;
267#else
268typedef int yytype_uint16;
269#endif
270
271#ifndef YYPTRDIFF_T
272# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
273# define YYPTRDIFF_T __PTRDIFF_TYPE__
274# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
275# elif defined PTRDIFF_MAX
276# ifndef ptrdiff_t
277# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
278# endif
279# define YYPTRDIFF_T ptrdiff_t
280# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
281# else
282# define YYPTRDIFF_T long
283# define YYPTRDIFF_MAXIMUM LONG_MAX
284# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000285#endif
286
287#ifndef YYSIZE_T
288# ifdef __SIZE_TYPE__
289# define YYSIZE_T __SIZE_TYPE__
290# elif defined size_t
291# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200292# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000293# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
294# define YYSIZE_T size_t
295# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200296# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000297# endif
298#endif
299
Nico Huberd9b2f792020-04-28 16:28:03 +0200300#define YYSIZE_MAXIMUM \
301 YY_CAST (YYPTRDIFF_T, \
302 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
303 ? YYPTRDIFF_MAXIMUM \
304 : YY_CAST (YYSIZE_T, -1)))
305
306#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
307
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700308
Nico Huberd9b2f792020-04-28 16:28:03 +0200309/* Stored state numbers (used for stacks). */
310typedef yytype_int8 yy_state_t;
311
312/* State numbers in computations. */
313typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000314
315#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200316# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000317# if ENABLE_NLS
318# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700319# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000320# endif
321# endif
322# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700323# define YY_(Msgid) Msgid
324# endif
325#endif
326
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700327
Nico Huberd9b2f792020-04-28 16:28:03 +0200328#ifndef YY_ATTRIBUTE_PURE
329# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
330# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700331# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200332# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700333# endif
334#endif
335
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700336#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200337# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
338# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700339# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200340# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000341# endif
342#endif
343
344/* Suppress unused-variable warnings by "using" E. */
345#if ! defined lint || defined __GNUC__
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600346# define YY_USE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000347#else
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600348# define YY_USE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000349#endif
350
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700351/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Angel Pons437da712021-09-03 16:51:40 +0200352#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
353# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
354# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
355 _Pragma ("GCC diagnostic push") \
356 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
357# else
358# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
Nico Huberd9b2f792020-04-28 16:28:03 +0200359 _Pragma ("GCC diagnostic push") \
360 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700361 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Angel Pons437da712021-09-03 16:51:40 +0200362# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200363# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700364 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000365#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700366# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000367#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700368#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
369# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
370# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000371#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700372#ifndef YY_INITIAL_VALUE
373# define YY_INITIAL_VALUE(Value) /* Nothing. */
374#endif
375
Nico Huberd9b2f792020-04-28 16:28:03 +0200376#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
377# define YY_IGNORE_USELESS_CAST_BEGIN \
378 _Pragma ("GCC diagnostic push") \
379 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
380# define YY_IGNORE_USELESS_CAST_END \
381 _Pragma ("GCC diagnostic pop")
382#endif
383#ifndef YY_IGNORE_USELESS_CAST_BEGIN
384# define YY_IGNORE_USELESS_CAST_BEGIN
385# define YY_IGNORE_USELESS_CAST_END
386#endif
387
388
389#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000390
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700391#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000392
393/* The parser invokes alloca or malloc; define the necessary symbols. */
394
395# ifdef YYSTACK_USE_ALLOCA
396# if YYSTACK_USE_ALLOCA
397# ifdef __GNUC__
398# define YYSTACK_ALLOC __builtin_alloca
399# elif defined __BUILTIN_VA_ARG_INCR
400# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
401# elif defined _AIX
402# define YYSTACK_ALLOC __alloca
403# elif defined _MSC_VER
404# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
405# define alloca _alloca
406# else
407# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700408# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000409# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700410 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200411# ifndef EXIT_SUCCESS
412# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000413# endif
414# endif
415# endif
416# endif
417# endif
418
419# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700420 /* Pacify GCC's 'empty if-body' warning. */
421# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000422# ifndef YYSTACK_ALLOC_MAXIMUM
423 /* The OS might guarantee only one guard page at the bottom of the stack,
424 and a page size can be as small as 4096 bytes. So we cannot safely
425 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
426 to allow for a few compiler-allocated temporary stack slots. */
427# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
428# endif
429# else
430# define YYSTACK_ALLOC YYMALLOC
431# define YYSTACK_FREE YYFREE
432# ifndef YYSTACK_ALLOC_MAXIMUM
433# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
434# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200435# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000436 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700437 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000438# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200439# ifndef EXIT_SUCCESS
440# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000441# endif
442# endif
443# ifndef YYMALLOC
444# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700445# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000446void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
447# endif
448# endif
449# ifndef YYFREE
450# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700451# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000452void free (void *); /* INFRINGES ON USER NAME SPACE */
453# endif
454# endif
455# endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700456#endif /* !defined yyoverflow */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000457
458#if (! defined yyoverflow \
459 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700460 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000461
462/* A type that is properly aligned for any stack member. */
463union yyalloc
464{
Nico Huberd9b2f792020-04-28 16:28:03 +0200465 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000466 YYSTYPE yyvs_alloc;
467};
468
469/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200470# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000471
472/* The size of an array large to enough to hold all stacks, each with
473 N elements. */
474# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200475 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000476 + YYSTACK_GAP_MAXIMUM)
477
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200478# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000479
480/* Relocate STACK from its old location to the new one. The
481 local variables YYSIZE and YYSTACKSIZE give the old and new number of
482 elements in the stack, and YYPTR gives the new location of the
483 stack. Advance YYPTR to a properly aligned location for the next
484 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700485# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
486 do \
487 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200488 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700489 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
490 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200491 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
492 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700493 } \
494 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000495
496#endif
497
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200498#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700499/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200500 not overlap. */
501# ifndef YYCOPY
502# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700503# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200504 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200505# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700506# define YYCOPY(Dst, Src, Count) \
507 do \
508 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200509 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700510 for (yyi = 0; yyi < (Count); yyi++) \
511 (Dst)[yyi] = (Src)[yyi]; \
512 } \
513 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200514# endif
515# endif
516#endif /* !YYCOPY_NEEDED */
517
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000518/* YYFINAL -- State number of the termination state. */
Duncan Laurie47b7b342020-05-15 15:39:08 -0700519#define YYFINAL 2
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000520/* YYLAST -- Last index in YYTABLE. */
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100521#define YYLAST 109
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000522
523/* YYNTOKENS -- Number of terminals. */
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100524#define YYNTOKENS 48
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000525/* YYNNTS -- Number of nonterminals. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200526#define YYNNTS 33
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000527/* YYNRULES -- Number of rules. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200528#define YYNRULES 62
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700529/* YYNSTATES -- Number of states. */
Nico Huberc0fc38e2022-08-06 19:02:59 +0200530#define YYNSTATES 108
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000531
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100532/* YYMAXUTOK -- Last valid token kind. */
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100533#define YYMAXUTOK 302
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000534
Nico Huberd9b2f792020-04-28 16:28:03 +0200535
536/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
537 as returned by yylex, with out-of-bounds checking. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700538#define YYTRANSLATE(YYX) \
539 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
540 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
541 : YYSYMBOL_YYUNDEF)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000542
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700543/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200544 as returned by yylex. */
545static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000546{
547 0, 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, 2, 2, 2, 2,
572 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
573 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200574 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000575 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Angel Pons437da712021-09-03 16:51:40 +0200576 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100577 45, 46, 47
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000578};
579
580#if YYDEBUG
Angel Pons437da712021-09-03 16:51:40 +0200581/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600582static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000583{
Nico Huber859ecdf2021-02-28 16:18:18 +0100584 0, 26, 26, 26, 26, 29, 29, 29, 30, 30,
585 31, 31, 32, 32, 34, 34, 34, 34, 34, 34,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200586 34, 34, 34, 34, 34, 36, 36, 45, 45, 53,
587 53, 61, 63, 67, 67, 69, 72, 75, 78, 81,
588 84, 87, 90, 93, 96, 99, 103, 106, 106, 109,
589 109, 112, 118, 118, 121, 120, 125, 125, 133, 133,
590 139, 143, 146
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000591};
592#endif
593
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700594/** Accessing symbol of state STATE. */
595#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
596
597#if YYDEBUG || 0
598/* The user-facing name of the symbol whose (internal) number is
599 YYSYMBOL. No bounds checking. */
600static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
601
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000602/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
603 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
604static const char *const yytname[] =
605{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700606 "\"end of file\"", "error", "\"invalid token\"", "CHIP", "DEVICE",
607 "REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
608 "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
609 "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
Angel Pons437da712021-09-03 16:51:40 +0200610 "SLOT_DESC", "SMBIOS_DEV_INFO", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
611 "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100612 "GPIO", "MDIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
Nico Huberc0fc38e2022-08-06 19:02:59 +0200613 "FW_CONFIG_PROBE", "PIPE", "OPS", "$accept", "devtree",
614 "chipchild_nondev", "chipchild", "chipchildren", "chipchildren_dev",
615 "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status",
616 "resource", "reference", "registers", "subsystemid", "ioapic_irq",
Angel Pons437da712021-09-03 16:51:40 +0200617 "smbios_slot_desc", "smbios_dev_info", "fw_config_table",
618 "fw_config_table_children", "fw_config_field_children",
619 "fw_config_field_bits", "fw_config_field_bits_repeating",
620 "fw_config_field", "$@4", "$@5", "$@6", "fw_config_option",
Nico Huberc0fc38e2022-08-06 19:02:59 +0200621 "fw_config_probe", "ops", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000622};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700623
624static const char *
625yysymbol_name (yysymbol_kind_t yysymbol)
626{
627 return yytname[yysymbol];
628}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000629#endif
630
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100631#define YYPACT_NINF (-49)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700632
Nico Huberd9b2f792020-04-28 16:28:03 +0200633#define yypact_value_is_default(Yyn) \
634 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700635
Nico Huberd9b2f792020-04-28 16:28:03 +0200636#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700637
Nico Huberd9b2f792020-04-28 16:28:03 +0200638#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700639 0
640
Angel Pons437da712021-09-03 16:51:40 +0200641/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
642 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000643static const yytype_int8 yypact[] =
644{
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100645 -49, 8, -49, 2, -49, -49, -49, -49, -4, 39,
646 -49, 3, -49, 5, 4, 12, 39, 16, -49, -49,
647 -49, -49, 11, 34, 23, 7, 47, -49, -49, 39,
648 26, 13, -49, 6, 51, 41, 44, -49, -49, -49,
649 -49, -49, 32, -49, -12, -49, -49, -49, 46, 6,
650 -49, -49, -8, 26, 13, -49, -49, 50, -49, -49,
651 -49, -49, -49, -49, -7, 40, 0, -49, -49, -49,
652 42, -49, 52, 43, 45, 48, 54, 57, -49, -49,
653 -49, -49, -49, -49, -49, -49, -49, -49, 21, 49,
654 59, 60, 53, 55, 62, -49, -49, 56, 63, -49,
655 61, 58, -49, -49, 64, -49, -49, -49
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000656};
657
Angel Pons437da712021-09-03 16:51:40 +0200658/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
659 Performed when YYTABLE does not specify something else to do. Zero
660 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200661static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700662{
Nico Huberc0fc38e2022-08-06 19:02:59 +0200663 2, 0, 1, 0, 48, 3, 4, 25, 0, 0,
664 46, 0, 47, 0, 0, 0, 0, 0, 5, 11,
665 7, 6, 58, 0, 0, 0, 0, 13, 26, 12,
666 56, 53, 50, 0, 31, 0, 0, 9, 10, 8,
667 51, 50, 0, 54, 0, 33, 34, 29, 0, 0,
668 37, 36, 0, 0, 53, 50, 59, 0, 49, 24,
669 32, 27, 57, 52, 0, 0, 0, 24, 55, 60,
670 0, 30, 0, 0, 0, 0, 0, 0, 15, 14,
671 16, 21, 17, 18, 19, 20, 22, 23, 0, 0,
672 0, 45, 0, 0, 0, 62, 28, 0, 43, 44,
673 38, 0, 61, 35, 42, 39, 40, 41
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700674};
675
Angel Pons437da712021-09-03 16:51:40 +0200676/* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000677static const yytype_int8 yypgoto[] =
678{
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100679 -49, -49, 65, -49, -49, 66, 17, -1, -49, -28,
680 -49, -49, -49, 36, -49, -49, -48, -49, -49, -49,
681 -49, -49, -49, -32, 67, 35, -49, -49, -49, -49,
682 -49, -49, -49
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000683};
684
Angel Pons437da712021-09-03 16:51:40 +0200685/* YYDEFGOTO[NTERM-NUM]. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700686static const yytype_int8 yydefgoto[] =
687{
Nico Huber859ecdf2021-02-28 16:18:18 +0100688 0, 1, 16, 38, 29, 17, 66, 18, 9, 19,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200689 67, 59, 49, 47, 80, 20, 21, 82, 83, 84,
690 85, 6, 8, 44, 31, 43, 12, 55, 41, 32,
691 58, 86, 87
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700692};
693
Angel Pons437da712021-09-03 16:51:40 +0200694/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
695 positive, shift that token. If negative, reduce the rule whose
696 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200697static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000698{
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100699 5, 39, 56, 3, 13, 14, 62, 68, 2, 52,
700 10, 3, 23, 70, 71, 45, 46, 24, 81, 7,
701 22, 25, 35, 64, 3, 13, 14, 72, 73, 26,
702 28, 74, 57, 75, 70, 96, 57, 57, 79, 11,
703 81, 30, 3, 13, 14, 76, 15, 77, 72, 73,
704 4, 33, 74, 34, 75, 36, 40, 48, 50, 42,
705 79, 51, 53, 60, 97, 78, 76, 65, 77, 90,
706 69, 94, 89, 91, 95, 92, 98, 99, 93, 102,
707 104, 107, 27, 100, 88, 61, 103, 78, 106, 63,
708 101, 0, 0, 105, 37, 0, 0, 0, 0, 0,
709 0, 0, 0, 0, 0, 0, 0, 0, 0, 54
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000710};
711
Patrick Georgi8f625f62010-05-05 13:13:47 +0000712static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000713{
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100714 1, 29, 14, 3, 4, 5, 14, 14, 0, 41,
715 14, 3, 7, 13, 14, 9, 10, 12, 66, 17,
716 17, 17, 15, 55, 3, 4, 5, 27, 28, 17,
717 14, 31, 44, 33, 13, 14, 44, 44, 66, 43,
718 88, 30, 3, 4, 5, 45, 7, 47, 27, 28,
719 42, 17, 31, 30, 33, 8, 30, 6, 17, 46,
720 88, 17, 30, 17, 15, 66, 45, 17, 47, 17,
721 30, 17, 30, 30, 17, 30, 17, 17, 30, 17,
722 17, 17, 16, 30, 67, 49, 30, 88, 30, 54,
723 35, -1, -1, 32, 29, -1, -1, -1, -1, -1,
724 -1, -1, -1, -1, -1, -1, -1, -1, -1, 42
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000725};
726
Angel Pons437da712021-09-03 16:51:40 +0200727/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
728 state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200729static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000730{
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100731 0, 49, 0, 3, 42, 55, 69, 17, 70, 56,
732 14, 43, 74, 4, 5, 7, 50, 53, 55, 57,
733 63, 64, 17, 7, 12, 17, 17, 53, 14, 52,
734 30, 72, 77, 17, 30, 15, 8, 50, 51, 57,
735 30, 76, 46, 73, 71, 9, 10, 61, 6, 60,
736 17, 17, 71, 30, 72, 75, 14, 44, 78, 59,
737 17, 61, 14, 73, 71, 17, 54, 58, 14, 30,
738 13, 14, 27, 28, 31, 33, 45, 47, 55, 57,
739 62, 64, 65, 66, 67, 68, 79, 80, 54, 30,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200740 17, 30, 30, 30, 17, 17, 14, 15, 17, 17,
741 30, 35, 17, 30, 17, 32, 30, 17
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000742};
743
Angel Pons437da712021-09-03 16:51:40 +0200744/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200745static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700746{
Mario Scheithauer67f63e72022-11-02 15:57:10 +0100747 0, 48, 49, 49, 49, 50, 50, 50, 51, 51,
748 52, 52, 53, 53, 54, 54, 54, 54, 54, 54,
749 54, 54, 54, 54, 54, 56, 55, 58, 57, 59,
750 57, 60, 60, 61, 61, 62, 63, 64, 65, 65,
751 66, 67, 67, 67, 68, 68, 69, 70, 70, 71,
752 71, 72, 73, 73, 75, 74, 76, 74, 77, 74,
753 78, 79, 80
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700754};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000755
Angel Pons437da712021-09-03 16:51:40 +0200756/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200757static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700758{
Nico Huber859ecdf2021-02-28 16:18:18 +0100759 0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
760 2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
Nico Huberc0fc38e2022-08-06 19:02:59 +0200761 2, 2, 2, 2, 0, 0, 5, 0, 8, 0,
762 7, 0, 2, 1, 1, 4, 4, 4, 3, 4,
763 4, 5, 4, 3, 3, 2, 3, 2, 0, 2,
764 0, 2, 3, 0, 0, 7, 0, 6, 0, 5,
765 3, 3, 2
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700766};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000767
768
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700769enum { YYENOMEM = -2 };
770
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700771#define yyerrok (yyerrstatus = 0)
772#define yyclearin (yychar = YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000773
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700774#define YYACCEPT goto yyacceptlab
775#define YYABORT goto yyabortlab
776#define YYERROR goto yyerrorlab
Angel Pons437da712021-09-03 16:51:40 +0200777#define YYNOMEM goto yyexhaustedlab
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700778
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000779
780#define YYRECOVERING() (!!yyerrstatus)
781
Nico Huberd9b2f792020-04-28 16:28:03 +0200782#define YYBACKUP(Token, Value) \
783 do \
784 if (yychar == YYEMPTY) \
785 { \
786 yychar = (Token); \
787 yylval = (Value); \
788 YYPOPSTACK (yylen); \
789 yystate = *yyssp; \
790 goto yybackup; \
791 } \
792 else \
793 { \
794 yyerror (YY_("syntax error: cannot back up")); \
795 YYERROR; \
796 } \
797 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700798
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700799/* Backward compatibility with an undocumented macro.
800 Use YYerror or YYUNDEF. */
801#define YYERRCODE YYUNDEF
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000802
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000803
804/* Enable debugging if requested. */
805#if YYDEBUG
806
807# ifndef YYFPRINTF
808# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
809# define YYFPRINTF fprintf
810# endif
811
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700812# define YYDPRINTF(Args) \
813do { \
814 if (yydebug) \
815 YYFPRINTF Args; \
816} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000817
Angel Pons437da712021-09-03 16:51:40 +0200818
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000819
820
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700821# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700822do { \
823 if (yydebug) \
824 { \
825 YYFPRINTF (stderr, "%s ", Title); \
826 yy_symbol_print (stderr, \
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700827 Kind, Value); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700828 YYFPRINTF (stderr, "\n"); \
829 } \
830} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000831
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700832
Nico Huberd9b2f792020-04-28 16:28:03 +0200833/*-----------------------------------.
834| Print this symbol's value on YYO. |
835`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700836
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000837static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700838yy_symbol_value_print (FILE *yyo,
839 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000840{
Nico Huberd9b2f792020-04-28 16:28:03 +0200841 FILE *yyoutput = yyo;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600842 YY_USE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000843 if (!yyvaluep)
844 return;
Nico Huberd9b2f792020-04-28 16:28:03 +0200845 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600846 YY_USE (yykind);
Nico Huberd9b2f792020-04-28 16:28:03 +0200847 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000848}
849
850
Nico Huberd9b2f792020-04-28 16:28:03 +0200851/*---------------------------.
852| Print this symbol on YYO. |
853`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000854
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000855static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700856yy_symbol_print (FILE *yyo,
857 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000858{
Nico Huberd9b2f792020-04-28 16:28:03 +0200859 YYFPRINTF (yyo, "%s %s (",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700860 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000861
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700862 yy_symbol_value_print (yyo, yykind, yyvaluep);
Nico Huberd9b2f792020-04-28 16:28:03 +0200863 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000864}
865
866/*------------------------------------------------------------------.
867| yy_stack_print -- Print the state stack from its BOTTOM up to its |
868| TOP (included). |
869`------------------------------------------------------------------*/
870
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000871static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200872yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000873{
874 YYFPRINTF (stderr, "Stack now");
875 for (; yybottom <= yytop; yybottom++)
876 {
877 int yybot = *yybottom;
878 YYFPRINTF (stderr, " %d", yybot);
879 }
880 YYFPRINTF (stderr, "\n");
881}
882
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700883# define YY_STACK_PRINT(Bottom, Top) \
884do { \
885 if (yydebug) \
886 yy_stack_print ((Bottom), (Top)); \
887} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000888
889
890/*------------------------------------------------.
891| Report that the YYRULE is going to be reduced. |
892`------------------------------------------------*/
893
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000894static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700895yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
896 int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000897{
Nico Huberd9b2f792020-04-28 16:28:03 +0200898 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000899 int yynrhs = yyr2[yyrule];
900 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200901 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700902 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000903 /* The symbols being reduced. */
904 for (yyi = 0; yyi < yynrhs; yyi++)
905 {
906 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700907 yy_symbol_print (stderr,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700908 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
909 &yyvsp[(yyi + 1) - (yynrhs)]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000910 YYFPRINTF (stderr, "\n");
911 }
912}
913
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700914# define YY_REDUCE_PRINT(Rule) \
915do { \
916 if (yydebug) \
917 yy_reduce_print (yyssp, yyvsp, Rule); \
918} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000919
920/* Nonzero means print parse trace. It is left uninitialized so that
921 multiple parsers can coexist. */
922int yydebug;
923#else /* !YYDEBUG */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700924# define YYDPRINTF(Args) ((void) 0)
925# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000926# define YY_STACK_PRINT(Bottom, Top)
927# define YY_REDUCE_PRINT(Rule)
928#endif /* !YYDEBUG */
929
930
931/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700932#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000933# define YYINITDEPTH 200
934#endif
935
936/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
937 if the built-in stack extension method is used).
938
939 Do not make this value too large; the results are undefined if
940 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
941 evaluated with infinite-precision integer arithmetic. */
942
943#ifndef YYMAXDEPTH
944# define YYMAXDEPTH 10000
945#endif
946
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
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000951
952/*-----------------------------------------------.
953| Release the memory associated to this symbol. |
954`-----------------------------------------------*/
955
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000956static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700957yydestruct (const char *yymsg,
958 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000959{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600960 YY_USE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000961 if (!yymsg)
962 yymsg = "Deleting";
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700963 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000964
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700965 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600966 YY_USE (yykind);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700967 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000968}
969
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200970
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100971/* Lookahead token kind. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000972int yychar;
973
974/* The semantic value of the lookahead symbol. */
975YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000976/* Number of syntax errors so far. */
977int yynerrs;
978
979
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700980
981
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200982/*----------.
983| yyparse. |
984`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000985
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000986int
987yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000988{
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100989 yy_state_fast_t yystate = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000990 /* Number of tokens to shift before error messages enabled. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100991 int yyerrstatus = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000992
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100993 /* Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000994 to reallocate them elsewhere. */
995
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700996 /* Their size. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100997 YYPTRDIFF_T yystacksize = YYINITDEPTH;
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700998
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100999 /* The state stack: array, bottom, top. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001000 yy_state_t yyssa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001001 yy_state_t *yyss = yyssa;
1002 yy_state_t *yyssp = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001003
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001004 /* The semantic value stack: array, bottom, top. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001005 YYSTYPE yyvsa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001006 YYSTYPE *yyvs = yyvsa;
1007 YYSTYPE *yyvsp = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001008
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001009 int yyn;
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001010 /* The return value of yyparse. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001011 int yyresult;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001012 /* Lookahead symbol kind. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001013 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001014 /* The variables used to return semantic value and location from the
1015 action routines. */
1016 YYSTYPE yyval;
1017
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001018
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001019
1020#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1021
1022 /* The number of symbols on the RHS of the reduced rule.
1023 Keep to zero when no symbol should be popped. */
1024 int yylen = 0;
1025
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001026 YYDPRINTF ((stderr, "Starting parse\n"));
1027
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001028 yychar = YYEMPTY; /* Cause a token to be read. */
Angel Pons437da712021-09-03 16:51:40 +02001029
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001030 goto yysetstate;
1031
Nico Huberd9b2f792020-04-28 16:28:03 +02001032
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001033/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001034| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001035`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001036yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001037 /* In all cases, when you get here, the value and location stacks
1038 have just been pushed. So pushing a state here evens the stacks. */
1039 yyssp++;
1040
Nico Huberd9b2f792020-04-28 16:28:03 +02001041
1042/*--------------------------------------------------------------------.
1043| yysetstate -- set current state (the top of the stack) to yystate. |
1044`--------------------------------------------------------------------*/
1045yysetstate:
1046 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1047 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1048 YY_IGNORE_USELESS_CAST_BEGIN
1049 *yyssp = YY_CAST (yy_state_t, yystate);
1050 YY_IGNORE_USELESS_CAST_END
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001051 YY_STACK_PRINT (yyss, yyssp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001052
1053 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001054#if !defined yyoverflow && !defined YYSTACK_RELOCATE
Angel Pons437da712021-09-03 16:51:40 +02001055 YYNOMEM;
Nico Huberd9b2f792020-04-28 16:28:03 +02001056#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001057 {
1058 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001059 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001060
Nico Huberd9b2f792020-04-28 16:28:03 +02001061# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001062 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001063 /* Give user a chance to reallocate the stack. Use copies of
1064 these so that the &'s don't force the real ones into
1065 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001066 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001067 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001068
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001069 /* Each stack pointer address is followed by the size of the
1070 data in use in that stack, in bytes. This used to be a
1071 conditional around just the two extra args, but that might
1072 be undefined if yyoverflow is a macro. */
1073 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001074 &yyss1, yysize * YYSIZEOF (*yyssp),
1075 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001076 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001077 yyss = yyss1;
1078 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001079 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001080# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001081 /* Extend the stack our own way. */
1082 if (YYMAXDEPTH <= yystacksize)
Angel Pons437da712021-09-03 16:51:40 +02001083 YYNOMEM;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001084 yystacksize *= 2;
1085 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001086 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001087
1088 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001089 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001090 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001091 YY_CAST (union yyalloc *,
1092 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001093 if (! yyptr)
Angel Pons437da712021-09-03 16:51:40 +02001094 YYNOMEM;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001095 YYSTACK_RELOCATE (yyss_alloc, yyss);
1096 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001097# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001098 if (yyss1 != yyssa)
1099 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001100 }
1101# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001102
1103 yyssp = yyss + yysize - 1;
1104 yyvsp = yyvs + yysize - 1;
1105
Nico Huberd9b2f792020-04-28 16:28:03 +02001106 YY_IGNORE_USELESS_CAST_BEGIN
1107 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1108 YY_CAST (long, yystacksize)));
1109 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001110
1111 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001112 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001113 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001114#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001115
Angel Pons437da712021-09-03 16:51:40 +02001116
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001117 if (yystate == YYFINAL)
1118 YYACCEPT;
1119
1120 goto yybackup;
1121
Nico Huberd9b2f792020-04-28 16:28:03 +02001122
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001123/*-----------.
1124| yybackup. |
1125`-----------*/
1126yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001127 /* Do appropriate processing given the current state. Read a
1128 lookahead token if we need one and don't already have one. */
1129
1130 /* First try to decide what to do without reference to lookahead token. */
1131 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001132 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001133 goto yydefault;
1134
1135 /* Not known => get a lookahead token if don't already have one. */
1136
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001137 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001138 if (yychar == YYEMPTY)
1139 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001140 YYDPRINTF ((stderr, "Reading a token\n"));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001141 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001142 }
1143
1144 if (yychar <= YYEOF)
1145 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001146 yychar = YYEOF;
1147 yytoken = YYSYMBOL_YYEOF;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001148 YYDPRINTF ((stderr, "Now at end of input.\n"));
1149 }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001150 else if (yychar == YYerror)
1151 {
1152 /* The scanner already issued an error message, process directly
1153 to error recovery. But do not keep the error token as
1154 lookahead, it is too special and may lead us to an endless
1155 loop in error recovery. */
1156 yychar = YYUNDEF;
1157 yytoken = YYSYMBOL_YYerror;
1158 goto yyerrlab1;
1159 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001160 else
1161 {
1162 yytoken = YYTRANSLATE (yychar);
1163 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1164 }
1165
1166 /* If the proper action on seeing token YYTOKEN is to reduce or to
1167 detect an error, take that action. */
1168 yyn += yytoken;
1169 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1170 goto yydefault;
1171 yyn = yytable[yyn];
1172 if (yyn <= 0)
1173 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001174 if (yytable_value_is_error (yyn))
1175 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001176 yyn = -yyn;
1177 goto yyreduce;
1178 }
1179
1180 /* Count tokens shifted since error; after three, turn off error
1181 status. */
1182 if (yyerrstatus)
1183 yyerrstatus--;
1184
1185 /* Shift the lookahead token. */
1186 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001187 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001188 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001189 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001190 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001191
Nico Huberd9b2f792020-04-28 16:28:03 +02001192 /* Discard the shifted token. */
1193 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001194 goto yynewstate;
1195
1196
1197/*-----------------------------------------------------------.
1198| yydefault -- do the default action for the current state. |
1199`-----------------------------------------------------------*/
1200yydefault:
1201 yyn = yydefact[yystate];
1202 if (yyn == 0)
1203 goto yyerrlab;
1204 goto yyreduce;
1205
1206
1207/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001208| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001209`-----------------------------*/
1210yyreduce:
1211 /* yyn is the number of a rule to reduce with. */
1212 yylen = yyr2[yyn];
1213
1214 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001215 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001216
1217 Otherwise, the following line sets YYVAL to garbage.
1218 This behavior is undocumented and Bison
1219 users should not rely upon it. Assigning to YYVAL
1220 unconditionally makes the parser a bit smaller, and it avoids a
1221 GCC warning that YYVAL may be used uninitialized. */
1222 yyval = yyvsp[1-yylen];
1223
1224
1225 YY_REDUCE_PRINT (yyn);
1226 switch (yyn)
1227 {
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001228 case 2: /* devtree: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001229 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001230 break;
1231
Nico Huberc0fc38e2022-08-06 19:02:59 +02001232 case 25: /* @1: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001233 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001234 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1235 chip_enqueue_tail(cur_chip_instance);
1236 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001237}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001238 break;
1239
Nico Huberc0fc38e2022-08-06 19:02:59 +02001240 case 26: /* chip: CHIP STRING @1 chipchildren_dev END */
Nico Huber859ecdf2021-02-28 16:18:18 +01001241 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001242 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001243}
1244 break;
1245
Nico Huberc0fc38e2022-08-06 19:02:59 +02001246 case 27: /* @2: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001247 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001248 (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 +02001249 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001250}
Patrick Georgi68befd52010-05-05 12:05:25 +00001251 break;
1252
Nico Huberc0fc38e2022-08-06 19:02:59 +02001253 case 28: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001254 {
1255 cur_parent = (yyvsp[-2].dev)->parent;
1256}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001257 break;
1258
Nico Huberc0fc38e2022-08-06 19:02:59 +02001259 case 29: /* @3: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001260 {
1261 (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1262 cur_parent = (yyval.dev)->last_bus;
1263}
1264 break;
1265
Nico Huberc0fc38e2022-08-06 19:02:59 +02001266 case 30: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001267 {
1268 cur_parent = (yyvsp[-2].dev)->parent;
1269}
1270 break;
1271
Nico Huberc0fc38e2022-08-06 19:02:59 +02001272 case 31: /* alias: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001273 {
1274 (yyval.string) = NULL;
1275}
1276 break;
1277
Nico Huberc0fc38e2022-08-06 19:02:59 +02001278 case 32: /* alias: ALIAS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001279 {
1280 (yyval.string) = (yyvsp[0].string);
1281}
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001282 break;
1283
Nico Huberc0fc38e2022-08-06 19:02:59 +02001284 case 35: /* resource: RESOURCE NUMBER EQUALS NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001285 { 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 +00001286 break;
1287
Nico Huberc0fc38e2022-08-06 19:02:59 +02001288 case 36: /* reference: REFERENCE STRING ASSOCIATION STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001289 { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001290 break;
1291
Nico Huberc0fc38e2022-08-06 19:02:59 +02001292 case 37: /* registers: REGISTER STRING EQUALS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001293 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001294 break;
1295
Nico Huberc0fc38e2022-08-06 19:02:59 +02001296 case 38: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001297 { 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 +02001298 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001299
Nico Huberc0fc38e2022-08-06 19:02:59 +02001300 case 39: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
Nico Huber8e1ea522020-06-03 10:20:07 -07001301 { 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 +02001302 break;
1303
Nico Huberc0fc38e2022-08-06 19:02:59 +02001304 case 40: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001305 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1306 break;
1307
Nico Huberc0fc38e2022-08-06 19:02:59 +02001308 case 41: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001309 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1310 break;
1311
Nico Huberc0fc38e2022-08-06 19:02:59 +02001312 case 42: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001313 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1314 break;
1315
Nico Huberc0fc38e2022-08-06 19:02:59 +02001316 case 43: /* smbios_slot_desc: SLOT_DESC STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001317 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1318 break;
1319
Nico Huberc0fc38e2022-08-06 19:02:59 +02001320 case 44: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER STRING */
Angel Pons437da712021-09-03 16:51:40 +02001321 { add_smbios_dev_info(cur_parent, strtol((yyvsp[-1].string), NULL, 0), (yyvsp[0].string)); }
1322 break;
1323
Nico Huberc0fc38e2022-08-06 19:02:59 +02001324 case 45: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER */
Angel Pons437da712021-09-03 16:51:40 +02001325 { add_smbios_dev_info(cur_parent, strtol((yyvsp[0].string), NULL, 0), NULL); }
1326 break;
1327
Nico Huberc0fc38e2022-08-06 19:02:59 +02001328 case 46: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001329 { }
1330 break;
1331
Nico Huberc0fc38e2022-08-06 19:02:59 +02001332 case 51: /* fw_config_field_bits: NUMBER NUMBER */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001333{
1334 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 -07001335}
1336 break;
1337
Nico Huberc0fc38e2022-08-06 19:02:59 +02001338 case 54: /* $@4: %empty */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001339 { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
Nico Huber8e1ea522020-06-03 10:20:07 -07001340 break;
1341
Nico Huberc0fc38e2022-08-06 19:02:59 +02001342 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 -06001343 { cur_bits = NULL; }
1344 break;
1345
Nico Huberc0fc38e2022-08-06 19:02:59 +02001346 case 56: /* $@5: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001347 {
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001348 cur_bits = NULL;
1349 append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1350 cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits);
Nico Huber8e1ea522020-06-03 10:20:07 -07001351}
1352 break;
1353
Nico Huberc0fc38e2022-08-06 19:02:59 +02001354 case 57: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001355 { cur_bits = NULL; }
Nico Huber8e1ea522020-06-03 10:20:07 -07001356 break;
1357
Nico Huberc0fc38e2022-08-06 19:02:59 +02001358 case 58: /* $@6: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001359 {
1360 cur_field = get_fw_config_field((yyvsp[0].string));
1361}
Nico Huber8e1ea522020-06-03 10:20:07 -07001362 break;
1363
Nico Huberc0fc38e2022-08-06 19:02:59 +02001364 case 59: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001365 { cur_bits = NULL; }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001366 break;
1367
Nico Huberc0fc38e2022-08-06 19:02:59 +02001368 case 60: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001369 { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001370 break;
1371
Nico Huberc0fc38e2022-08-06 19:02:59 +02001372 case 61: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001373 { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1374 break;
1375
Nico Huberc0fc38e2022-08-06 19:02:59 +02001376 case 62: /* ops: OPS STRING */
1377 { add_device_ops(cur_parent, (yyvsp[0].string)); }
1378 break;
1379
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001380
1381
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001382 default: break;
1383 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001384 /* User semantic actions sometimes alter yychar, and that requires
1385 that yytoken be updated with the new translation. We take the
1386 approach of translating immediately before every use of yytoken.
1387 One alternative is translating here after every semantic action,
1388 but that translation would be missed if the semantic action invokes
1389 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1390 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1391 incorrect destructor might then be invoked immediately. In the
1392 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1393 to an incorrect destructor call or verbose syntax error message
1394 before the lookahead is translated. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001395 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001396
1397 YYPOPSTACK (yylen);
1398 yylen = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001399
1400 *++yyvsp = yyval;
1401
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001402 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001403 that goes to, based on the state we popped back to and the rule
1404 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001405 {
1406 const int yylhs = yyr1[yyn] - YYNTOKENS;
1407 const int yyi = yypgoto[yylhs] + *yyssp;
1408 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1409 ? yytable[yyi]
1410 : yydefgoto[yylhs]);
1411 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001412
1413 goto yynewstate;
1414
1415
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001416/*--------------------------------------.
1417| yyerrlab -- here on detecting error. |
1418`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001419yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001420 /* Make sure we have latest lookahead translation. See comments at
1421 user semantic actions for why this is necessary. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001422 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001423 /* If not already recovering from an error, report this error. */
1424 if (!yyerrstatus)
1425 {
1426 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001427 yyerror (YY_("syntax error"));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001428 }
1429
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001430 if (yyerrstatus == 3)
1431 {
1432 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001433 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001434
1435 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001436 {
1437 /* Return failure if at end of input. */
1438 if (yychar == YYEOF)
1439 YYABORT;
1440 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001441 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001442 {
1443 yydestruct ("Error: discarding",
1444 yytoken, &yylval);
1445 yychar = YYEMPTY;
1446 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001447 }
1448
1449 /* Else will try to reuse lookahead token after shifting the error
1450 token. */
1451 goto yyerrlab1;
1452
1453
1454/*---------------------------------------------------.
1455| yyerrorlab -- error raised explicitly by YYERROR. |
1456`---------------------------------------------------*/
1457yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001458 /* Pacify compilers when the user code never invokes YYERROR and the
1459 label yyerrorlab therefore never appears in user code. */
1460 if (0)
1461 YYERROR;
Angel Pons437da712021-09-03 16:51:40 +02001462 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001463
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001464 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001465 this YYERROR. */
1466 YYPOPSTACK (yylen);
1467 yylen = 0;
1468 YY_STACK_PRINT (yyss, yyssp);
1469 yystate = *yyssp;
1470 goto yyerrlab1;
1471
1472
1473/*-------------------------------------------------------------.
1474| yyerrlab1 -- common code for both syntax error and YYERROR. |
1475`-------------------------------------------------------------*/
1476yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001477 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001478
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001479 /* Pop stack until we find a state that shifts the error token. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001480 for (;;)
1481 {
1482 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001483 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001484 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001485 yyn += YYSYMBOL_YYerror;
1486 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001487 {
1488 yyn = yytable[yyn];
1489 if (0 < yyn)
1490 break;
1491 }
1492 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001493
1494 /* Pop the current state because it cannot handle the error token. */
1495 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001496 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001497
1498
1499 yydestruct ("Error: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001500 YY_ACCESSING_SYMBOL (yystate), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001501 YYPOPSTACK (1);
1502 yystate = *yyssp;
1503 YY_STACK_PRINT (yyss, yyssp);
1504 }
1505
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001506 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001507 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001508 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001509
1510
1511 /* Shift the error token. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001512 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001513
1514 yystate = yyn;
1515 goto yynewstate;
1516
1517
1518/*-------------------------------------.
1519| yyacceptlab -- YYACCEPT comes here. |
1520`-------------------------------------*/
1521yyacceptlab:
1522 yyresult = 0;
Angel Pons437da712021-09-03 16:51:40 +02001523 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001524
Nico Huberd9b2f792020-04-28 16:28:03 +02001525
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001526/*-----------------------------------.
1527| yyabortlab -- YYABORT comes here. |
1528`-----------------------------------*/
1529yyabortlab:
1530 yyresult = 1;
Angel Pons437da712021-09-03 16:51:40 +02001531 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001532
Nico Huberd9b2f792020-04-28 16:28:03 +02001533
Angel Pons437da712021-09-03 16:51:40 +02001534/*-----------------------------------------------------------.
1535| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
1536`-----------------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001537yyexhaustedlab:
1538 yyerror (YY_("memory exhausted"));
1539 yyresult = 2;
Angel Pons437da712021-09-03 16:51:40 +02001540 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001541
Nico Huberd9b2f792020-04-28 16:28:03 +02001542
Angel Pons437da712021-09-03 16:51:40 +02001543/*----------------------------------------------------------.
1544| yyreturnlab -- parsing is finished, clean up and return. |
1545`----------------------------------------------------------*/
1546yyreturnlab:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001547 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001548 {
1549 /* Make sure we have latest lookahead translation. See comments at
1550 user semantic actions for why this is necessary. */
1551 yytoken = YYTRANSLATE (yychar);
1552 yydestruct ("Cleanup: discarding lookahead",
1553 yytoken, &yylval);
1554 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001555 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001556 this YYABORT or YYACCEPT. */
1557 YYPOPSTACK (yylen);
1558 YY_STACK_PRINT (yyss, yyssp);
1559 while (yyssp != yyss)
1560 {
1561 yydestruct ("Cleanup: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001562 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001563 YYPOPSTACK (1);
1564 }
1565#ifndef yyoverflow
1566 if (yyss != yyssa)
1567 YYSTACK_FREE (yyss);
1568#endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001569
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001570 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001571}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001572
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001573