blob: 2bae43bc2918e4fdcd9ed1b9b24c35a7e01a7db8 [file] [log] [blame]
Nico Huberd9b2f792020-04-28 16:28:03 +02001/* A Bison parser, made by GNU Bison 3.5.4. */
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
Nico Huberd9b2f792020-04-28 16:28:03 +02005 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6 Inc.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07007
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00008 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070012
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000013 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070017
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000018 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070030
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000031 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
Nico Huberd9b2f792020-04-28 16:28:03 +020044/* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
46
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000047/* Identify Bison output. */
48#define YYBISON 1
49
50/* Bison version. */
Nico Huberd9b2f792020-04-28 16:28:03 +020051#define YYBISON_VERSION "3.5.4"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000052
53/* Skeleton name. */
54#define YYSKELETON_NAME "yacc.c"
55
56/* Pure parsers. */
57#define YYPURE 0
58
59/* Push parsers. */
60#define YYPUSH 0
61
62/* Pull parsers. */
63#define YYPULL 1
64
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000065
66
67
Nico Huberd9b2f792020-04-28 16:28:03 +020068/* First part of user prologue. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000069
Patrick Georgiea063cb2020-05-08 19:28:13 +020070/* sconfig, coreboot device tree compiler */
Patrick Georgi7333a112020-05-08 20:48:04 +020071/* SPDX-License-Identifier: GPL-2.0-only */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000072
Patrick Georgi114e7b22010-05-05 11:19:50 +000073#include "sconfig.h"
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000074
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070075int yylex();
76void yyerror(const char *s);
77
Furquan Shaikh93198262018-06-03 04:22:17 -070078static struct bus *cur_parent;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -070079static struct chip_instance *cur_chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000080
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +000081
82
Nico Huberd9b2f792020-04-28 16:28:03 +020083# ifndef YY_CAST
84# ifdef __cplusplus
85# define YY_CAST(Type, Val) static_cast<Type> (Val)
86# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -070087# else
Nico Huberd9b2f792020-04-28 16:28:03 +020088# define YY_CAST(Type, Val) ((Type) (Val))
89# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
90# endif
91# endif
92# ifndef YY_NULLPTR
93# if defined __cplusplus
94# if 201103L <= __cplusplus
95# define YY_NULLPTR nullptr
96# else
97# define YY_NULLPTR 0
98# endif
99# else
100# define YY_NULLPTR ((void*)0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700101# endif
102# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000103
104/* Enabling verbose error messages. */
105#ifdef YYERROR_VERBOSE
106# undef YYERROR_VERBOSE
107# define YYERROR_VERBOSE 1
108#else
109# define YYERROR_VERBOSE 0
110#endif
111
Nico Huberd9b2f792020-04-28 16:28:03 +0200112/* Use api.header.include to #include this header
113 instead of duplicating it here. */
114#ifndef YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
115# define YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700116/* Debug traces. */
117#ifndef YYDEBUG
118# define YYDEBUG 0
119#endif
120#if YYDEBUG
121extern int yydebug;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000122#endif
123
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700124/* Token type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000125#ifndef YYTOKENTYPE
126# define YYTOKENTYPE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700127 enum yytokentype
128 {
129 CHIP = 258,
130 DEVICE = 259,
131 REGISTER = 260,
132 BOOL = 261,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000133 STATUS = 262,
134 MANDATORY = 263,
135 BUS = 264,
136 RESOURCE = 265,
137 END = 266,
138 EQUALS = 267,
139 HEX = 268,
140 STRING = 269,
141 PCI = 270,
142 PNP = 271,
143 I2C = 272,
144 APIC = 273,
145 CPU_CLUSTER = 274,
146 CPU = 275,
147 DOMAIN = 276,
148 IRQ = 277,
149 DRQ = 278,
150 SLOT_DESC = 279,
151 IO = 280,
152 NUMBER = 281,
153 SUBSYSTEMID = 282,
154 INHERIT = 283,
155 IOAPIC_IRQ = 284,
156 IOAPIC = 285,
157 PCIINT = 286,
158 GENERIC = 287,
159 SPI = 288,
160 USB = 289,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600161 MMIO = 290,
162 LPC = 291,
163 ESPI = 292
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700164 };
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000165#endif
166
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700167/* Value type. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000168#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700169union YYSTYPE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000170{
171
Furquan Shaikh93198262018-06-03 04:22:17 -0700172 struct device *dev;
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -0700173 struct chip_instance *chip_instance;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000174 char *string;
175 int number;
176
177
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700178};
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700179typedef union YYSTYPE YYSTYPE;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000180# define YYSTYPE_IS_TRIVIAL 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000181# define YYSTYPE_IS_DECLARED 1
182#endif
183
184
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700185extern YYSTYPE yylval;
186
187int yyparse (void);
188
Nico Huberd9b2f792020-04-28 16:28:03 +0200189#endif /* !YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000190
191
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000192
193#ifdef short
194# undef short
195#endif
196
Nico Huberd9b2f792020-04-28 16:28:03 +0200197/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
198 <limits.h> and (if available) <stdint.h> are included
199 so that the code can choose integer types of a good width. */
200
201#ifndef __PTRDIFF_MAX__
202# include <limits.h> /* INFRINGES ON USER NAME SPACE */
203# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
204# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
205# define YY_STDINT_H
206# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000207#endif
208
Nico Huberd9b2f792020-04-28 16:28:03 +0200209/* Narrow types that promote to a signed type and that can represent a
210 signed or unsigned integer of at least N bits. In tables they can
211 save space and decrease cache pressure. Promoting to a signed type
212 helps avoid bugs in integer arithmetic. */
213
214#ifdef __INT_LEAST8_MAX__
215typedef __INT_LEAST8_TYPE__ yytype_int8;
216#elif defined YY_STDINT_H
217typedef int_least8_t yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000218#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700219typedef signed char yytype_int8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000220#endif
221
Nico Huberd9b2f792020-04-28 16:28:03 +0200222#ifdef __INT_LEAST16_MAX__
223typedef __INT_LEAST16_TYPE__ yytype_int16;
224#elif defined YY_STDINT_H
225typedef int_least16_t yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000226#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200227typedef short yytype_int16;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000228#endif
229
Nico Huberd9b2f792020-04-28 16:28:03 +0200230#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
231typedef __UINT_LEAST8_TYPE__ yytype_uint8;
232#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
233 && UINT_LEAST8_MAX <= INT_MAX)
234typedef uint_least8_t yytype_uint8;
235#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
236typedef unsigned char yytype_uint8;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000237#else
Nico Huberd9b2f792020-04-28 16:28:03 +0200238typedef short yytype_uint8;
239#endif
240
241#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
242typedef __UINT_LEAST16_TYPE__ yytype_uint16;
243#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
244 && UINT_LEAST16_MAX <= INT_MAX)
245typedef uint_least16_t yytype_uint16;
246#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
247typedef unsigned short yytype_uint16;
248#else
249typedef int yytype_uint16;
250#endif
251
252#ifndef YYPTRDIFF_T
253# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
254# define YYPTRDIFF_T __PTRDIFF_TYPE__
255# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
256# elif defined PTRDIFF_MAX
257# ifndef ptrdiff_t
258# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
259# endif
260# define YYPTRDIFF_T ptrdiff_t
261# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
262# else
263# define YYPTRDIFF_T long
264# define YYPTRDIFF_MAXIMUM LONG_MAX
265# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000266#endif
267
268#ifndef YYSIZE_T
269# ifdef __SIZE_TYPE__
270# define YYSIZE_T __SIZE_TYPE__
271# elif defined size_t
272# define YYSIZE_T size_t
Nico Huberd9b2f792020-04-28 16:28:03 +0200273# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000274# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
275# define YYSIZE_T size_t
276# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200277# define YYSIZE_T unsigned
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000278# endif
279#endif
280
Nico Huberd9b2f792020-04-28 16:28:03 +0200281#define YYSIZE_MAXIMUM \
282 YY_CAST (YYPTRDIFF_T, \
283 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
284 ? YYPTRDIFF_MAXIMUM \
285 : YY_CAST (YYSIZE_T, -1)))
286
287#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
288
289/* Stored state numbers (used for stacks). */
290typedef yytype_int8 yy_state_t;
291
292/* State numbers in computations. */
293typedef int yy_state_fast_t;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000294
295#ifndef YY_
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200296# if defined YYENABLE_NLS && YYENABLE_NLS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000297# if ENABLE_NLS
298# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700299# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000300# endif
301# endif
302# ifndef YY_
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700303# define YY_(Msgid) Msgid
304# endif
305#endif
306
Nico Huberd9b2f792020-04-28 16:28:03 +0200307#ifndef YY_ATTRIBUTE_PURE
308# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
309# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700310# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200311# define YY_ATTRIBUTE_PURE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700312# endif
313#endif
314
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700315#ifndef YY_ATTRIBUTE_UNUSED
Nico Huberd9b2f792020-04-28 16:28:03 +0200316# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
317# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700318# else
Nico Huberd9b2f792020-04-28 16:28:03 +0200319# define YY_ATTRIBUTE_UNUSED
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000320# endif
321#endif
322
323/* Suppress unused-variable warnings by "using" E. */
324#if ! defined lint || defined __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700325# define YYUSE(E) ((void) (E))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000326#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700327# define YYUSE(E) /* empty */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000328#endif
329
Nico Huberd9b2f792020-04-28 16:28:03 +0200330#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700331/* Suppress an incorrect diagnostic about yylval being uninitialized. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200332# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
333 _Pragma ("GCC diagnostic push") \
334 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700335 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Nico Huberd9b2f792020-04-28 16:28:03 +0200336# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700337 _Pragma ("GCC diagnostic pop")
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000338#else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700339# define YY_INITIAL_VALUE(Value) Value
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000340#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700341#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
342# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
343# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000344#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700345#ifndef YY_INITIAL_VALUE
346# define YY_INITIAL_VALUE(Value) /* Nothing. */
347#endif
348
Nico Huberd9b2f792020-04-28 16:28:03 +0200349#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
350# define YY_IGNORE_USELESS_CAST_BEGIN \
351 _Pragma ("GCC diagnostic push") \
352 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
353# define YY_IGNORE_USELESS_CAST_END \
354 _Pragma ("GCC diagnostic pop")
355#endif
356#ifndef YY_IGNORE_USELESS_CAST_BEGIN
357# define YY_IGNORE_USELESS_CAST_BEGIN
358# define YY_IGNORE_USELESS_CAST_END
359#endif
360
361
362#define YY_ASSERT(E) ((void) (0 && (E)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000363
364#if ! defined yyoverflow || YYERROR_VERBOSE
365
366/* The parser invokes alloca or malloc; define the necessary symbols. */
367
368# ifdef YYSTACK_USE_ALLOCA
369# if YYSTACK_USE_ALLOCA
370# ifdef __GNUC__
371# define YYSTACK_ALLOC __builtin_alloca
372# elif defined __BUILTIN_VA_ARG_INCR
373# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
374# elif defined _AIX
375# define YYSTACK_ALLOC __alloca
376# elif defined _MSC_VER
377# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
378# define alloca _alloca
379# else
380# define YYSTACK_ALLOC alloca
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700381# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000382# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700383 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200384# ifndef EXIT_SUCCESS
385# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000386# endif
387# endif
388# endif
389# endif
390# endif
391
392# ifdef YYSTACK_ALLOC
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700393 /* Pacify GCC's 'empty if-body' warning. */
394# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000395# ifndef YYSTACK_ALLOC_MAXIMUM
396 /* The OS might guarantee only one guard page at the bottom of the stack,
397 and a page size can be as small as 4096 bytes. So we cannot safely
398 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
399 to allow for a few compiler-allocated temporary stack slots. */
400# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
401# endif
402# else
403# define YYSTACK_ALLOC YYMALLOC
404# define YYSTACK_FREE YYFREE
405# ifndef YYSTACK_ALLOC_MAXIMUM
406# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
407# endif
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200408# if (defined __cplusplus && ! defined EXIT_SUCCESS \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000409 && ! ((defined YYMALLOC || defined malloc) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700410 && (defined YYFREE || defined free)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000411# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200412# ifndef EXIT_SUCCESS
413# define EXIT_SUCCESS 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000414# endif
415# endif
416# ifndef YYMALLOC
417# define YYMALLOC malloc
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700418# if ! defined malloc && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000419void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
420# endif
421# endif
422# ifndef YYFREE
423# define YYFREE free
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700424# if ! defined free && ! defined EXIT_SUCCESS
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000425void free (void *); /* INFRINGES ON USER NAME SPACE */
426# endif
427# endif
428# endif
429#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
430
431
432#if (! defined yyoverflow \
433 && (! defined __cplusplus \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700434 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000435
436/* A type that is properly aligned for any stack member. */
437union yyalloc
438{
Nico Huberd9b2f792020-04-28 16:28:03 +0200439 yy_state_t yyss_alloc;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000440 YYSTYPE yyvs_alloc;
441};
442
443/* The size of the maximum gap between one aligned stack and the next. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200444# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000445
446/* The size of an array large to enough to hold all stacks, each with
447 N elements. */
448# define YYSTACK_BYTES(N) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200449 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000450 + YYSTACK_GAP_MAXIMUM)
451
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200452# define YYCOPY_NEEDED 1
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000453
454/* Relocate STACK from its old location to the new one. The
455 local variables YYSIZE and YYSTACKSIZE give the old and new number of
456 elements in the stack, and YYPTR gives the new location of the
457 stack. Advance YYPTR to a properly aligned location for the next
458 stack. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700459# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
460 do \
461 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200462 YYPTRDIFF_T yynewbytes; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700463 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
464 Stack = &yyptr->Stack_alloc; \
Nico Huberd9b2f792020-04-28 16:28:03 +0200465 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
466 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700467 } \
468 while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000469
470#endif
471
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200472#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700473/* Copy COUNT objects from SRC to DST. The source and destination do
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200474 not overlap. */
475# ifndef YYCOPY
476# if defined __GNUC__ && 1 < __GNUC__
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700477# define YYCOPY(Dst, Src, Count) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200478 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200479# else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700480# define YYCOPY(Dst, Src, Count) \
481 do \
482 { \
Nico Huberd9b2f792020-04-28 16:28:03 +0200483 YYPTRDIFF_T yyi; \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700484 for (yyi = 0; yyi < (Count); yyi++) \
485 (Dst)[yyi] = (Src)[yyi]; \
486 } \
487 while (0)
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200488# endif
489# endif
490#endif /* !YYCOPY_NEEDED */
491
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000492/* YYFINAL -- State number of the termination state. */
Patrick Georgi68befd52010-05-05 12:05:25 +0000493#define YYFINAL 3
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000494/* YYLAST -- Last index in YYTABLE. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200495#define YYLAST 45
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000496
497/* YYNTOKENS -- Number of terminals. */
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600498#define YYNTOKENS 38
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000499/* YYNNTS -- Number of nonterminals. */
Patrick Rudolphac24d3c2019-04-12 14:42:17 +0200500#define YYNNTS 15
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000501/* YYNRULES -- Number of rules. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200502#define YYNRULES 29
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700503/* YYNSTATES -- Number of states. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200504#define YYNSTATES 50
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000505
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000506#define YYUNDEFTOK 2
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600507#define YYMAXUTOK 292
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000508
Nico Huberd9b2f792020-04-28 16:28:03 +0200509
510/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
511 as returned by yylex, with out-of-bounds checking. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700512#define YYTRANSLATE(YYX) \
Nico Huberd9b2f792020-04-28 16:28:03 +0200513 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000514
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700515/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Nico Huberd9b2f792020-04-28 16:28:03 +0200516 as returned by yylex. */
517static const yytype_int8 yytranslate[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000518{
519 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
545 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200546 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000547 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600548 35, 36, 37
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000549};
550
551#if YYDEBUG
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700552 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200553static const yytype_int8 yyrline[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000554{
Furquan Shaikh79e84122018-05-30 15:09:09 -0700555 0, 36, 36, 36, 38, 38, 38, 38, 40, 40,
Nico Huberd9b2f792020-04-28 16:28:03 +0200556 40, 40, 40, 40, 40, 40, 42, 42, 51, 51,
557 59, 59, 61, 64, 67, 70, 73, 76, 79, 82
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000558};
559#endif
560
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700561#if YYDEBUG || YYERROR_VERBOSE || 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000562/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
563 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
564static const char *const yytname[] =
565{
566 "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL",
Ronald G. Minnich466ca2c2019-10-22 02:02:24 +0000567 "STATUS", "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX",
568 "STRING", "PCI", "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN",
569 "IRQ", "DRQ", "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT",
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600570 "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "LPC",
571 "ESPI", "$accept", "devtree", "$@1", "chipchildren", "devicechildren",
572 "chip", "@2", "device", "@3", "status", "resource", "registers",
573 "subsystemid", "ioapic_irq", "smbios_slot_desc", YY_NULLPTR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000574};
575#endif
576
577# ifdef YYPRINT
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700578/* YYTOKNUM[NUM] -- (External) token number corresponding to the
579 (internal) symbol number NUM (which must be that of a token). */
Nico Huberd9b2f792020-04-28 16:28:03 +0200580static const yytype_int16 yytoknum[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000581{
582 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
583 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
Furquan Shaikhe6700292017-02-11 00:50:38 -0800584 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600585 285, 286, 287, 288, 289, 290, 291, 292
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000586};
587# endif
588
Nico Huberd9b2f792020-04-28 16:28:03 +0200589#define YYPACT_NINF (-10)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700590
Nico Huberd9b2f792020-04-28 16:28:03 +0200591#define yypact_value_is_default(Yyn) \
592 ((Yyn) == YYPACT_NINF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700593
Nico Huberd9b2f792020-04-28 16:28:03 +0200594#define YYTABLE_NINF (-1)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700595
Nico Huberd9b2f792020-04-28 16:28:03 +0200596#define yytable_value_is_error(Yyn) \
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700597 0
598
599 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
600 STATE-NUM. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000601static const yytype_int8 yypact[] =
602{
Nico Huberd9b2f792020-04-28 16:28:03 +0200603 -10, 11, 10, -10, 0, -10, -10, -10, 1, 6,
604 2, -10, -10, -10, -10, -9, 8, 3, 4, -10,
605 -10, -10, -10, -10, -3, -4, -10, 9, -1, 5,
606 -10, -10, -10, -10, -10, -10, -10, 15, 14, 7,
607 -2, 12, 16, 13, 17, -10, 18, -10, -10, -10
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000608};
609
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700610 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
611 Performed when YYTABLE does not specify something else to do. Zero
612 means the default is an error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200613static const yytype_int8 yydefact[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700614{
Nico Huberd9b2f792020-04-28 16:28:03 +0200615 2, 0, 0, 1, 0, 3, 16, 7, 0, 0,
616 0, 17, 5, 4, 6, 0, 0, 0, 0, 20,
617 21, 18, 23, 15, 0, 0, 19, 0, 0, 0,
618 9, 8, 10, 14, 11, 12, 13, 0, 0, 0,
619 0, 0, 29, 24, 0, 22, 28, 25, 26, 27
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700620};
621
622 /* YYPGOTO[NTERM-NUM]. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000623static const yytype_int8 yypgoto[] =
624{
Nico Huberd9b2f792020-04-28 16:28:03 +0200625 -10, -10, -10, -10, -10, -5, -10, 20, -10, -10,
626 -10, 21, -10, -10, -10
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000627};
628
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700629 /* YYDEFGOTO[NTERM-NUM]. */
630static const yytype_int8 yydefgoto[] =
631{
Hung-Te Lin936dbe12018-09-10 10:51:26 +0800632 -1, 1, 2, 8, 24, 5, 7, 13, 23, 21,
Nico Huberd9b2f792020-04-28 16:28:03 +0200633 32, 14, 34, 35, 36
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700634};
635
636 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
637 positive, shift that token. If negative, reduce the rule whose
638 number is the opposite. If YYTABLE_NINF, syntax error. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200639static const yytype_int8 yytable[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000640{
Nico Huberd9b2f792020-04-28 16:28:03 +0200641 4, 9, 10, 12, 4, 9, 10, 25, 26, 19,
642 20, 3, 11, 4, 6, 15, 16, 17, 22, 30,
643 18, 27, 37, 38, 28, 39, 29, 41, 42, 44,
644 46, 40, 49, 43, 0, 0, 0, 0, 45, 0,
645 0, 47, 0, 48, 31, 33
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000646};
647
Patrick Georgi8f625f62010-05-05 13:13:47 +0000648static const yytype_int8 yycheck[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000649{
Nico Huberd9b2f792020-04-28 16:28:03 +0200650 3, 4, 5, 8, 3, 4, 5, 10, 11, 6,
651 7, 0, 11, 3, 14, 9, 14, 26, 14, 24,
652 12, 24, 26, 14, 27, 26, 29, 12, 14, 31,
653 14, 26, 14, 26, -1, -1, -1, -1, 26, -1,
654 -1, 28, -1, 26, 24, 24
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000655};
656
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700657 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
658 symbol of state STATE-NUM. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200659static const yytype_int8 yystos[] =
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000660{
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600661 0, 39, 40, 0, 3, 43, 14, 44, 41, 4,
662 5, 11, 43, 45, 49, 9, 14, 26, 12, 6,
663 7, 47, 14, 46, 42, 10, 11, 24, 27, 29,
664 43, 45, 48, 49, 50, 51, 52, 26, 14, 26,
Nico Huberd9b2f792020-04-28 16:28:03 +0200665 26, 12, 14, 26, 31, 26, 14, 28, 26, 14
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000666};
667
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700668 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200669static const yytype_int8 yyr1[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700670{
Raul E Rangel3f3f53c2020-05-06 11:47:04 -0600671 0, 38, 40, 39, 41, 41, 41, 41, 42, 42,
672 42, 42, 42, 42, 42, 42, 44, 43, 46, 45,
673 47, 47, 48, 49, 50, 50, 51, 52, 52, 52
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700674};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000675
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700676 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200677static const yytype_int8 yyr2[] =
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700678{
679 0, 2, 0, 2, 2, 2, 2, 0, 2, 2,
Nico Huberd9b2f792020-04-28 16:28:03 +0200680 2, 2, 2, 2, 2, 0, 0, 5, 0, 7,
681 1, 1, 4, 4, 3, 4, 4, 5, 4, 3
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700682};
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000683
684
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700685#define yyerrok (yyerrstatus = 0)
686#define yyclearin (yychar = YYEMPTY)
687#define YYEMPTY (-2)
688#define YYEOF 0
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000689
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700690#define YYACCEPT goto yyacceptlab
691#define YYABORT goto yyabortlab
692#define YYERROR goto yyerrorlab
693
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000694
695#define YYRECOVERING() (!!yyerrstatus)
696
Nico Huberd9b2f792020-04-28 16:28:03 +0200697#define YYBACKUP(Token, Value) \
698 do \
699 if (yychar == YYEMPTY) \
700 { \
701 yychar = (Token); \
702 yylval = (Value); \
703 YYPOPSTACK (yylen); \
704 yystate = *yyssp; \
705 goto yybackup; \
706 } \
707 else \
708 { \
709 yyerror (YY_("syntax error: cannot back up")); \
710 YYERROR; \
711 } \
712 while (0)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700713
714/* Error token number */
715#define YYTERROR 1
716#define YYERRCODE 256
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000717
718
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000719
720/* Enable debugging if requested. */
721#if YYDEBUG
722
723# ifndef YYFPRINTF
724# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
725# define YYFPRINTF fprintf
726# endif
727
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700728# define YYDPRINTF(Args) \
729do { \
730 if (yydebug) \
731 YYFPRINTF Args; \
732} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000733
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700734/* This macro is provided for backward compatibility. */
735#ifndef YY_LOCATION_PRINT
736# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
737#endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000738
739
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700740# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
741do { \
742 if (yydebug) \
743 { \
744 YYFPRINTF (stderr, "%s ", Title); \
745 yy_symbol_print (stderr, \
746 Type, Value); \
747 YYFPRINTF (stderr, "\n"); \
748 } \
749} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000750
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700751
Nico Huberd9b2f792020-04-28 16:28:03 +0200752/*-----------------------------------.
753| Print this symbol's value on YYO. |
754`-----------------------------------*/
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700755
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000756static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200757yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000758{
Nico Huberd9b2f792020-04-28 16:28:03 +0200759 FILE *yyoutput = yyo;
760 YYUSE (yyoutput);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000761 if (!yyvaluep)
762 return;
763# ifdef YYPRINT
764 if (yytype < YYNTOKENS)
Nico Huberd9b2f792020-04-28 16:28:03 +0200765 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000766# endif
Nico Huberd9b2f792020-04-28 16:28:03 +0200767 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700768 YYUSE (yytype);
Nico Huberd9b2f792020-04-28 16:28:03 +0200769 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000770}
771
772
Nico Huberd9b2f792020-04-28 16:28:03 +0200773/*---------------------------.
774| Print this symbol on YYO. |
775`---------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000776
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000777static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200778yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000779{
Nico Huberd9b2f792020-04-28 16:28:03 +0200780 YYFPRINTF (yyo, "%s %s (",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700781 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000782
Nico Huberd9b2f792020-04-28 16:28:03 +0200783 yy_symbol_value_print (yyo, yytype, yyvaluep);
784 YYFPRINTF (yyo, ")");
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000785}
786
787/*------------------------------------------------------------------.
788| yy_stack_print -- Print the state stack from its BOTTOM up to its |
789| TOP (included). |
790`------------------------------------------------------------------*/
791
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000792static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200793yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000794{
795 YYFPRINTF (stderr, "Stack now");
796 for (; yybottom <= yytop; yybottom++)
797 {
798 int yybot = *yybottom;
799 YYFPRINTF (stderr, " %d", yybot);
800 }
801 YYFPRINTF (stderr, "\n");
802}
803
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700804# define YY_STACK_PRINT(Bottom, Top) \
805do { \
806 if (yydebug) \
807 yy_stack_print ((Bottom), (Top)); \
808} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000809
810
811/*------------------------------------------------.
812| Report that the YYRULE is going to be reduced. |
813`------------------------------------------------*/
814
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000815static void
Nico Huberd9b2f792020-04-28 16:28:03 +0200816yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000817{
Nico Huberd9b2f792020-04-28 16:28:03 +0200818 int yylno = yyrline[yyrule];
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000819 int yynrhs = yyr2[yyrule];
820 int yyi;
Nico Huberd9b2f792020-04-28 16:28:03 +0200821 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700822 yyrule - 1, yylno);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000823 /* The symbols being reduced. */
824 for (yyi = 0; yyi < yynrhs; yyi++)
825 {
826 YYFPRINTF (stderr, " $%d = ", yyi + 1);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700827 yy_symbol_print (stderr,
Nico Huberd9b2f792020-04-28 16:28:03 +0200828 yystos[+yyssp[yyi + 1 - yynrhs]],
829 &yyvsp[(yyi + 1) - (yynrhs)]
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700830 );
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000831 YYFPRINTF (stderr, "\n");
832 }
833}
834
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700835# define YY_REDUCE_PRINT(Rule) \
836do { \
837 if (yydebug) \
838 yy_reduce_print (yyssp, yyvsp, Rule); \
839} while (0)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000840
841/* Nonzero means print parse trace. It is left uninitialized so that
842 multiple parsers can coexist. */
843int yydebug;
844#else /* !YYDEBUG */
845# define YYDPRINTF(Args)
846# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
847# define YY_STACK_PRINT(Bottom, Top)
848# define YY_REDUCE_PRINT(Rule)
849#endif /* !YYDEBUG */
850
851
852/* YYINITDEPTH -- initial size of the parser's stacks. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700853#ifndef YYINITDEPTH
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000854# define YYINITDEPTH 200
855#endif
856
857/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
858 if the built-in stack extension method is used).
859
860 Do not make this value too large; the results are undefined if
861 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
862 evaluated with infinite-precision integer arithmetic. */
863
864#ifndef YYMAXDEPTH
865# define YYMAXDEPTH 10000
866#endif
867
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000868
869#if YYERROR_VERBOSE
870
871# ifndef yystrlen
872# if defined __GLIBC__ && defined _STRING_H
Nico Huberd9b2f792020-04-28 16:28:03 +0200873# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000874# else
875/* Return the length of YYSTR. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200876static YYPTRDIFF_T
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000877yystrlen (const char *yystr)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000878{
Nico Huberd9b2f792020-04-28 16:28:03 +0200879 YYPTRDIFF_T yylen;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000880 for (yylen = 0; yystr[yylen]; yylen++)
881 continue;
882 return yylen;
883}
884# endif
885# endif
886
887# ifndef yystpcpy
888# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
889# define yystpcpy stpcpy
890# else
891/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
892 YYDEST. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000893static char *
894yystpcpy (char *yydest, const char *yysrc)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000895{
896 char *yyd = yydest;
897 const char *yys = yysrc;
898
899 while ((*yyd++ = *yys++) != '\0')
900 continue;
901
902 return yyd - 1;
903}
904# endif
905# endif
906
907# ifndef yytnamerr
908/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
909 quotes and backslashes, so that it's suitable for yyerror. The
910 heuristic is that double-quoting is unnecessary unless the string
911 contains an apostrophe, a comma, or backslash (other than
912 backslash-backslash). YYSTR is taken from yytname. If YYRES is
913 null, do not copy; instead, return the length of what the result
914 would have been. */
Nico Huberd9b2f792020-04-28 16:28:03 +0200915static YYPTRDIFF_T
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000916yytnamerr (char *yyres, const char *yystr)
917{
918 if (*yystr == '"')
919 {
Nico Huberd9b2f792020-04-28 16:28:03 +0200920 YYPTRDIFF_T yyn = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000921 char const *yyp = yystr;
922
923 for (;;)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700924 switch (*++yyp)
925 {
926 case '\'':
927 case ',':
928 goto do_not_strip_quotes;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000929
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700930 case '\\':
931 if (*++yyp != '\\')
932 goto do_not_strip_quotes;
Nico Huberd9b2f792020-04-28 16:28:03 +0200933 else
934 goto append;
935
936 append:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700937 default:
938 if (yyres)
939 yyres[yyn] = *yyp;
940 yyn++;
941 break;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000942
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700943 case '"':
944 if (yyres)
945 yyres[yyn] = '\0';
946 return yyn;
947 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000948 do_not_strip_quotes: ;
949 }
950
Nico Huberd9b2f792020-04-28 16:28:03 +0200951 if (yyres)
952 return yystpcpy (yyres, yystr) - yyres;
953 else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000954 return yystrlen (yystr);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000955}
956# endif
957
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200958/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
959 about the unexpected token YYTOKEN for the state stack whose top is
960 YYSSP.
961
962 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
963 not large enough to hold the message. In that case, also set
964 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
965 required number of bytes is too large to store. */
966static int
Nico Huberd9b2f792020-04-28 16:28:03 +0200967yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
968 yy_state_t *yyssp, int yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000969{
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200970 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
971 /* Internationalized format string. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -0700972 const char *yyformat = YY_NULLPTR;
Nico Huberd9b2f792020-04-28 16:28:03 +0200973 /* Arguments of yyformat: reported tokens (one for the "unexpected",
974 one per "expected"). */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200975 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
Nico Huberd9b2f792020-04-28 16:28:03 +0200976 /* Actual size of YYARG. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200977 int yycount = 0;
Nico Huberd9b2f792020-04-28 16:28:03 +0200978 /* Cumulated lengths of YYARG. */
979 YYPTRDIFF_T yysize = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +0000980
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200981 /* There are many possibilities here to consider:
Sven Schnelle0fa50a12012-06-21 22:19:48 +0200982 - If this state is a consistent state with a default action, then
983 the only way this function was invoked is if the default action
984 is an error action. In that case, don't check for expected
985 tokens because there are none.
986 - The only way there can be no lookahead present (in yychar) is if
987 this state is a consistent state with a default action. Thus,
988 detecting the absence of a lookahead is sufficient to determine
989 that there is no unexpected or expected token to report. In that
990 case, just report a simple "syntax error".
991 - Don't assume there isn't a lookahead just because this state is a
992 consistent state with a default action. There might have been a
993 previous inconsistent state, consistent state with a non-default
994 action, or user semantic action that manipulated yychar.
995 - Of course, the expected token list depends on states to have
996 correct lookahead information, and it depends on the parser not
997 to perform extra reductions after fetching a lookahead from the
998 scanner and before detecting a syntax error. Thus, state merging
999 (from LALR or IELR) and default reductions corrupt the expected
1000 token list. However, the list is correct for canonical LR with
1001 one exception: it will still contain any token that will not be
1002 accepted due to an error action in a later state.
1003 */
1004 if (yytoken != YYEMPTY)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001005 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001006 int yyn = yypact[+*yyssp];
1007 YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1008 yysize = yysize0;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001009 yyarg[yycount++] = yytname[yytoken];
1010 if (!yypact_value_is_default (yyn))
1011 {
1012 /* Start YYX at -YYN if negative to avoid negative indexes in
1013 YYCHECK. In other words, skip the first -YYN actions for
1014 this state because they are default actions. */
1015 int yyxbegin = yyn < 0 ? -yyn : 0;
1016 /* Stay within bounds of both yycheck and yytname. */
1017 int yychecklim = YYLAST - yyn + 1;
1018 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1019 int yyx;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001020
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001021 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1022 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1023 && !yytable_value_is_error (yytable[yyx + yyn]))
1024 {
1025 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1026 {
1027 yycount = 1;
1028 yysize = yysize0;
1029 break;
1030 }
1031 yyarg[yycount++] = yytname[yyx];
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001032 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001033 YYPTRDIFF_T yysize1
1034 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1035 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1036 yysize = yysize1;
1037 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001038 return 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001039 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001040 }
1041 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001042 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001043
1044 switch (yycount)
1045 {
1046# define YYCASE_(N, S) \
1047 case N: \
1048 yyformat = S; \
1049 break
Nico Huberd9b2f792020-04-28 16:28:03 +02001050 default: /* Avoid compiler warnings. */
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001051 YYCASE_(0, YY_("syntax error"));
1052 YYCASE_(1, YY_("syntax error, unexpected %s"));
1053 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1054 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1055 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1056 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1057# undef YYCASE_
1058 }
1059
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001060 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001061 /* Don't count the "%s"s in the final size, but reserve room for
1062 the terminator. */
1063 YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1064 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1065 yysize = yysize1;
1066 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001067 return 2;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001068 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001069
1070 if (*yymsg_alloc < yysize)
1071 {
1072 *yymsg_alloc = 2 * yysize;
1073 if (! (yysize <= *yymsg_alloc
1074 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1075 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1076 return 1;
1077 }
1078
1079 /* Avoid sprintf, as that infringes on the user's name space.
1080 Don't have undefined behavior even if the translation
1081 produced a string with the wrong number of "%s"s. */
1082 {
1083 char *yyp = *yymsg;
1084 int yyi = 0;
1085 while ((*yyp = *yyformat) != '\0')
1086 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1087 {
1088 yyp += yytnamerr (yyp, yyarg[yyi++]);
1089 yyformat += 2;
1090 }
1091 else
1092 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001093 ++yyp;
1094 ++yyformat;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001095 }
1096 }
1097 return 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001098}
1099#endif /* YYERROR_VERBOSE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001100
1101/*-----------------------------------------------.
1102| Release the memory associated to this symbol. |
1103`-----------------------------------------------*/
1104
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001105static void
1106yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001107{
1108 YYUSE (yyvaluep);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001109 if (!yymsg)
1110 yymsg = "Deleting";
1111 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1112
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001113 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1114 YYUSE (yytype);
1115 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001116}
1117
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001118
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001119
1120
1121/* The lookahead symbol. */
1122int yychar;
1123
1124/* The semantic value of the lookahead symbol. */
1125YYSTYPE yylval;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001126/* Number of syntax errors so far. */
1127int yynerrs;
1128
1129
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001130/*----------.
1131| yyparse. |
1132`----------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001133
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001134int
1135yyparse (void)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001136{
Nico Huberd9b2f792020-04-28 16:28:03 +02001137 yy_state_fast_t yystate;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001138 /* Number of tokens to shift before error messages enabled. */
1139 int yyerrstatus;
1140
1141 /* The stacks and their tools:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001142 'yyss': related to states.
1143 'yyvs': related to semantic values.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001144
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001145 Refer to the stacks through separate pointers, to allow yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001146 to reallocate them elsewhere. */
1147
1148 /* The state stack. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001149 yy_state_t yyssa[YYINITDEPTH];
1150 yy_state_t *yyss;
1151 yy_state_t *yyssp;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001152
1153 /* The semantic value stack. */
1154 YYSTYPE yyvsa[YYINITDEPTH];
1155 YYSTYPE *yyvs;
1156 YYSTYPE *yyvsp;
1157
Nico Huberd9b2f792020-04-28 16:28:03 +02001158 YYPTRDIFF_T yystacksize;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001159
1160 int yyn;
1161 int yyresult;
1162 /* Lookahead token as an internal (translated) token number. */
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001163 int yytoken = 0;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001164 /* The variables used to return semantic value and location from the
1165 action routines. */
1166 YYSTYPE yyval;
1167
1168#if YYERROR_VERBOSE
1169 /* Buffer for error messages, and its allocated size. */
1170 char yymsgbuf[128];
1171 char *yymsg = yymsgbuf;
Nico Huberd9b2f792020-04-28 16:28:03 +02001172 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001173#endif
1174
1175#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1176
1177 /* The number of symbols on the RHS of the reduced rule.
1178 Keep to zero when no symbol should be popped. */
1179 int yylen = 0;
1180
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001181 yyssp = yyss = yyssa;
1182 yyvsp = yyvs = yyvsa;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001183 yystacksize = YYINITDEPTH;
1184
1185 YYDPRINTF ((stderr, "Starting parse\n"));
1186
1187 yystate = 0;
1188 yyerrstatus = 0;
1189 yynerrs = 0;
1190 yychar = YYEMPTY; /* Cause a token to be read. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001191 goto yysetstate;
1192
Nico Huberd9b2f792020-04-28 16:28:03 +02001193
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001194/*------------------------------------------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001195| yynewstate -- push a new state, which is found in yystate. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001196`------------------------------------------------------------*/
Nico Huberd9b2f792020-04-28 16:28:03 +02001197yynewstate:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001198 /* In all cases, when you get here, the value and location stacks
1199 have just been pushed. So pushing a state here evens the stacks. */
1200 yyssp++;
1201
Nico Huberd9b2f792020-04-28 16:28:03 +02001202
1203/*--------------------------------------------------------------------.
1204| yysetstate -- set current state (the top of the stack) to yystate. |
1205`--------------------------------------------------------------------*/
1206yysetstate:
1207 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1208 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1209 YY_IGNORE_USELESS_CAST_BEGIN
1210 *yyssp = YY_CAST (yy_state_t, yystate);
1211 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001212
1213 if (yyss + yystacksize - 1 <= yyssp)
Nico Huberd9b2f792020-04-28 16:28:03 +02001214#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1215 goto yyexhaustedlab;
1216#else
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001217 {
1218 /* Get the current used size of the three stacks, in elements. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001219 YYPTRDIFF_T yysize = yyssp - yyss + 1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001220
Nico Huberd9b2f792020-04-28 16:28:03 +02001221# if defined yyoverflow
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001222 {
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001223 /* Give user a chance to reallocate the stack. Use copies of
1224 these so that the &'s don't force the real ones into
1225 memory. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001226 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001227 YYSTYPE *yyvs1 = yyvs;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001228
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001229 /* Each stack pointer address is followed by the size of the
1230 data in use in that stack, in bytes. This used to be a
1231 conditional around just the two extra args, but that might
1232 be undefined if yyoverflow is a macro. */
1233 yyoverflow (YY_("memory exhausted"),
Nico Huberd9b2f792020-04-28 16:28:03 +02001234 &yyss1, yysize * YYSIZEOF (*yyssp),
1235 &yyvs1, yysize * YYSIZEOF (*yyvsp),
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001236 &yystacksize);
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001237 yyss = yyss1;
1238 yyvs = yyvs1;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001239 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001240# else /* defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001241 /* Extend the stack our own way. */
1242 if (YYMAXDEPTH <= yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001243 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001244 yystacksize *= 2;
1245 if (YYMAXDEPTH < yystacksize)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001246 yystacksize = YYMAXDEPTH;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001247
1248 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001249 yy_state_t *yyss1 = yyss;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001250 union yyalloc *yyptr =
Nico Huberd9b2f792020-04-28 16:28:03 +02001251 YY_CAST (union yyalloc *,
1252 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001253 if (! yyptr)
1254 goto yyexhaustedlab;
1255 YYSTACK_RELOCATE (yyss_alloc, yyss);
1256 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Nico Huberd9b2f792020-04-28 16:28:03 +02001257# undef YYSTACK_RELOCATE
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001258 if (yyss1 != yyssa)
1259 YYSTACK_FREE (yyss1);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001260 }
1261# endif
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001262
1263 yyssp = yyss + yysize - 1;
1264 yyvsp = yyvs + yysize - 1;
1265
Nico Huberd9b2f792020-04-28 16:28:03 +02001266 YY_IGNORE_USELESS_CAST_BEGIN
1267 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1268 YY_CAST (long, yystacksize)));
1269 YY_IGNORE_USELESS_CAST_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001270
1271 if (yyss + yystacksize - 1 <= yyssp)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001272 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001273 }
Nico Huberd9b2f792020-04-28 16:28:03 +02001274#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001275
1276 if (yystate == YYFINAL)
1277 YYACCEPT;
1278
1279 goto yybackup;
1280
Nico Huberd9b2f792020-04-28 16:28:03 +02001281
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001282/*-----------.
1283| yybackup. |
1284`-----------*/
1285yybackup:
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001286 /* Do appropriate processing given the current state. Read a
1287 lookahead token if we need one and don't already have one. */
1288
1289 /* First try to decide what to do without reference to lookahead token. */
1290 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001291 if (yypact_value_is_default (yyn))
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001292 goto yydefault;
1293
1294 /* Not known => get a lookahead token if don't already have one. */
1295
1296 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1297 if (yychar == YYEMPTY)
1298 {
1299 YYDPRINTF ((stderr, "Reading a token: "));
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001300 yychar = yylex ();
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001301 }
1302
1303 if (yychar <= YYEOF)
1304 {
1305 yychar = yytoken = YYEOF;
1306 YYDPRINTF ((stderr, "Now at end of input.\n"));
1307 }
1308 else
1309 {
1310 yytoken = YYTRANSLATE (yychar);
1311 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1312 }
1313
1314 /* If the proper action on seeing token YYTOKEN is to reduce or to
1315 detect an error, take that action. */
1316 yyn += yytoken;
1317 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1318 goto yydefault;
1319 yyn = yytable[yyn];
1320 if (yyn <= 0)
1321 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001322 if (yytable_value_is_error (yyn))
1323 goto yyerrlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001324 yyn = -yyn;
1325 goto yyreduce;
1326 }
1327
1328 /* Count tokens shifted since error; after three, turn off error
1329 status. */
1330 if (yyerrstatus)
1331 yyerrstatus--;
1332
1333 /* Shift the lookahead token. */
1334 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001335 yystate = yyn;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001336 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001337 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001338 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001339
Nico Huberd9b2f792020-04-28 16:28:03 +02001340 /* Discard the shifted token. */
1341 yychar = YYEMPTY;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001342 goto yynewstate;
1343
1344
1345/*-----------------------------------------------------------.
1346| yydefault -- do the default action for the current state. |
1347`-----------------------------------------------------------*/
1348yydefault:
1349 yyn = yydefact[yystate];
1350 if (yyn == 0)
1351 goto yyerrlab;
1352 goto yyreduce;
1353
1354
1355/*-----------------------------.
Nico Huberd9b2f792020-04-28 16:28:03 +02001356| yyreduce -- do a reduction. |
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001357`-----------------------------*/
1358yyreduce:
1359 /* yyn is the number of a rule to reduce with. */
1360 yylen = yyr2[yyn];
1361
1362 /* If YYLEN is nonzero, implement the default value of the action:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001363 '$$ = $1'.
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001364
1365 Otherwise, the following line sets YYVAL to garbage.
1366 This behavior is undocumented and Bison
1367 users should not rely upon it. Assigning to YYVAL
1368 unconditionally makes the parser a bit smaller, and it avoids a
1369 GCC warning that YYVAL may be used uninitialized. */
1370 yyval = yyvsp[1-yylen];
1371
1372
1373 YY_REDUCE_PRINT (yyn);
1374 switch (yyn)
1375 {
Nico Huberd9b2f792020-04-28 16:28:03 +02001376 case 2:
1377 { cur_parent = root_parent; }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001378 break;
1379
Nico Huberd9b2f792020-04-28 16:28:03 +02001380 case 16:
1381 {
Furquan Shaikhc56ae2f2018-05-31 10:33:16 -07001382 (yyval.chip_instance) = new_chip_instance((yyvsp[0].string));
1383 chip_enqueue_tail(cur_chip_instance);
1384 cur_chip_instance = (yyval.chip_instance);
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001385}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001386 break;
1387
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001388 case 17:
Nico Huberd9b2f792020-04-28 16:28:03 +02001389 {
1390 cur_chip_instance = chip_dequeue_tail();
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001391}
1392 break;
1393
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001394 case 18:
Nico Huberd9b2f792020-04-28 16:28:03 +02001395 {
1396 (yyval.dev) = new_device(cur_parent, cur_chip_instance, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number));
1397 cur_parent = (yyval.dev)->last_bus;
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001398}
Patrick Georgi68befd52010-05-05 12:05:25 +00001399 break;
1400
Nico Huberd9b2f792020-04-28 16:28:03 +02001401 case 19:
1402 {
1403 cur_parent = (yyvsp[-2].dev)->parent;
1404}
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001405 break;
1406
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001407 case 22:
Nico Huberd9b2f792020-04-28 16:28:03 +02001408 { 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 +00001409 break;
1410
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001411 case 23:
Nico Huberd9b2f792020-04-28 16:28:03 +02001412 { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001413 break;
1414
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001415 case 24:
Nico Huberd9b2f792020-04-28 16:28:03 +02001416 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001417 break;
1418
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001419 case 25:
Nico Huberd9b2f792020-04-28 16:28:03 +02001420 { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); }
Sven Schnelle270a9082011-03-01 19:58:15 +00001421 break;
1422
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001423 case 26:
Nico Huberd9b2f792020-04-28 16:28:03 +02001424 { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001425 break;
1426
1427 case 27:
Nico Huberd9b2f792020-04-28 16:28:03 +02001428 { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001429 break;
1430
1431 case 28:
Nico Huberd9b2f792020-04-28 16:28:03 +02001432 { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); }
1433 break;
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001434
Nico Huberd9b2f792020-04-28 16:28:03 +02001435 case 29:
1436 { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); }
Patrick Rudolphac24d3c2019-04-12 14:42:17 +02001437 break;
1438
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001439
1440
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001441 default: break;
1442 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001443 /* User semantic actions sometimes alter yychar, and that requires
1444 that yytoken be updated with the new translation. We take the
1445 approach of translating immediately before every use of yytoken.
1446 One alternative is translating here after every semantic action,
1447 but that translation would be missed if the semantic action invokes
1448 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1449 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1450 incorrect destructor might then be invoked immediately. In the
1451 case of YYERROR or YYBACKUP, subsequent parser actions might lead
1452 to an incorrect destructor call or verbose syntax error message
1453 before the lookahead is translated. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001454 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1455
1456 YYPOPSTACK (yylen);
1457 yylen = 0;
1458 YY_STACK_PRINT (yyss, yyssp);
1459
1460 *++yyvsp = yyval;
1461
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001462 /* Now 'shift' the result of the reduction. Determine what state
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001463 that goes to, based on the state we popped back to and the rule
1464 number reduced by. */
Nico Huberd9b2f792020-04-28 16:28:03 +02001465 {
1466 const int yylhs = yyr1[yyn] - YYNTOKENS;
1467 const int yyi = yypgoto[yylhs] + *yyssp;
1468 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1469 ? yytable[yyi]
1470 : yydefgoto[yylhs]);
1471 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001472
1473 goto yynewstate;
1474
1475
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001476/*--------------------------------------.
1477| yyerrlab -- here on detecting error. |
1478`--------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001479yyerrlab:
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001480 /* Make sure we have latest lookahead translation. See comments at
1481 user semantic actions for why this is necessary. */
1482 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1483
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001484 /* If not already recovering from an error, report this error. */
1485 if (!yyerrstatus)
1486 {
1487 ++yynerrs;
1488#if ! YYERROR_VERBOSE
1489 yyerror (YY_("syntax error"));
1490#else
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001491# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1492 yyssp, yytoken)
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001493 {
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001494 char const *yymsgp = YY_("syntax error");
1495 int yysyntax_error_status;
1496 yysyntax_error_status = YYSYNTAX_ERROR;
1497 if (yysyntax_error_status == 0)
1498 yymsgp = yymsg;
1499 else if (yysyntax_error_status == 1)
1500 {
1501 if (yymsg != yymsgbuf)
1502 YYSTACK_FREE (yymsg);
Nico Huberd9b2f792020-04-28 16:28:03 +02001503 yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001504 if (!yymsg)
1505 {
1506 yymsg = yymsgbuf;
1507 yymsg_alloc = sizeof yymsgbuf;
1508 yysyntax_error_status = 2;
1509 }
1510 else
1511 {
1512 yysyntax_error_status = YYSYNTAX_ERROR;
1513 yymsgp = yymsg;
1514 }
1515 }
1516 yyerror (yymsgp);
1517 if (yysyntax_error_status == 2)
1518 goto yyexhaustedlab;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001519 }
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001520# undef YYSYNTAX_ERROR
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001521#endif
1522 }
1523
1524
1525
1526 if (yyerrstatus == 3)
1527 {
1528 /* If just tried and failed to reuse lookahead token after an
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001529 error, discard it. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001530
1531 if (yychar <= YYEOF)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001532 {
1533 /* Return failure if at end of input. */
1534 if (yychar == YYEOF)
1535 YYABORT;
1536 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001537 else
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001538 {
1539 yydestruct ("Error: discarding",
1540 yytoken, &yylval);
1541 yychar = YYEMPTY;
1542 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001543 }
1544
1545 /* Else will try to reuse lookahead token after shifting the error
1546 token. */
1547 goto yyerrlab1;
1548
1549
1550/*---------------------------------------------------.
1551| yyerrorlab -- error raised explicitly by YYERROR. |
1552`---------------------------------------------------*/
1553yyerrorlab:
Nico Huberd9b2f792020-04-28 16:28:03 +02001554 /* Pacify compilers when the user code never invokes YYERROR and the
1555 label yyerrorlab therefore never appears in user code. */
1556 if (0)
1557 YYERROR;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001558
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001559 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001560 this YYERROR. */
1561 YYPOPSTACK (yylen);
1562 yylen = 0;
1563 YY_STACK_PRINT (yyss, yyssp);
1564 yystate = *yyssp;
1565 goto yyerrlab1;
1566
1567
1568/*-------------------------------------------------------------.
1569| yyerrlab1 -- common code for both syntax error and YYERROR. |
1570`-------------------------------------------------------------*/
1571yyerrlab1:
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001572 yyerrstatus = 3; /* Each real token shifted decrements this. */
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001573
1574 for (;;)
1575 {
1576 yyn = yypact[yystate];
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001577 if (!yypact_value_is_default (yyn))
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001578 {
1579 yyn += YYTERROR;
1580 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1581 {
1582 yyn = yytable[yyn];
1583 if (0 < yyn)
1584 break;
1585 }
1586 }
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001587
1588 /* Pop the current state because it cannot handle the error token. */
1589 if (yyssp == yyss)
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001590 YYABORT;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001591
1592
1593 yydestruct ("Error: popping",
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001594 yystos[yystate], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001595 YYPOPSTACK (1);
1596 yystate = *yyssp;
1597 YY_STACK_PRINT (yyss, yyssp);
1598 }
1599
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001600 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001601 *++yyvsp = yylval;
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001602 YY_IGNORE_MAYBE_UNINITIALIZED_END
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001603
1604
1605 /* Shift the error token. */
1606 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1607
1608 yystate = yyn;
1609 goto yynewstate;
1610
1611
1612/*-------------------------------------.
1613| yyacceptlab -- YYACCEPT comes here. |
1614`-------------------------------------*/
1615yyacceptlab:
1616 yyresult = 0;
1617 goto yyreturn;
1618
Nico Huberd9b2f792020-04-28 16:28:03 +02001619
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001620/*-----------------------------------.
1621| yyabortlab -- YYABORT comes here. |
1622`-----------------------------------*/
1623yyabortlab:
1624 yyresult = 1;
1625 goto yyreturn;
1626
Nico Huberd9b2f792020-04-28 16:28:03 +02001627
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001628#if !defined yyoverflow || YYERROR_VERBOSE
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001629/*-------------------------------------------------.
1630| yyexhaustedlab -- memory exhaustion comes here. |
1631`-------------------------------------------------*/
1632yyexhaustedlab:
1633 yyerror (YY_("memory exhausted"));
1634 yyresult = 2;
1635 /* Fall through. */
1636#endif
1637
Nico Huberd9b2f792020-04-28 16:28:03 +02001638
1639/*-----------------------------------------------------.
1640| yyreturn -- parsing is finished, return the result. |
1641`-----------------------------------------------------*/
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001642yyreturn:
1643 if (yychar != YYEMPTY)
Sven Schnelle0fa50a12012-06-21 22:19:48 +02001644 {
1645 /* Make sure we have latest lookahead translation. See comments at
1646 user semantic actions for why this is necessary. */
1647 yytoken = YYTRANSLATE (yychar);
1648 yydestruct ("Cleanup: discarding lookahead",
1649 yytoken, &yylval);
1650 }
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001651 /* Do not reclaim the symbols of the rule whose action triggered
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001652 this YYABORT or YYACCEPT. */
1653 YYPOPSTACK (yylen);
1654 YY_STACK_PRINT (yyss, yyssp);
1655 while (yyssp != yyss)
1656 {
1657 yydestruct ("Cleanup: popping",
Nico Huberd9b2f792020-04-28 16:28:03 +02001658 yystos[+*yyssp], yyvsp);
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001659 YYPOPSTACK (1);
1660 }
1661#ifndef yyoverflow
1662 if (yyss != yyssa)
1663 YYSTACK_FREE (yyss);
1664#endif
1665#if YYERROR_VERBOSE
1666 if (yymsg != yymsgbuf)
1667 YYSTACK_FREE (yymsg);
1668#endif
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001669 return yyresult;
Patrick Georgi7e8c9aa2010-04-08 11:37:43 +00001670}
Stefan Reinauer2e78aa52016-05-07 01:11:14 -07001671