blob: c319a79527d5a8b1ca05a97a7d940ac9921046b4 [file] [log] [blame]
Angel Pons437da712021-09-03 16:51:40 +02001/* A Bison parser, made by GNU Bison 3.8.1. */
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. */
Angel Pons437da712021-09-03 16:51:40 +020049#define YYBISON 30801
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000050
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -060051/* Bison version string. */
Angel Pons437da712021-09-03 16:51:40 +020052#define YYBISON_VERSION "3.8.1"
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 */
159 YYSYMBOL_YYACCEPT = 46, /* $accept */
160 YYSYMBOL_devtree = 47, /* devtree */
161 YYSYMBOL_chipchild_nondev = 48, /* chipchild_nondev */
162 YYSYMBOL_chipchild = 49, /* chipchild */
163 YYSYMBOL_chipchildren = 50, /* chipchildren */
164 YYSYMBOL_chipchildren_dev = 51, /* chipchildren_dev */
165 YYSYMBOL_devicechildren = 52, /* devicechildren */
166 YYSYMBOL_chip = 53, /* chip */
167 YYSYMBOL_54_1 = 54, /* @1 */
168 YYSYMBOL_device = 55, /* device */
169 YYSYMBOL_56_2 = 56, /* @2 */
170 YYSYMBOL_57_3 = 57, /* @3 */
171 YYSYMBOL_alias = 58, /* alias */
172 YYSYMBOL_status = 59, /* status */
173 YYSYMBOL_resource = 60, /* resource */
174 YYSYMBOL_reference = 61, /* reference */
175 YYSYMBOL_registers = 62, /* registers */
176 YYSYMBOL_subsystemid = 63, /* subsystemid */
177 YYSYMBOL_ioapic_irq = 64, /* ioapic_irq */
178 YYSYMBOL_smbios_slot_desc = 65, /* smbios_slot_desc */
179 YYSYMBOL_smbios_dev_info = 66, /* smbios_dev_info */
180 YYSYMBOL_fw_config_table = 67, /* fw_config_table */
181 YYSYMBOL_fw_config_table_children = 68, /* fw_config_table_children */
182 YYSYMBOL_fw_config_field_children = 69, /* fw_config_field_children */
183 YYSYMBOL_fw_config_field_bits = 70, /* fw_config_field_bits */
184 YYSYMBOL_fw_config_field_bits_repeating = 71, /* fw_config_field_bits_repeating */
185 YYSYMBOL_fw_config_field = 72, /* fw_config_field */
186 YYSYMBOL_73_4 = 73, /* $@4 */
187 YYSYMBOL_74_5 = 74, /* $@5 */
188 YYSYMBOL_75_6 = 75, /* $@6 */
189 YYSYMBOL_fw_config_option = 76, /* fw_config_option */
190 YYSYMBOL_fw_config_probe = 77 /* fw_config_probe */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700191};
192typedef enum yysymbol_kind_t yysymbol_kind_t;
193
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000194
195
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000196
197#ifdef short
198# undef short
199#endif
200
Nico Huberd9b2f792020-04-28 16:28:03 +0200201/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
202 <limits.h> and (if available) <stdint.h> are included
203 so that the code can choose integer types of a good width. */
204
205#ifndef __PTRDIFF_MAX__
206# include <limits.h> /* INFRINGES ON USER NAME SPACE */
207# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
208# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
209# define YY_STDINT_H
210# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000211#endif
212
Nico Huberd9b2f792020-04-28 16:28:03 +0200213/* Narrow types that promote to a signed type and that can represent a
214 signed or unsigned integer of at least N bits. In tables they can
215 save space and decrease cache pressure. Promoting to a signed type
216 helps avoid bugs in integer arithmetic. */
217
218#ifdef __INT_LEAST8_MAX__
219typedef __INT_LEAST8_TYPE__ yytype_int8;
220#elif defined YY_STDINT_H
221typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000222#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700223typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000224#endif
225
Nico Huberd9b2f792020-04-28 16:28:03 +0200226#ifdef __INT_LEAST16_MAX__
227typedef __INT_LEAST16_TYPE__ yytype_int16;
228#elif defined YY_STDINT_H
229typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000230#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200231typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000232#endif
233
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600234/* Work around bug in HP-UX 11.23, which defines these macros
235 incorrectly for preprocessor constants. This workaround can likely
236 be removed in 2023, as HPE has promised support for HP-UX 11.23
237 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
238 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
239#ifdef __hpux
240# undef UINT_LEAST8_MAX
241# undef UINT_LEAST16_MAX
242# define UINT_LEAST8_MAX 255
243# define UINT_LEAST16_MAX 65535
244#endif
245
Nico Huberd9b2f792020-04-28 16:28:03 +0200246#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
247typedef __UINT_LEAST8_TYPE__ yytype_uint8;
248#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
249 && UINT_LEAST8_MAX <= INT_MAX)
250typedef uint_least8_t yytype_uint8;
251#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
252typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000253#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200254typedef short yytype_uint8;
255#endif
256
257#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
258typedef __UINT_LEAST16_TYPE__ yytype_uint16;
259#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
260 && UINT_LEAST16_MAX <= INT_MAX)
261typedef uint_least16_t yytype_uint16;
262#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
263typedef unsigned short yytype_uint16;
264#else
265typedef int yytype_uint16;
266#endif
267
268#ifndef YYPTRDIFF_T
269# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
270# define YYPTRDIFF_T __PTRDIFF_TYPE__
271# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
272# elif defined PTRDIFF_MAX
273# ifndef ptrdiff_t
274# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
275# endif
276# define YYPTRDIFF_T ptrdiff_t
277# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
278# else
279# define YYPTRDIFF_T long
280# define YYPTRDIFF_MAXIMUM LONG_MAX
281# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000282#endif
283
284#ifndef YYSIZE_T
285# ifdef __SIZE_TYPE__
286# define YYSIZE_T __SIZE_TYPE__
287# elif defined size_t
288# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200289# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000290# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
291# define YYSIZE_T size_t
292# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200293# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000294# endif
295#endif
296
Nico Huberd9b2f792020-04-28 16:28:03 +0200297#define YYSIZE_MAXIMUM \
298 YY_CAST (YYPTRDIFF_T, \
299 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
300 ? YYPTRDIFF_MAXIMUM \
301 : YY_CAST (YYSIZE_T, -1)))
302
303#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
304
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700305
Nico Huberd9b2f792020-04-28 16:28:03 +0200306/* Stored state numbers (used for stacks). */
307typedef yytype_int8 yy_state_t;
308
309/* State numbers in computations. */
310typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000311
312#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200313# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000314# if ENABLE_NLS
315# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700316# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000317# endif
318# endif
319# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700320# define YY_(Msgid) Msgid
321# endif
322#endif
323
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700324
Nico Huberd9b2f792020-04-28 16:28:03 +0200325#ifndef YY_ATTRIBUTE_PURE
326# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
327# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700328# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200329# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700330# endif
331#endif
332
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700333#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200334# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
335# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700336# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200337# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000338# endif
339#endif
340
341/* Suppress unused-variable warnings by "using" E. */
342#if ! defined lint || defined __GNUC__
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600343# define YY_USE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000344#else
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600345# define YY_USE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000346#endif
347
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700348/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Angel Pons437da712021-09-03 16:51:40 +0200349#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
350# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
351# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
352 _Pragma ("GCC diagnostic push") \
353 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
354# else
355# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
Nico Huberd9b2f792020-04-28 16:28:03 +0200356 _Pragma ("GCC diagnostic push") \
357 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700358 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Angel Pons437da712021-09-03 16:51:40 +0200359# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200360# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700361 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000362#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700363# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000364#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700365#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
366# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
367# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000368#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700369#ifndef YY_INITIAL_VALUE
370# define YY_INITIAL_VALUE(Value) /* Nothing. */
371#endif
372
Nico Huberd9b2f792020-04-28 16:28:03 +0200373#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
374# define YY_IGNORE_USELESS_CAST_BEGIN \
375 _Pragma ("GCC diagnostic push") \
376 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
377# define YY_IGNORE_USELESS_CAST_END \
378 _Pragma ("GCC diagnostic pop")
379#endif
380#ifndef YY_IGNORE_USELESS_CAST_BEGIN
381# define YY_IGNORE_USELESS_CAST_BEGIN
382# define YY_IGNORE_USELESS_CAST_END
383#endif
384
385
386#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000387
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700388#if !defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000389
390/* The parser invokes alloca or malloc; define the necessary symbols. */
391
392# ifdef YYSTACK_USE_ALLOCA
393# if YYSTACK_USE_ALLOCA
394# ifdef __GNUC__
395# define YYSTACK_ALLOC __builtin_alloca
396# elif defined __BUILTIN_VA_ARG_INCR
397# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
398# elif defined _AIX
399# define YYSTACK_ALLOC __alloca
400# elif defined _MSC_VER
401# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
402# define alloca _alloca
403# else
404# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700405# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000406# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700407 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200408# ifndef EXIT_SUCCESS
409# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000410# endif
411# endif
412# endif
413# endif
414# endif
415
416# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700417 /* Pacify GCC's 'empty if-body' warning. */
418# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000419# ifndef YYSTACK_ALLOC_MAXIMUM
420 /* The OS might guarantee only one guard page at the bottom of the stack,
421 and a page size can be as small as 4096 bytes. So we cannot safely
422 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
423 to allow for a few compiler-allocated temporary stack slots. */
424# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
425# endif
426# else
427# define YYSTACK_ALLOC YYMALLOC
428# define YYSTACK_FREE YYFREE
429# ifndef YYSTACK_ALLOC_MAXIMUM
430# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
431# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200432# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000433 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700434 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000435# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200436# ifndef EXIT_SUCCESS
437# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000438# endif
439# endif
440# ifndef YYMALLOC
441# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700442# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000443void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
444# endif
445# endif
446# ifndef YYFREE
447# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700448# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000449void free (void *); /* INFRINGES ON USER NAME SPACE */
450# endif
451# endif
452# endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700453#endif /* !defined yyoverflow */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000454
455#if (! defined yyoverflow \
456 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700457 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000458
459/* A type that is properly aligned for any stack member. */
460union yyalloc
461{
Nico Huberd9b2f792020-04-28 16:28:03 +0200462 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000463 YYSTYPE yyvs_alloc;
464};
465
466/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200467# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000468
469/* The size of an array large to enough to hold all stacks, each with
470 N elements. */
471# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200472 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000473 + YYSTACK_GAP_MAXIMUM)
474
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200475# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000476
477/* Relocate STACK from its old location to the new one. The
478 local variables YYSIZE and YYSTACKSIZE give the old and new number of
479 elements in the stack, and YYPTR gives the new location of the
480 stack. Advance YYPTR to a properly aligned location for the next
481 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700482# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
483 do \
484 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200485 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700486 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
487 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200488 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
489 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700490 } \
491 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000492
493#endif
494
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200495#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700496/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200497 not overlap. */
498# ifndef YYCOPY
499# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700500# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200501 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200502# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700503# define YYCOPY(Dst, Src, Count) \
504 do \
505 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200506 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700507 for (yyi = 0; yyi < (Count); yyi++) \
508 (Dst)[yyi] = (Src)[yyi]; \
509 } \
510 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200511# endif
512# endif
513#endif /* !YYCOPY_NEEDED */
514
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000515/* YYFINAL -- State number of the termination state. */
Duncan Laurie47b7b342020-05-15 15:39:08 -0700516#define YYFINAL 2
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000517/* YYLAST -- Last index in YYTABLE. */
Angel Pons437da712021-09-03 16:51:40 +0200518#define YYLAST 98
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000519
520/* YYNTOKENS -- Number of terminals. */
Angel Pons437da712021-09-03 16:51:40 +0200521#define YYNTOKENS 46
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000522/* YYNNTS -- Number of nonterminals. */
Angel Pons437da712021-09-03 16:51:40 +0200523#define YYNNTS 32
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000524/* YYNRULES -- Number of rules. */
Angel Pons437da712021-09-03 16:51:40 +0200525#define YYNRULES 60
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700526/* YYNSTATES -- Number of states. */
Angel Pons437da712021-09-03 16:51:40 +0200527#define YYNSTATES 105
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000528
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100529/* YYMAXUTOK -- Last valid token kind. */
Angel Pons437da712021-09-03 16:51:40 +0200530#define YYMAXUTOK 300
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000531
Nico Huberd9b2f792020-04-28 16:28:03 +0200532
533/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
534 as returned by yylex, with out-of-bounds checking. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700535#define YYTRANSLATE(YYX) \
536 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
537 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
538 : YYSYMBOL_YYUNDEF)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000539
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700540/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200541 as returned by yylex. */
542static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000543{
544 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561 2, 2, 2, 2, 2, 2, 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, 1, 2, 3, 4,
570 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200571 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000572 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Angel Pons437da712021-09-03 16:51:40 +0200573 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
574 45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000575};
576
577#if YYDEBUG
Angel Pons437da712021-09-03 16:51:40 +0200578/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600579static const yytype_uint8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000580{
Nico Huber859ecdf2021-02-28 16:18:18 +0100581 0, 26, 26, 26, 26, 29, 29, 29, 30, 30,
582 31, 31, 32, 32, 34, 34, 34, 34, 34, 34,
Angel Pons437da712021-09-03 16:51:40 +0200583 34, 34, 34, 34, 36, 36, 45, 45, 53, 53,
584 61, 63, 67, 67, 69, 72, 75, 78, 81, 84,
585 87, 90, 93, 96, 99, 103, 106, 106, 109, 109,
586 112, 118, 118, 121, 120, 125, 125, 133, 133, 139,
587 143
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000588};
589#endif
590
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700591/** Accessing symbol of state STATE. */
592#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
593
594#if YYDEBUG || 0
595/* The user-facing name of the symbol whose (internal) number is
596 YYSYMBOL. No bounds checking. */
597static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
598
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000599/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
600 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
601static const char *const yytname[] =
602{
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700603 "\"end of file\"", "error", "\"invalid token\"", "CHIP", "DEVICE",
604 "REGISTER", "ALIAS", "REFERENCE", "ASSOCIATION", "BOOL", "STATUS",
605 "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI",
606 "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ",
Angel Pons437da712021-09-03 16:51:40 +0200607 "SLOT_DESC", "SMBIOS_DEV_INFO", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
608 "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO",
609 "GPIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION",
Nico Huber859ecdf2021-02-28 16:18:18 +0100610 "FW_CONFIG_PROBE", "PIPE", "$accept", "devtree", "chipchild_nondev",
611 "chipchild", "chipchildren", "chipchildren_dev", "devicechildren",
612 "chip", "@1", "device", "@2", "@3", "alias", "status", "resource",
613 "reference", "registers", "subsystemid", "ioapic_irq",
Angel Pons437da712021-09-03 16:51:40 +0200614 "smbios_slot_desc", "smbios_dev_info", "fw_config_table",
615 "fw_config_table_children", "fw_config_field_children",
616 "fw_config_field_bits", "fw_config_field_bits_repeating",
617 "fw_config_field", "$@4", "$@5", "$@6", "fw_config_option",
618 "fw_config_probe", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000619};
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700620
621static const char *
622yysymbol_name (yysymbol_kind_t yysymbol)
623{
624 return yytname[yysymbol];
625}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000626#endif
627
Angel Pons437da712021-09-03 16:51:40 +0200628#define YYPACT_NINF (-45)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700629
Nico Huberd9b2f792020-04-28 16:28:03 +0200630#define yypact_value_is_default(Yyn) \
631 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700632
Nico Huberd9b2f792020-04-28 16:28:03 +0200633#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700634
Nico Huberd9b2f792020-04-28 16:28:03 +0200635#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700636 0
637
Angel Pons437da712021-09-03 16:51:40 +0200638/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
639 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000640static const yytype_int8 yypact[] =
641{
Angel Pons437da712021-09-03 16:51:40 +0200642 -45, 6, -45, 4, -45, -45, -45, -45, -12, 45,
643 -45, 15, -45, 11, 17, 18, 45, -3, -45, -45,
644 -45, -45, 16, 34, 23, 14, 46, -45, -45, 45,
645 25, 19, -45, 10, 51, 42, 43, -45, -45, -45,
646 -45, -45, 31, -45, -7, -45, -45, -45, 49, 10,
647 -45, -45, -6, 25, 19, -45, -45, 50, -45, -45,
648 -45, -45, -45, -45, -2, 32, 0, -45, -45, -45,
649 33, -45, 52, 38, 40, 41, 55, -45, -45, -45,
650 -45, -45, -45, -45, -45, -45, 12, 58, 57, 59,
651 47, 44, 61, -45, 53, 63, -45, 54, 60, -45,
652 -45, 64, -45, -45, -45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000653};
654
Angel Pons437da712021-09-03 16:51:40 +0200655/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
656 Performed when YYTABLE does not specify something else to do. Zero
657 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200658static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700659{
Angel Pons437da712021-09-03 16:51:40 +0200660 2, 0, 1, 0, 47, 3, 4, 24, 0, 0,
661 45, 0, 46, 0, 0, 0, 0, 0, 5, 11,
662 7, 6, 57, 0, 0, 0, 0, 13, 25, 12,
663 55, 52, 49, 0, 30, 0, 0, 9, 10, 8,
664 50, 49, 0, 53, 0, 32, 33, 28, 0, 0,
665 36, 35, 0, 0, 52, 49, 58, 0, 48, 23,
666 31, 26, 56, 51, 0, 0, 0, 23, 54, 59,
667 0, 29, 0, 0, 0, 0, 0, 15, 14, 16,
668 21, 17, 18, 19, 20, 22, 0, 0, 0, 44,
669 0, 0, 0, 27, 0, 42, 43, 37, 0, 60,
670 34, 41, 38, 39, 40
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700671};
672
Angel Pons437da712021-09-03 16:51:40 +0200673/* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000674static const yytype_int8 yypgoto[] =
675{
Angel Pons437da712021-09-03 16:51:40 +0200676 -45, -45, 62, -45, -45, 66, 8, -1, -45, -28,
677 -45, -45, -45, 35, -45, -45, -44, -45, -45, -45,
678 -45, -45, -45, -31, 56, 39, -45, -45, -45, -45,
679 -45, -45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000680};
681
Angel Pons437da712021-09-03 16:51:40 +0200682/* YYDEFGOTO[NTERM-NUM]. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700683static const yytype_int8 yydefgoto[] =
684{
Nico Huber859ecdf2021-02-28 16:18:18 +0100685 0, 1, 16, 38, 29, 17, 66, 18, 9, 19,
Angel Pons437da712021-09-03 16:51:40 +0200686 67, 59, 49, 47, 79, 20, 21, 81, 82, 83,
687 84, 6, 8, 44, 31, 43, 12, 55, 41, 32,
688 58, 85
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700689};
690
Angel Pons437da712021-09-03 16:51:40 +0200691/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
692 positive, shift that token. If negative, reduce the rule whose
693 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200694static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000695{
Angel Pons437da712021-09-03 16:51:40 +0200696 5, 39, 10, 3, 13, 14, 2, 56, 62, 3,
697 52, 28, 68, 70, 71, 3, 13, 14, 23, 45,
698 46, 7, 80, 24, 64, 70, 93, 72, 73, 35,
699 11, 74, 22, 75, 25, 26, 57, 57, 78, 72,
700 73, 57, 80, 74, 76, 75, 30, 4, 3, 13,
701 14, 33, 15, 34, 36, 40, 76, 48, 78, 50,
702 51, 53, 69, 87, 42, 77, 60, 65, 89, 88,
703 90, 91, 92, 94, 95, 86, 96, 97, 99, 98,
704 101, 104, 27, 100, 61, 77, 102, 0, 0, 0,
705 103, 37, 0, 63, 0, 0, 0, 0, 54
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000706};
707
Patrick Georgi8f625f62010-05-05 13:13:47 +0000708static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000709{
Angel Pons437da712021-09-03 16:51:40 +0200710 1, 29, 14, 3, 4, 5, 0, 14, 14, 3,
711 41, 14, 14, 13, 14, 3, 4, 5, 7, 9,
712 10, 17, 66, 12, 55, 13, 14, 27, 28, 15,
713 42, 31, 17, 33, 17, 17, 43, 43, 66, 27,
714 28, 43, 86, 31, 44, 33, 30, 41, 3, 4,
715 5, 17, 7, 30, 8, 30, 44, 6, 86, 17,
716 17, 30, 30, 30, 45, 66, 17, 17, 30, 17,
717 30, 30, 17, 15, 17, 67, 17, 30, 17, 35,
718 17, 17, 16, 30, 49, 86, 32, -1, -1, -1,
719 30, 29, -1, 54, -1, -1, -1, -1, 42
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000720};
721
Angel Pons437da712021-09-03 16:51:40 +0200722/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
723 state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200724static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000725{
Angel Pons437da712021-09-03 16:51:40 +0200726 0, 47, 0, 3, 41, 53, 67, 17, 68, 54,
727 14, 42, 72, 4, 5, 7, 48, 51, 53, 55,
728 61, 62, 17, 7, 12, 17, 17, 51, 14, 50,
729 30, 70, 75, 17, 30, 15, 8, 48, 49, 55,
730 30, 74, 45, 71, 69, 9, 10, 59, 6, 58,
731 17, 17, 69, 30, 70, 73, 14, 43, 76, 57,
732 17, 59, 14, 71, 69, 17, 52, 56, 14, 30,
733 13, 14, 27, 28, 31, 33, 44, 53, 55, 60,
734 62, 63, 64, 65, 66, 77, 52, 30, 17, 30,
735 30, 30, 17, 14, 15, 17, 17, 30, 35, 17,
736 30, 17, 32, 30, 17
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000737};
738
Angel Pons437da712021-09-03 16:51:40 +0200739/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200740static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700741{
Angel Pons437da712021-09-03 16:51:40 +0200742 0, 46, 47, 47, 47, 48, 48, 48, 49, 49,
743 50, 50, 51, 51, 52, 52, 52, 52, 52, 52,
744 52, 52, 52, 52, 54, 53, 56, 55, 57, 55,
745 58, 58, 59, 59, 60, 61, 62, 63, 63, 64,
746 65, 65, 65, 66, 66, 67, 68, 68, 69, 69,
747 70, 71, 71, 73, 72, 74, 72, 75, 72, 76,
748 77
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700749};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000750
Angel Pons437da712021-09-03 16:51:40 +0200751/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200752static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700753{
Nico Huber859ecdf2021-02-28 16:18:18 +0100754 0, 2, 0, 2, 2, 1, 1, 1, 1, 1,
755 2, 0, 2, 2, 2, 2, 2, 2, 2, 2,
Angel Pons437da712021-09-03 16:51:40 +0200756 2, 2, 2, 0, 0, 5, 0, 8, 0, 7,
757 0, 2, 1, 1, 4, 4, 4, 3, 4, 4,
758 5, 4, 3, 3, 2, 3, 2, 0, 2, 0,
759 2, 3, 0, 0, 7, 0, 6, 0, 5, 3,
760 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700761};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000762
763
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700764enum { YYENOMEM = -2 };
765
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700766#define yyerrok (yyerrstatus = 0)
767#define yyclearin (yychar = YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000768
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700769#define YYACCEPT goto yyacceptlab
770#define YYABORT goto yyabortlab
771#define YYERROR goto yyerrorlab
Angel Pons437da712021-09-03 16:51:40 +0200772#define YYNOMEM goto yyexhaustedlab
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700773
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000774
775#define YYRECOVERING() (!!yyerrstatus)
776
Nico Huberd9b2f792020-04-28 16:28:03 +0200777#define YYBACKUP(Token, Value) \
778 do \
779 if (yychar == YYEMPTY) \
780 { \
781 yychar = (Token); \
782 yylval = (Value); \
783 YYPOPSTACK (yylen); \
784 yystate = *yyssp; \
785 goto yybackup; \
786 } \
787 else \
788 { \
789 yyerror (YY_("syntax error: cannot back up")); \
790 YYERROR; \
791 } \
792 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700793
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700794/* Backward compatibility with an undocumented macro.
795 Use YYerror or YYUNDEF. */
796#define YYERRCODE YYUNDEF
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000797
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000798
799/* Enable debugging if requested. */
800#if YYDEBUG
801
802# ifndef YYFPRINTF
803# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
804# define YYFPRINTF fprintf
805# endif
806
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700807# define YYDPRINTF(Args) \
808do { \
809 if (yydebug) \
810 YYFPRINTF Args; \
811} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000812
Angel Pons437da712021-09-03 16:51:40 +0200813
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000814
815
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700816# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700817do { \
818 if (yydebug) \
819 { \
820 YYFPRINTF (stderr, "%s ", Title); \
821 yy_symbol_print (stderr, \
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700822 Kind, Value); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700823 YYFPRINTF (stderr, "\n"); \
824 } \
825} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000826
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700827
Nico Huberd9b2f792020-04-28 16:28:03 +0200828/*-----------------------------------.
829| Print this symbol's value on YYO. |
830`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700831
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000832static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700833yy_symbol_value_print (FILE *yyo,
834 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000835{
Nico Huberd9b2f792020-04-28 16:28:03 +0200836 FILE *yyoutput = yyo;
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600837 YY_USE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000838 if (!yyvaluep)
839 return;
Nico Huberd9b2f792020-04-28 16:28:03 +0200840 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600841 YY_USE (yykind);
Nico Huberd9b2f792020-04-28 16:28:03 +0200842 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000843}
844
845
Nico Huberd9b2f792020-04-28 16:28:03 +0200846/*---------------------------.
847| Print this symbol on YYO. |
848`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000849
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000850static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700851yy_symbol_print (FILE *yyo,
852 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000853{
Nico Huberd9b2f792020-04-28 16:28:03 +0200854 YYFPRINTF (yyo, "%s %s (",
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700855 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000856
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700857 yy_symbol_value_print (yyo, yykind, yyvaluep);
Nico Huberd9b2f792020-04-28 16:28:03 +0200858 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000859}
860
861/*------------------------------------------------------------------.
862| yy_stack_print -- Print the state stack from its BOTTOM up to its |
863| TOP (included). |
864`------------------------------------------------------------------*/
865
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000866static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200867yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000868{
869 YYFPRINTF (stderr, "Stack now");
870 for (; yybottom <= yytop; yybottom++)
871 {
872 int yybot = *yybottom;
873 YYFPRINTF (stderr, " %d", yybot);
874 }
875 YYFPRINTF (stderr, "\n");
876}
877
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700878# define YY_STACK_PRINT(Bottom, Top) \
879do { \
880 if (yydebug) \
881 yy_stack_print ((Bottom), (Top)); \
882} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000883
884
885/*------------------------------------------------.
886| Report that the YYRULE is going to be reduced. |
887`------------------------------------------------*/
888
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000889static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700890yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
891 int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000892{
Nico Huberd9b2f792020-04-28 16:28:03 +0200893 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000894 int yynrhs = yyr2[yyrule];
895 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200896 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700897 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000898 /* The symbols being reduced. */
899 for (yyi = 0; yyi < yynrhs; yyi++)
900 {
901 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700902 yy_symbol_print (stderr,
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700903 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
904 &yyvsp[(yyi + 1) - (yynrhs)]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000905 YYFPRINTF (stderr, "\n");
906 }
907}
908
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700909# define YY_REDUCE_PRINT(Rule) \
910do { \
911 if (yydebug) \
912 yy_reduce_print (yyssp, yyvsp, Rule); \
913} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000914
915/* Nonzero means print parse trace. It is left uninitialized so that
916 multiple parsers can coexist. */
917int yydebug;
918#else /* !YYDEBUG */
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700919# define YYDPRINTF(Args) ((void) 0)
920# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000921# define YY_STACK_PRINT(Bottom, Top)
922# define YY_REDUCE_PRINT(Rule)
923#endif /* !YYDEBUG */
924
925
926/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700927#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000928# define YYINITDEPTH 200
929#endif
930
931/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
932 if the built-in stack extension method is used).
933
934 Do not make this value too large; the results are undefined if
935 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
936 evaluated with infinite-precision integer arithmetic. */
937
938#ifndef YYMAXDEPTH
939# define YYMAXDEPTH 10000
940#endif
941
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000942
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000943
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000944
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000945
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000946
947/*-----------------------------------------------.
948| Release the memory associated to this symbol. |
949`-----------------------------------------------*/
950
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000951static void
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700952yydestruct (const char *yymsg,
953 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000954{
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600955 YY_USE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000956 if (!yymsg)
957 yymsg = "Deleting";
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700958 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000959
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700960 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -0600961 YY_USE (yykind);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700962 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000963}
964
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200965
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100966/* Lookahead token kind. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000967int yychar;
968
969/* The semantic value of the lookahead symbol. */
970YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000971/* Number of syntax errors so far. */
972int yynerrs;
973
974
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700975
976
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200977/*----------.
978| yyparse. |
979`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000980
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000981int
982yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000983{
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100984 yy_state_fast_t yystate = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000985 /* Number of tokens to shift before error messages enabled. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100986 int yyerrstatus = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000987
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100988 /* Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000989 to reallocate them elsewhere. */
990
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700991 /* Their size. */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100992 YYPTRDIFF_T yystacksize = YYINITDEPTH;
Duncan Lauriee335c2e2020-07-29 16:28:43 -0700993
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100994 /* The state stack: array, bottom, top. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200995 yy_state_t yyssa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100996 yy_state_t *yyss = yyssa;
997 yy_state_t *yyssp = yyss;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000998
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +0100999 /* The semantic value stack: array, bottom, top. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001000 YYSTYPE yyvsa[YYINITDEPTH];
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001001 YYSTYPE *yyvs = yyvsa;
1002 YYSTYPE *yyvsp = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001003
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001004 int yyn;
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001005 /* The return value of yyparse. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001006 int yyresult;
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001007 /* Lookahead symbol kind. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001008 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001009 /* The variables used to return semantic value and location from the
1010 action routines. */
1011 YYSTYPE yyval;
1012
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001013
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001014
1015#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1016
1017 /* The number of symbols on the RHS of the reduced rule.
1018 Keep to zero when no symbol should be popped. */
1019 int yylen = 0;
1020
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001021 YYDPRINTF ((stderr, "Starting parse\n"));
1022
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001023 yychar = YYEMPTY; /* Cause a token to be read. */
Angel Pons437da712021-09-03 16:51:40 +02001024
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001025 goto yysetstate;
1026
Nico Huberd9b2f792020-04-28 16:28:03 +02001027
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001028/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001029| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001030`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001031yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001032 /* In all cases, when you get here, the value and location stacks
1033 have just been pushed. So pushing a state here evens the stacks. */
1034 yyssp++;
1035
Nico Huberd9b2f792020-04-28 16:28:03 +02001036
1037/*--------------------------------------------------------------------.
1038| yysetstate -- set current state (the top of the stack) to yystate. |
1039`--------------------------------------------------------------------*/
1040yysetstate:
1041 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1042 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1043 YY_IGNORE_USELESS_CAST_BEGIN
1044 *yyssp = YY_CAST (yy_state_t, yystate);
1045 YY_IGNORE_USELESS_CAST_END
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001046 YY_STACK_PRINT (yyss, yyssp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001047
1048 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001049#if !defined yyoverflow && !defined YYSTACK_RELOCATE
Angel Pons437da712021-09-03 16:51:40 +02001050 YYNOMEM;
Nico Huberd9b2f792020-04-28 16:28:03 +02001051#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001052 {
1053 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001054 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001055
Nico Huberd9b2f792020-04-28 16:28:03 +02001056# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001057 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001058 /* Give user a chance to reallocate the stack. Use copies of
1059 these so that the &'s don't force the real ones into
1060 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001061 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001062 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001063
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001064 /* Each stack pointer address is followed by the size of the
1065 data in use in that stack, in bytes. This used to be a
1066 conditional around just the two extra args, but that might
1067 be undefined if yyoverflow is a macro. */
1068 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001069 &yyss1, yysize * YYSIZEOF (*yyssp),
1070 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001071 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001072 yyss = yyss1;
1073 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001074 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001075# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001076 /* Extend the stack our own way. */
1077 if (YYMAXDEPTH <= yystacksize)
Angel Pons437da712021-09-03 16:51:40 +02001078 YYNOMEM;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001079 yystacksize *= 2;
1080 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001081 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001082
1083 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001084 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001085 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001086 YY_CAST (union yyalloc *,
1087 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001088 if (! yyptr)
Angel Pons437da712021-09-03 16:51:40 +02001089 YYNOMEM;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001090 YYSTACK_RELOCATE (yyss_alloc, yyss);
1091 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001092# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001093 if (yyss1 != yyssa)
1094 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001095 }
1096# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001097
1098 yyssp = yyss + yysize - 1;
1099 yyvsp = yyvs + yysize - 1;
1100
Nico Huberd9b2f792020-04-28 16:28:03 +02001101 YY_IGNORE_USELESS_CAST_BEGIN
1102 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1103 YY_CAST (long, yystacksize)));
1104 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001105
1106 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001107 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001108 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001109#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001110
Angel Pons437da712021-09-03 16:51:40 +02001111
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001112 if (yystate == YYFINAL)
1113 YYACCEPT;
1114
1115 goto yybackup;
1116
Nico Huberd9b2f792020-04-28 16:28:03 +02001117
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001118/*-----------.
1119| yybackup. |
1120`-----------*/
1121yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001122 /* Do appropriate processing given the current state. Read a
1123 lookahead token if we need one and don't already have one. */
1124
1125 /* First try to decide what to do without reference to lookahead token. */
1126 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001127 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001128 goto yydefault;
1129
1130 /* Not known => get a lookahead token if don't already have one. */
1131
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001132 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001133 if (yychar == YYEMPTY)
1134 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001135 YYDPRINTF ((stderr, "Reading a token\n"));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001136 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001137 }
1138
1139 if (yychar <= YYEOF)
1140 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001141 yychar = YYEOF;
1142 yytoken = YYSYMBOL_YYEOF;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001143 YYDPRINTF ((stderr, "Now at end of input.\n"));
1144 }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001145 else if (yychar == YYerror)
1146 {
1147 /* The scanner already issued an error message, process directly
1148 to error recovery. But do not keep the error token as
1149 lookahead, it is too special and may lead us to an endless
1150 loop in error recovery. */
1151 yychar = YYUNDEF;
1152 yytoken = YYSYMBOL_YYerror;
1153 goto yyerrlab1;
1154 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001155 else
1156 {
1157 yytoken = YYTRANSLATE (yychar);
1158 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1159 }
1160
1161 /* If the proper action on seeing token YYTOKEN is to reduce or to
1162 detect an error, take that action. */
1163 yyn += yytoken;
1164 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1165 goto yydefault;
1166 yyn = yytable[yyn];
1167 if (yyn <= 0)
1168 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001169 if (yytable_value_is_error (yyn))
1170 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001171 yyn = -yyn;
1172 goto yyreduce;
1173 }
1174
1175 /* Count tokens shifted since error; after three, turn off error
1176 status. */
1177 if (yyerrstatus)
1178 yyerrstatus--;
1179
1180 /* Shift the lookahead token. */
1181 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001182 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001183 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001184 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001185 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001186
Nico Huberd9b2f792020-04-28 16:28:03 +02001187 /* Discard the shifted token. */
1188 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001189 goto yynewstate;
1190
1191
1192/*-----------------------------------------------------------.
1193| yydefault -- do the default action for the current state. |
1194`-----------------------------------------------------------*/
1195yydefault:
1196 yyn = yydefact[yystate];
1197 if (yyn == 0)
1198 goto yyerrlab;
1199 goto yyreduce;
1200
1201
1202/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001203| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001204`-----------------------------*/
1205yyreduce:
1206 /* yyn is the number of a rule to reduce with. */
1207 yylen = yyr2[yyn];
1208
1209 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001210 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001211
1212 Otherwise, the following line sets YYVAL to garbage.
1213 This behavior is undocumented and Bison
1214 users should not rely upon it. Assigning to YYVAL
1215 unconditionally makes the parser a bit smaller, and it avoids a
1216 GCC warning that YYVAL may be used uninitialized. */
1217 yyval = yyvsp[1-yylen];
1218
1219
1220 YY_REDUCE_PRINT (yyn);
1221 switch (yyn)
1222 {
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001223 case 2: /* devtree: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001224 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001225 break;
1226
Angel Pons437da712021-09-03 16:51:40 +02001227 case 24: /* @1: %empty */
Nico Huberd9b2f792020-04-28 16:28:03 +02001228 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001229 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1230 chip_enqueue_tail(cur_chip_instance);
1231 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001232}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001233 break;
1234
Angel Pons437da712021-09-03 16:51:40 +02001235 case 25: /* chip: CHIP STRING @1 chipchildren_dev END */
Nico Huber859ecdf2021-02-28 16:18:18 +01001236 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001237 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001238}
1239 break;
1240
Angel Pons437da712021-09-03 16:51:40 +02001241 case 26: /* @2: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001242 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001243 (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 +02001244 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001245}
Patrick Georgi68befd52010-05-05 12:05:25 +00001246 break;
1247
Angel Pons437da712021-09-03 16:51:40 +02001248 case 27: /* device: DEVICE BUS NUMBER alias status @2 devicechildren END */
Nico Huberd9b2f792020-04-28 16:28:03 +02001249 {
1250 cur_parent = (yyvsp[-2].dev)->parent;
1251}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001252 break;
1253
Angel Pons437da712021-09-03 16:51:40 +02001254 case 28: /* @3: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001255 {
1256 (yyval.dev) = new_device_reference(cur_parent, cur_chip_instance, (yyvsp[-1].string), (yyvsp[0].number));
1257 cur_parent = (yyval.dev)->last_bus;
1258}
1259 break;
1260
Angel Pons437da712021-09-03 16:51:40 +02001261 case 29: /* device: DEVICE REFERENCE STRING status @3 devicechildren END */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001262 {
1263 cur_parent = (yyvsp[-2].dev)->parent;
1264}
1265 break;
1266
Angel Pons437da712021-09-03 16:51:40 +02001267 case 30: /* alias: %empty */
Nico Huber8e1ea522020-06-03 10:20:07 -07001268 {
1269 (yyval.string) = NULL;
1270}
1271 break;
1272
Angel Pons437da712021-09-03 16:51:40 +02001273 case 31: /* alias: ALIAS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001274 {
1275 (yyval.string) = (yyvsp[0].string);
1276}
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001277 break;
1278
Angel Pons437da712021-09-03 16:51:40 +02001279 case 34: /* resource: RESOURCE NUMBER EQUALS NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001280 { 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 +00001281 break;
1282
Angel Pons437da712021-09-03 16:51:40 +02001283 case 35: /* reference: REFERENCE STRING ASSOCIATION STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001284 { add_reference(cur_chip_instance, (yyvsp[0].string), (yyvsp[-2].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001285 break;
1286
Angel Pons437da712021-09-03 16:51:40 +02001287 case 36: /* registers: REGISTER STRING EQUALS STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001288 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001289 break;
1290
Angel Pons437da712021-09-03 16:51:40 +02001291 case 37: /* subsystemid: SUBSYSTEMID NUMBER NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001292 { 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 +02001293 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001294
Angel Pons437da712021-09-03 16:51:40 +02001295 case 38: /* subsystemid: SUBSYSTEMID NUMBER NUMBER INHERIT */
Nico Huber8e1ea522020-06-03 10:20:07 -07001296 { 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 +02001297 break;
1298
Angel Pons437da712021-09-03 16:51:40 +02001299 case 39: /* ioapic_irq: IOAPIC_IRQ NUMBER PCIINT NUMBER */
Nico Huber8e1ea522020-06-03 10:20:07 -07001300 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
1301 break;
1302
Angel Pons437da712021-09-03 16:51:40 +02001303 case 40: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001304 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
1305 break;
1306
Angel Pons437da712021-09-03 16:51:40 +02001307 case 41: /* smbios_slot_desc: SLOT_DESC STRING STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001308 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1309 break;
1310
Angel Pons437da712021-09-03 16:51:40 +02001311 case 42: /* smbios_slot_desc: SLOT_DESC STRING STRING */
Nico Huber8e1ea522020-06-03 10:20:07 -07001312 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
1313 break;
1314
Angel Pons437da712021-09-03 16:51:40 +02001315 case 43: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER STRING */
1316 { add_smbios_dev_info(cur_parent, strtol((yyvsp[-1].string), NULL, 0), (yyvsp[0].string)); }
1317 break;
1318
1319 case 44: /* smbios_dev_info: SMBIOS_DEV_INFO NUMBER */
1320 { add_smbios_dev_info(cur_parent, strtol((yyvsp[0].string), NULL, 0), NULL); }
1321 break;
1322
1323 case 45: /* fw_config_table: FW_CONFIG_TABLE fw_config_table_children END */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001324 { }
1325 break;
1326
Angel Pons437da712021-09-03 16:51:40 +02001327 case 50: /* fw_config_field_bits: NUMBER NUMBER */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001328{
1329 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 -07001330}
1331 break;
1332
Angel Pons437da712021-09-03 16:51:40 +02001333 case 53: /* $@4: %empty */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001334 { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); }
Nico Huber8e1ea522020-06-03 10:20:07 -07001335 break;
1336
Angel Pons437da712021-09-03 16:51:40 +02001337 case 54: /* 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 -06001338 { cur_bits = NULL; }
1339 break;
1340
Angel Pons437da712021-09-03 16:51:40 +02001341 case 55: /* $@5: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001342 {
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001343 cur_bits = NULL;
1344 append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0));
1345 cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits);
Nico Huber8e1ea522020-06-03 10:20:07 -07001346}
1347 break;
1348
Angel Pons437da712021-09-03 16:51:40 +02001349 case 56: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001350 { cur_bits = NULL; }
Nico Huber8e1ea522020-06-03 10:20:07 -07001351 break;
1352
Angel Pons437da712021-09-03 16:51:40 +02001353 case 57: /* $@6: %empty */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001354 {
1355 cur_field = get_fw_config_field((yyvsp[0].string));
1356}
Nico Huber8e1ea522020-06-03 10:20:07 -07001357 break;
1358
Angel Pons437da712021-09-03 16:51:40 +02001359 case 58: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */
Tim Wawrzynczak13e240c2021-04-28 14:03:07 -06001360 { cur_bits = NULL; }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001361 break;
1362
Angel Pons437da712021-09-03 16:51:40 +02001363 case 59: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */
Michael Niewöhnerdbb667a2020-12-11 21:26:02 +01001364 { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); }
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001365 break;
1366
Angel Pons437da712021-09-03 16:51:40 +02001367 case 60: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */
Duncan Laurie47b7b342020-05-15 15:39:08 -07001368 { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); }
1369 break;
1370
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001371
1372
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001373 default: break;
1374 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001375 /* User semantic actions sometimes alter yychar, and that requires
1376 that yytoken be updated with the new translation. We take the
1377 approach of translating immediately before every use of yytoken.
1378 One alternative is translating here after every semantic action,
1379 but that translation would be missed if the semantic action invokes
1380 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1381 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1382 incorrect destructor might then be invoked immediately. In the
1383 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1384 to an incorrect destructor call or verbose syntax error message
1385 before the lookahead is translated. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001386 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001387
1388 YYPOPSTACK (yylen);
1389 yylen = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001390
1391 *++yyvsp = yyval;
1392
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001393 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001394 that goes to, based on the state we popped back to and the rule
1395 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001396 {
1397 const int yylhs = yyr1[yyn] - YYNTOKENS;
1398 const int yyi = yypgoto[yylhs] + *yyssp;
1399 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1400 ? yytable[yyi]
1401 : yydefgoto[yylhs]);
1402 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001403
1404 goto yynewstate;
1405
1406
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001407/*--------------------------------------.
1408| yyerrlab -- here on detecting error. |
1409`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001410yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001411 /* Make sure we have latest lookahead translation. See comments at
1412 user semantic actions for why this is necessary. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001413 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001414 /* If not already recovering from an error, report this error. */
1415 if (!yyerrstatus)
1416 {
1417 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001418 yyerror (YY_("syntax error"));
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001419 }
1420
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001421 if (yyerrstatus == 3)
1422 {
1423 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001424 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001425
1426 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001427 {
1428 /* Return failure if at end of input. */
1429 if (yychar == YYEOF)
1430 YYABORT;
1431 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001432 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001433 {
1434 yydestruct ("Error: discarding",
1435 yytoken, &yylval);
1436 yychar = YYEMPTY;
1437 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001438 }
1439
1440 /* Else will try to reuse lookahead token after shifting the error
1441 token. */
1442 goto yyerrlab1;
1443
1444
1445/*---------------------------------------------------.
1446| yyerrorlab -- error raised explicitly by YYERROR. |
1447`---------------------------------------------------*/
1448yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001449 /* Pacify compilers when the user code never invokes YYERROR and the
1450 label yyerrorlab therefore never appears in user code. */
1451 if (0)
1452 YYERROR;
Angel Pons437da712021-09-03 16:51:40 +02001453 ++yynerrs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001454
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001455 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001456 this YYERROR. */
1457 YYPOPSTACK (yylen);
1458 yylen = 0;
1459 YY_STACK_PRINT (yyss, yyssp);
1460 yystate = *yyssp;
1461 goto yyerrlab1;
1462
1463
1464/*-------------------------------------------------------------.
1465| yyerrlab1 -- common code for both syntax error and YYERROR. |
1466`-------------------------------------------------------------*/
1467yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001468 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001469
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001470 /* Pop stack until we find a state that shifts the error token. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001471 for (;;)
1472 {
1473 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001474 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001475 {
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001476 yyn += YYSYMBOL_YYerror;
1477 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001478 {
1479 yyn = yytable[yyn];
1480 if (0 < yyn)
1481 break;
1482 }
1483 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001484
1485 /* Pop the current state because it cannot handle the error token. */
1486 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001487 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001488
1489
1490 yydestruct ("Error: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001491 YY_ACCESSING_SYMBOL (yystate), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001492 YYPOPSTACK (1);
1493 yystate = *yyssp;
1494 YY_STACK_PRINT (yyss, yyssp);
1495 }
1496
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001497 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001498 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001499 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001500
1501
1502 /* Shift the error token. */
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001503 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001504
1505 yystate = yyn;
1506 goto yynewstate;
1507
1508
1509/*-------------------------------------.
1510| yyacceptlab -- YYACCEPT comes here. |
1511`-------------------------------------*/
1512yyacceptlab:
1513 yyresult = 0;
Angel Pons437da712021-09-03 16:51:40 +02001514 goto yyreturnlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001515
Nico Huberd9b2f792020-04-28 16:28:03 +02001516
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001517/*-----------------------------------.
1518| yyabortlab -- YYABORT comes here. |
1519`-----------------------------------*/
1520yyabortlab:
1521 yyresult = 1;
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
Angel Pons437da712021-09-03 16:51:40 +02001525/*-----------------------------------------------------------.
1526| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
1527`-----------------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001528yyexhaustedlab:
1529 yyerror (YY_("memory exhausted"));
1530 yyresult = 2;
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| yyreturnlab -- parsing is finished, clean up and return. |
1536`----------------------------------------------------------*/
1537yyreturnlab:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001538 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001539 {
1540 /* Make sure we have latest lookahead translation. See comments at
1541 user semantic actions for why this is necessary. */
1542 yytoken = YYTRANSLATE (yychar);
1543 yydestruct ("Cleanup: discarding lookahead",
1544 yytoken, &yylval);
1545 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001546 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001547 this YYABORT or YYACCEPT. */
1548 YYPOPSTACK (yylen);
1549 YY_STACK_PRINT (yyss, yyssp);
1550 while (yyssp != yyss)
1551 {
1552 yydestruct ("Cleanup: popping",
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001553 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001554 YYPOPSTACK (1);
1555 }
1556#ifndef yyoverflow
1557 if (yyss != yyssa)
1558 YYSTACK_FREE (yyss);
1559#endif
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001560
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001561 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001562}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001563
Duncan Lauriee335c2e2020-07-29 16:28:43 -07001564