Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 3.5.4. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 2 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 3 | /* Bison implementation for Yacc-like parsers in C |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 4 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 5 | Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, |
| 6 | Inc. |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 7 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 8 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 12 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 13 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 17 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 18 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 30 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 31 | 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 44 | /* Undocumented macros, especially those whose name start with YY_, |
| 45 | are private implementation details. Do not rely on them. */ |
| 46 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 47 | /* Identify Bison output. */ |
| 48 | #define YYBISON 1 |
| 49 | |
| 50 | /* Bison version. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 51 | #define YYBISON_VERSION "3.5.4" |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 52 | |
| 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 65 | |
| 66 | |
| 67 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 68 | /* First part of user prologue. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 69 | |
Patrick Georgi | ea063cb | 2020-05-08 19:28:13 +0200 | [diff] [blame] | 70 | /* sconfig, coreboot device tree compiler */ |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 71 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 72 | |
Patrick Georgi | 114e7b2 | 2010-05-05 11:19:50 +0000 | [diff] [blame] | 73 | #include "sconfig.h" |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 74 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 75 | int yylex(); |
| 76 | void yyerror(const char *s); |
| 77 | |
Furquan Shaikh | 9319826 | 2018-06-03 04:22:17 -0700 | [diff] [blame] | 78 | static struct bus *cur_parent; |
Furquan Shaikh | c56ae2f | 2018-05-31 10:33:16 -0700 | [diff] [blame] | 79 | static struct chip_instance *cur_chip_instance; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 80 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 81 | |
| 82 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 83 | # 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 87 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 88 | # 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 101 | # endif |
| 102 | # endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 103 | |
| 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 112 | /* 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 116 | /* Debug traces. */ |
| 117 | #ifndef YYDEBUG |
| 118 | # define YYDEBUG 0 |
| 119 | #endif |
| 120 | #if YYDEBUG |
| 121 | extern int yydebug; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 122 | #endif |
| 123 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 124 | /* Token type. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 125 | #ifndef YYTOKENTYPE |
| 126 | # define YYTOKENTYPE |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 127 | enum yytokentype |
| 128 | { |
| 129 | CHIP = 258, |
| 130 | DEVICE = 259, |
| 131 | REGISTER = 260, |
| 132 | BOOL = 261, |
Ronald G. Minnich | 466ca2c | 2019-10-22 02:02:24 +0000 | [diff] [blame] | 133 | 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 Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 161 | MMIO = 290, |
| 162 | LPC = 291, |
| 163 | ESPI = 292 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 164 | }; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 165 | #endif |
| 166 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 167 | /* Value type. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 168 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 169 | union YYSTYPE |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 170 | { |
| 171 | |
Furquan Shaikh | 9319826 | 2018-06-03 04:22:17 -0700 | [diff] [blame] | 172 | struct device *dev; |
Furquan Shaikh | c56ae2f | 2018-05-31 10:33:16 -0700 | [diff] [blame] | 173 | struct chip_instance *chip_instance; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 174 | char *string; |
| 175 | int number; |
| 176 | |
| 177 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 178 | }; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 179 | typedef union YYSTYPE YYSTYPE; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 180 | # define YYSTYPE_IS_TRIVIAL 1 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 181 | # define YYSTYPE_IS_DECLARED 1 |
| 182 | #endif |
| 183 | |
| 184 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 185 | extern YYSTYPE yylval; |
| 186 | |
| 187 | int yyparse (void); |
| 188 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 189 | #endif /* !YY_YY_HOME_ME_REPOS_COREBOOTORG_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 190 | |
| 191 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 192 | |
| 193 | #ifdef short |
| 194 | # undef short |
| 195 | #endif |
| 196 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 197 | /* 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 207 | #endif |
| 208 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 209 | /* 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__ |
| 215 | typedef __INT_LEAST8_TYPE__ yytype_int8; |
| 216 | #elif defined YY_STDINT_H |
| 217 | typedef int_least8_t yytype_int8; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 218 | #else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 219 | typedef signed char yytype_int8; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 220 | #endif |
| 221 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 222 | #ifdef __INT_LEAST16_MAX__ |
| 223 | typedef __INT_LEAST16_TYPE__ yytype_int16; |
| 224 | #elif defined YY_STDINT_H |
| 225 | typedef int_least16_t yytype_int16; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 226 | #else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 227 | typedef short yytype_int16; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 228 | #endif |
| 229 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 230 | #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ |
| 231 | typedef __UINT_LEAST8_TYPE__ yytype_uint8; |
| 232 | #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ |
| 233 | && UINT_LEAST8_MAX <= INT_MAX) |
| 234 | typedef uint_least8_t yytype_uint8; |
| 235 | #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX |
| 236 | typedef unsigned char yytype_uint8; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 237 | #else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 238 | typedef short yytype_uint8; |
| 239 | #endif |
| 240 | |
| 241 | #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ |
| 242 | typedef __UINT_LEAST16_TYPE__ yytype_uint16; |
| 243 | #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ |
| 244 | && UINT_LEAST16_MAX <= INT_MAX) |
| 245 | typedef uint_least16_t yytype_uint16; |
| 246 | #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX |
| 247 | typedef unsigned short yytype_uint16; |
| 248 | #else |
| 249 | typedef 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 266 | #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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 273 | # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 274 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 275 | # define YYSIZE_T size_t |
| 276 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 277 | # define YYSIZE_T unsigned |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 278 | # endif |
| 279 | #endif |
| 280 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 281 | #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). */ |
| 290 | typedef yytype_int8 yy_state_t; |
| 291 | |
| 292 | /* State numbers in computations. */ |
| 293 | typedef int yy_state_fast_t; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 294 | |
| 295 | #ifndef YY_ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 296 | # if defined YYENABLE_NLS && YYENABLE_NLS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 297 | # if ENABLE_NLS |
| 298 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 299 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 300 | # endif |
| 301 | # endif |
| 302 | # ifndef YY_ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 303 | # define YY_(Msgid) Msgid |
| 304 | # endif |
| 305 | #endif |
| 306 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 307 | #ifndef YY_ATTRIBUTE_PURE |
| 308 | # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) |
| 309 | # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 310 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 311 | # define YY_ATTRIBUTE_PURE |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 312 | # endif |
| 313 | #endif |
| 314 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 315 | #ifndef YY_ATTRIBUTE_UNUSED |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 316 | # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) |
| 317 | # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 318 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 319 | # define YY_ATTRIBUTE_UNUSED |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 320 | # endif |
| 321 | #endif |
| 322 | |
| 323 | /* Suppress unused-variable warnings by "using" E. */ |
| 324 | #if ! defined lint || defined __GNUC__ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 325 | # define YYUSE(E) ((void) (E)) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 326 | #else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 327 | # define YYUSE(E) /* empty */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 328 | #endif |
| 329 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 330 | #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 331 | /* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 332 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
| 333 | _Pragma ("GCC diagnostic push") \ |
| 334 | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 335 | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 336 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 337 | _Pragma ("GCC diagnostic pop") |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 338 | #else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 339 | # define YY_INITIAL_VALUE(Value) Value |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 340 | #endif |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 341 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 342 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 343 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 344 | #endif |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 345 | #ifndef YY_INITIAL_VALUE |
| 346 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
| 347 | #endif |
| 348 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 349 | #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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 363 | |
| 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 381 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 382 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 383 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 384 | # ifndef EXIT_SUCCESS |
| 385 | # define EXIT_SUCCESS 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 386 | # endif |
| 387 | # endif |
| 388 | # endif |
| 389 | # endif |
| 390 | # endif |
| 391 | |
| 392 | # ifdef YYSTACK_ALLOC |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 393 | /* Pacify GCC's 'empty if-body' warning. */ |
| 394 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 395 | # 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 Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 408 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 409 | && ! ((defined YYMALLOC || defined malloc) \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 410 | && (defined YYFREE || defined free))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 411 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 412 | # ifndef EXIT_SUCCESS |
| 413 | # define EXIT_SUCCESS 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 414 | # endif |
| 415 | # endif |
| 416 | # ifndef YYMALLOC |
| 417 | # define YYMALLOC malloc |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 418 | # if ! defined malloc && ! defined EXIT_SUCCESS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 419 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 420 | # endif |
| 421 | # endif |
| 422 | # ifndef YYFREE |
| 423 | # define YYFREE free |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 424 | # if ! defined free && ! defined EXIT_SUCCESS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 425 | void 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 434 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 435 | |
| 436 | /* A type that is properly aligned for any stack member. */ |
| 437 | union yyalloc |
| 438 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 439 | yy_state_t yyss_alloc; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 440 | YYSTYPE yyvs_alloc; |
| 441 | }; |
| 442 | |
| 443 | /* The size of the maximum gap between one aligned stack and the next. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 444 | # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 445 | |
| 446 | /* The size of an array large to enough to hold all stacks, each with |
| 447 | N elements. */ |
| 448 | # define YYSTACK_BYTES(N) \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 449 | ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 450 | + YYSTACK_GAP_MAXIMUM) |
| 451 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 452 | # define YYCOPY_NEEDED 1 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 453 | |
| 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 459 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 460 | do \ |
| 461 | { \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 462 | YYPTRDIFF_T yynewbytes; \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 463 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 464 | Stack = &yyptr->Stack_alloc; \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 465 | yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 466 | yyptr += yynewbytes / YYSIZEOF (*yyptr); \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 467 | } \ |
| 468 | while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 469 | |
| 470 | #endif |
| 471 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 472 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 473 | /* Copy COUNT objects from SRC to DST. The source and destination do |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 474 | not overlap. */ |
| 475 | # ifndef YYCOPY |
| 476 | # if defined __GNUC__ && 1 < __GNUC__ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 477 | # define YYCOPY(Dst, Src, Count) \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 478 | __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 479 | # else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 480 | # define YYCOPY(Dst, Src, Count) \ |
| 481 | do \ |
| 482 | { \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 483 | YYPTRDIFF_T yyi; \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 484 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 485 | (Dst)[yyi] = (Src)[yyi]; \ |
| 486 | } \ |
| 487 | while (0) |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 488 | # endif |
| 489 | # endif |
| 490 | #endif /* !YYCOPY_NEEDED */ |
| 491 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 492 | /* YYFINAL -- State number of the termination state. */ |
Patrick Georgi | 68befd5 | 2010-05-05 12:05:25 +0000 | [diff] [blame] | 493 | #define YYFINAL 3 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 494 | /* YYLAST -- Last index in YYTABLE. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 495 | #define YYLAST 45 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 496 | |
| 497 | /* YYNTOKENS -- Number of terminals. */ |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 498 | #define YYNTOKENS 38 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 499 | /* YYNNTS -- Number of nonterminals. */ |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 500 | #define YYNNTS 15 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 501 | /* YYNRULES -- Number of rules. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 502 | #define YYNRULES 29 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 503 | /* YYNSTATES -- Number of states. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 504 | #define YYNSTATES 50 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 505 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 506 | #define YYUNDEFTOK 2 |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 507 | #define YYMAXUTOK 292 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 508 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 509 | |
| 510 | /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
| 511 | as returned by yylex, with out-of-bounds checking. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 512 | #define YYTRANSLATE(YYX) \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 513 | (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 514 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 515 | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 516 | as returned by yylex. */ |
| 517 | static const yytype_int8 yytranslate[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 518 | { |
| 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 Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 546 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
Ronald G. Minnich | 466ca2c | 2019-10-22 02:02:24 +0000 | [diff] [blame] | 547 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 548 | 35, 36, 37 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 549 | }; |
| 550 | |
| 551 | #if YYDEBUG |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 552 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 553 | static const yytype_int8 yyrline[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 554 | { |
Furquan Shaikh | 79e8412 | 2018-05-30 15:09:09 -0700 | [diff] [blame] | 555 | 0, 36, 36, 36, 38, 38, 38, 38, 40, 40, |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 556 | 40, 40, 40, 40, 40, 40, 42, 42, 51, 51, |
| 557 | 59, 59, 61, 64, 67, 70, 73, 76, 79, 82 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 558 | }; |
| 559 | #endif |
| 560 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 561 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 562 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 563 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 564 | static const char *const yytname[] = |
| 565 | { |
| 566 | "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL", |
Ronald G. Minnich | 466ca2c | 2019-10-22 02:02:24 +0000 | [diff] [blame] | 567 | "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 Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 570 | "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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 574 | }; |
| 575 | #endif |
| 576 | |
| 577 | # ifdef YYPRINT |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 578 | /* YYTOKNUM[NUM] -- (External) token number corresponding to the |
| 579 | (internal) symbol number NUM (which must be that of a token). */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 580 | static const yytype_int16 yytoknum[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 581 | { |
| 582 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 583 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
Furquan Shaikh | e670029 | 2017-02-11 00:50:38 -0800 | [diff] [blame] | 584 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 585 | 285, 286, 287, 288, 289, 290, 291, 292 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 586 | }; |
| 587 | # endif |
| 588 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 589 | #define YYPACT_NINF (-10) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 590 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 591 | #define yypact_value_is_default(Yyn) \ |
| 592 | ((Yyn) == YYPACT_NINF) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 593 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 594 | #define YYTABLE_NINF (-1) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 595 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 596 | #define yytable_value_is_error(Yyn) \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 597 | 0 |
| 598 | |
| 599 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 600 | STATE-NUM. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 601 | static const yytype_int8 yypact[] = |
| 602 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 603 | -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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 608 | }; |
| 609 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 610 | /* 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 613 | static const yytype_int8 yydefact[] = |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 614 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 615 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 620 | }; |
| 621 | |
| 622 | /* YYPGOTO[NTERM-NUM]. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 623 | static const yytype_int8 yypgoto[] = |
| 624 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 625 | -10, -10, -10, -10, -10, -5, -10, 20, -10, -10, |
| 626 | -10, 21, -10, -10, -10 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 627 | }; |
| 628 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 629 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 630 | static const yytype_int8 yydefgoto[] = |
| 631 | { |
Hung-Te Lin | 936dbe1 | 2018-09-10 10:51:26 +0800 | [diff] [blame] | 632 | -1, 1, 2, 8, 24, 5, 7, 13, 23, 21, |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 633 | 32, 14, 34, 35, 36 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 634 | }; |
| 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 639 | static const yytype_int8 yytable[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 640 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 641 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 646 | }; |
| 647 | |
Patrick Georgi | 8f625f6 | 2010-05-05 13:13:47 +0000 | [diff] [blame] | 648 | static const yytype_int8 yycheck[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 649 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 650 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 655 | }; |
| 656 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 657 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 658 | symbol of state STATE-NUM. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 659 | static const yytype_int8 yystos[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 660 | { |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 661 | 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 665 | 26, 12, 14, 26, 31, 26, 14, 28, 26, 14 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 666 | }; |
| 667 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 668 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 669 | static const yytype_int8 yyr1[] = |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 670 | { |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 671 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 674 | }; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 675 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 676 | /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 677 | static const yytype_int8 yyr2[] = |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 678 | { |
| 679 | 0, 2, 0, 2, 2, 2, 2, 0, 2, 2, |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 680 | 2, 2, 2, 2, 2, 0, 0, 5, 0, 7, |
| 681 | 1, 1, 4, 4, 3, 4, 4, 5, 4, 3 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 682 | }; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 683 | |
| 684 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 685 | #define yyerrok (yyerrstatus = 0) |
| 686 | #define yyclearin (yychar = YYEMPTY) |
| 687 | #define YYEMPTY (-2) |
| 688 | #define YYEOF 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 689 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 690 | #define YYACCEPT goto yyacceptlab |
| 691 | #define YYABORT goto yyabortlab |
| 692 | #define YYERROR goto yyerrorlab |
| 693 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 694 | |
| 695 | #define YYRECOVERING() (!!yyerrstatus) |
| 696 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 697 | #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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 713 | |
| 714 | /* Error token number */ |
| 715 | #define YYTERROR 1 |
| 716 | #define YYERRCODE 256 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 717 | |
| 718 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 719 | |
| 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 728 | # define YYDPRINTF(Args) \ |
| 729 | do { \ |
| 730 | if (yydebug) \ |
| 731 | YYFPRINTF Args; \ |
| 732 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 733 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 734 | /* This macro is provided for backward compatibility. */ |
| 735 | #ifndef YY_LOCATION_PRINT |
| 736 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 737 | #endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 738 | |
| 739 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 740 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 741 | do { \ |
| 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 750 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 751 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 752 | /*-----------------------------------. |
| 753 | | Print this symbol's value on YYO. | |
| 754 | `-----------------------------------*/ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 755 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 756 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 757 | yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 758 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 759 | FILE *yyoutput = yyo; |
| 760 | YYUSE (yyoutput); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 761 | if (!yyvaluep) |
| 762 | return; |
| 763 | # ifdef YYPRINT |
| 764 | if (yytype < YYNTOKENS) |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 765 | YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 766 | # endif |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 767 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 768 | YYUSE (yytype); |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 769 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 770 | } |
| 771 | |
| 772 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 773 | /*---------------------------. |
| 774 | | Print this symbol on YYO. | |
| 775 | `---------------------------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 776 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 777 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 778 | yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 779 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 780 | YYFPRINTF (yyo, "%s %s (", |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 781 | yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 782 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 783 | yy_symbol_value_print (yyo, yytype, yyvaluep); |
| 784 | YYFPRINTF (yyo, ")"); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 785 | } |
| 786 | |
| 787 | /*------------------------------------------------------------------. |
| 788 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 789 | | TOP (included). | |
| 790 | `------------------------------------------------------------------*/ |
| 791 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 792 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 793 | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 794 | { |
| 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 804 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 805 | do { \ |
| 806 | if (yydebug) \ |
| 807 | yy_stack_print ((Bottom), (Top)); \ |
| 808 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 809 | |
| 810 | |
| 811 | /*------------------------------------------------. |
| 812 | | Report that the YYRULE is going to be reduced. | |
| 813 | `------------------------------------------------*/ |
| 814 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 815 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 816 | yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 817 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 818 | int yylno = yyrline[yyrule]; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 819 | int yynrhs = yyr2[yyrule]; |
| 820 | int yyi; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 821 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 822 | yyrule - 1, yylno); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 823 | /* The symbols being reduced. */ |
| 824 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 825 | { |
| 826 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 827 | yy_symbol_print (stderr, |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 828 | yystos[+yyssp[yyi + 1 - yynrhs]], |
| 829 | &yyvsp[(yyi + 1) - (yynrhs)] |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 830 | ); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 831 | YYFPRINTF (stderr, "\n"); |
| 832 | } |
| 833 | } |
| 834 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 835 | # define YY_REDUCE_PRINT(Rule) \ |
| 836 | do { \ |
| 837 | if (yydebug) \ |
| 838 | yy_reduce_print (yyssp, yyvsp, Rule); \ |
| 839 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 840 | |
| 841 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 842 | multiple parsers can coexist. */ |
| 843 | int 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 853 | #ifndef YYINITDEPTH |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 854 | # 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 868 | |
| 869 | #if YYERROR_VERBOSE |
| 870 | |
| 871 | # ifndef yystrlen |
| 872 | # if defined __GLIBC__ && defined _STRING_H |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 873 | # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 874 | # else |
| 875 | /* Return the length of YYSTR. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 876 | static YYPTRDIFF_T |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 877 | yystrlen (const char *yystr) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 878 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 879 | YYPTRDIFF_T yylen; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 880 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 893 | static char * |
| 894 | yystpcpy (char *yydest, const char *yysrc) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 895 | { |
| 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 915 | static YYPTRDIFF_T |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 916 | yytnamerr (char *yyres, const char *yystr) |
| 917 | { |
| 918 | if (*yystr == '"') |
| 919 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 920 | YYPTRDIFF_T yyn = 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 921 | char const *yyp = yystr; |
| 922 | |
| 923 | for (;;) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 924 | switch (*++yyp) |
| 925 | { |
| 926 | case '\'': |
| 927 | case ',': |
| 928 | goto do_not_strip_quotes; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 929 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 930 | case '\\': |
| 931 | if (*++yyp != '\\') |
| 932 | goto do_not_strip_quotes; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 933 | else |
| 934 | goto append; |
| 935 | |
| 936 | append: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 937 | default: |
| 938 | if (yyres) |
| 939 | yyres[yyn] = *yyp; |
| 940 | yyn++; |
| 941 | break; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 942 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 943 | case '"': |
| 944 | if (yyres) |
| 945 | yyres[yyn] = '\0'; |
| 946 | return yyn; |
| 947 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 948 | do_not_strip_quotes: ; |
| 949 | } |
| 950 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 951 | if (yyres) |
| 952 | return yystpcpy (yyres, yystr) - yyres; |
| 953 | else |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 954 | return yystrlen (yystr); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 955 | } |
| 956 | # endif |
| 957 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 958 | /* 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. */ |
| 966 | static int |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 967 | yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, |
| 968 | yy_state_t *yyssp, int yytoken) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 969 | { |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 970 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 971 | /* Internationalized format string. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 972 | const char *yyformat = YY_NULLPTR; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 973 | /* Arguments of yyformat: reported tokens (one for the "unexpected", |
| 974 | one per "expected"). */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 975 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 976 | /* Actual size of YYARG. */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 977 | int yycount = 0; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 978 | /* Cumulated lengths of YYARG. */ |
| 979 | YYPTRDIFF_T yysize = 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 980 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 981 | /* There are many possibilities here to consider: |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 982 | - 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1005 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1006 | int yyn = yypact[+*yyssp]; |
| 1007 | YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
| 1008 | yysize = yysize0; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1009 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1020 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1021 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1032 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1033 | YYPTRDIFF_T yysize1 |
| 1034 | = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
| 1035 | if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
| 1036 | yysize = yysize1; |
| 1037 | else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1038 | return 2; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1039 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1040 | } |
| 1041 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1042 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1043 | |
| 1044 | switch (yycount) |
| 1045 | { |
| 1046 | # define YYCASE_(N, S) \ |
| 1047 | case N: \ |
| 1048 | yyformat = S; \ |
| 1049 | break |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1050 | default: /* Avoid compiler warnings. */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1051 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1060 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1061 | /* 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1067 | return 2; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1068 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1069 | |
| 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1093 | ++yyp; |
| 1094 | ++yyformat; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1095 | } |
| 1096 | } |
| 1097 | return 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1098 | } |
| 1099 | #endif /* YYERROR_VERBOSE */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1100 | |
| 1101 | /*-----------------------------------------------. |
| 1102 | | Release the memory associated to this symbol. | |
| 1103 | `-----------------------------------------------*/ |
| 1104 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1105 | static void |
| 1106 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1107 | { |
| 1108 | YYUSE (yyvaluep); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1109 | if (!yymsg) |
| 1110 | yymsg = "Deleting"; |
| 1111 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1112 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1113 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 1114 | YYUSE (yytype); |
| 1115 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1116 | } |
| 1117 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1118 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1119 | |
| 1120 | |
| 1121 | /* The lookahead symbol. */ |
| 1122 | int yychar; |
| 1123 | |
| 1124 | /* The semantic value of the lookahead symbol. */ |
| 1125 | YYSTYPE yylval; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1126 | /* Number of syntax errors so far. */ |
| 1127 | int yynerrs; |
| 1128 | |
| 1129 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1130 | /*----------. |
| 1131 | | yyparse. | |
| 1132 | `----------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1133 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1134 | int |
| 1135 | yyparse (void) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1136 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1137 | yy_state_fast_t yystate; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1138 | /* Number of tokens to shift before error messages enabled. */ |
| 1139 | int yyerrstatus; |
| 1140 | |
| 1141 | /* The stacks and their tools: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1142 | 'yyss': related to states. |
| 1143 | 'yyvs': related to semantic values. |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1144 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1145 | Refer to the stacks through separate pointers, to allow yyoverflow |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1146 | to reallocate them elsewhere. */ |
| 1147 | |
| 1148 | /* The state stack. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1149 | yy_state_t yyssa[YYINITDEPTH]; |
| 1150 | yy_state_t *yyss; |
| 1151 | yy_state_t *yyssp; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1152 | |
| 1153 | /* The semantic value stack. */ |
| 1154 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 1155 | YYSTYPE *yyvs; |
| 1156 | YYSTYPE *yyvsp; |
| 1157 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1158 | YYPTRDIFF_T yystacksize; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1159 | |
| 1160 | int yyn; |
| 1161 | int yyresult; |
| 1162 | /* Lookahead token as an internal (translated) token number. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1163 | int yytoken = 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1164 | /* 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1172 | YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1173 | #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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1181 | yyssp = yyss = yyssa; |
| 1182 | yyvsp = yyvs = yyvsa; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1183 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1191 | goto yysetstate; |
| 1192 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1193 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1194 | /*------------------------------------------------------------. |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1195 | | yynewstate -- push a new state, which is found in yystate. | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1196 | `------------------------------------------------------------*/ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1197 | yynewstate: |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1198 | /* 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1202 | |
| 1203 | /*--------------------------------------------------------------------. |
| 1204 | | yysetstate -- set current state (the top of the stack) to yystate. | |
| 1205 | `--------------------------------------------------------------------*/ |
| 1206 | yysetstate: |
| 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1212 | |
| 1213 | if (yyss + yystacksize - 1 <= yyssp) |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1214 | #if !defined yyoverflow && !defined YYSTACK_RELOCATE |
| 1215 | goto yyexhaustedlab; |
| 1216 | #else |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1217 | { |
| 1218 | /* Get the current used size of the three stacks, in elements. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1219 | YYPTRDIFF_T yysize = yyssp - yyss + 1; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1220 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1221 | # if defined yyoverflow |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1222 | { |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1223 | /* 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1226 | yy_state_t *yyss1 = yyss; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1227 | YYSTYPE *yyvs1 = yyvs; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1228 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1229 | /* 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1234 | &yyss1, yysize * YYSIZEOF (*yyssp), |
| 1235 | &yyvs1, yysize * YYSIZEOF (*yyvsp), |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1236 | &yystacksize); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1237 | yyss = yyss1; |
| 1238 | yyvs = yyvs1; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1239 | } |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1240 | # else /* defined YYSTACK_RELOCATE */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1241 | /* Extend the stack our own way. */ |
| 1242 | if (YYMAXDEPTH <= yystacksize) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1243 | goto yyexhaustedlab; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1244 | yystacksize *= 2; |
| 1245 | if (YYMAXDEPTH < yystacksize) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1246 | yystacksize = YYMAXDEPTH; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1247 | |
| 1248 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1249 | yy_state_t *yyss1 = yyss; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1250 | union yyalloc *yyptr = |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1251 | YY_CAST (union yyalloc *, |
| 1252 | YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1253 | if (! yyptr) |
| 1254 | goto yyexhaustedlab; |
| 1255 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1256 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1257 | # undef YYSTACK_RELOCATE |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1258 | if (yyss1 != yyssa) |
| 1259 | YYSTACK_FREE (yyss1); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1260 | } |
| 1261 | # endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1262 | |
| 1263 | yyssp = yyss + yysize - 1; |
| 1264 | yyvsp = yyvs + yysize - 1; |
| 1265 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1266 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1270 | |
| 1271 | if (yyss + yystacksize - 1 <= yyssp) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1272 | YYABORT; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1273 | } |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1274 | #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1275 | |
| 1276 | if (yystate == YYFINAL) |
| 1277 | YYACCEPT; |
| 1278 | |
| 1279 | goto yybackup; |
| 1280 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1281 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1282 | /*-----------. |
| 1283 | | yybackup. | |
| 1284 | `-----------*/ |
| 1285 | yybackup: |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1286 | /* 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 Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1291 | if (yypact_value_is_default (yyn)) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1292 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1300 | yychar = yylex (); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1301 | } |
| 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 Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1322 | if (yytable_value_is_error (yyn)) |
| 1323 | goto yyerrlab; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1324 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1335 | yystate = yyn; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1336 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1337 | *++yyvsp = yylval; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1338 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1339 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1340 | /* Discard the shifted token. */ |
| 1341 | yychar = YYEMPTY; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1342 | goto yynewstate; |
| 1343 | |
| 1344 | |
| 1345 | /*-----------------------------------------------------------. |
| 1346 | | yydefault -- do the default action for the current state. | |
| 1347 | `-----------------------------------------------------------*/ |
| 1348 | yydefault: |
| 1349 | yyn = yydefact[yystate]; |
| 1350 | if (yyn == 0) |
| 1351 | goto yyerrlab; |
| 1352 | goto yyreduce; |
| 1353 | |
| 1354 | |
| 1355 | /*-----------------------------. |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1356 | | yyreduce -- do a reduction. | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1357 | `-----------------------------*/ |
| 1358 | yyreduce: |
| 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1363 | '$$ = $1'. |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1364 | |
| 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1376 | case 2: |
| 1377 | { cur_parent = root_parent; } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1378 | break; |
| 1379 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1380 | case 16: |
| 1381 | { |
Furquan Shaikh | c56ae2f | 2018-05-31 10:33:16 -0700 | [diff] [blame] | 1382 | (yyval.chip_instance) = new_chip_instance((yyvsp[0].string)); |
| 1383 | chip_enqueue_tail(cur_chip_instance); |
| 1384 | cur_chip_instance = (yyval.chip_instance); |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1385 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1386 | break; |
| 1387 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1388 | case 17: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1389 | { |
| 1390 | cur_chip_instance = chip_dequeue_tail(); |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1391 | } |
| 1392 | break; |
| 1393 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1394 | case 18: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1395 | { |
| 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 Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1398 | } |
Patrick Georgi | 68befd5 | 2010-05-05 12:05:25 +0000 | [diff] [blame] | 1399 | break; |
| 1400 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1401 | case 19: |
| 1402 | { |
| 1403 | cur_parent = (yyvsp[-2].dev)->parent; |
| 1404 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1405 | break; |
| 1406 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1407 | case 22: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1408 | { add_resource(cur_parent, (yyvsp[-3].number), strtol((yyvsp[-2].string), NULL, 0), strtol((yyvsp[0].string), NULL, 0)); } |
Sven Schnelle | 270a908 | 2011-03-01 19:58:15 +0000 | [diff] [blame] | 1409 | break; |
| 1410 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1411 | case 23: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1412 | { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1413 | break; |
| 1414 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1415 | case 24: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1416 | { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-1].string), NULL, 16), strtol((yyvsp[0].string), NULL, 16), 0); } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1417 | break; |
| 1418 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1419 | case 25: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1420 | { add_pci_subsystem_ids(cur_parent, strtol((yyvsp[-2].string), NULL, 16), strtol((yyvsp[-1].string), NULL, 16), 1); } |
Sven Schnelle | 270a908 | 2011-03-01 19:58:15 +0000 | [diff] [blame] | 1421 | break; |
| 1422 | |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1423 | case 26: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1424 | { add_ioapic_info(cur_parent, strtol((yyvsp[-2].string), NULL, 16), (yyvsp[-1].string), strtol((yyvsp[0].string), NULL, 16)); } |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1425 | break; |
| 1426 | |
| 1427 | case 27: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1428 | { add_slot_desc(cur_parent, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string)); } |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1429 | break; |
| 1430 | |
| 1431 | case 28: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1432 | { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); } |
| 1433 | break; |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1434 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1435 | case 29: |
| 1436 | { add_slot_desc(cur_parent, (yyvsp[-1].string), (yyvsp[0].string), NULL, NULL); } |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1437 | break; |
| 1438 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1439 | |
| 1440 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1441 | default: break; |
| 1442 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1443 | /* 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1454 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1462 | /* Now 'shift' the result of the reduction. Determine what state |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1463 | that goes to, based on the state we popped back to and the rule |
| 1464 | number reduced by. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1465 | { |
| 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1472 | |
| 1473 | goto yynewstate; |
| 1474 | |
| 1475 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1476 | /*--------------------------------------. |
| 1477 | | yyerrlab -- here on detecting error. | |
| 1478 | `--------------------------------------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1479 | yyerrlab: |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1480 | /* 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1484 | /* 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 Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1491 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
| 1492 | yyssp, yytoken) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1493 | { |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1494 | 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 Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1503 | yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1504 | 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1519 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1520 | # undef YYSYNTAX_ERROR |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1521 | #endif |
| 1522 | } |
| 1523 | |
| 1524 | |
| 1525 | |
| 1526 | if (yyerrstatus == 3) |
| 1527 | { |
| 1528 | /* If just tried and failed to reuse lookahead token after an |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1529 | error, discard it. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1530 | |
| 1531 | if (yychar <= YYEOF) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1532 | { |
| 1533 | /* Return failure if at end of input. */ |
| 1534 | if (yychar == YYEOF) |
| 1535 | YYABORT; |
| 1536 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1537 | else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1538 | { |
| 1539 | yydestruct ("Error: discarding", |
| 1540 | yytoken, &yylval); |
| 1541 | yychar = YYEMPTY; |
| 1542 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1543 | } |
| 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 | `---------------------------------------------------*/ |
| 1553 | yyerrorlab: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1554 | /* 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1558 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1559 | /* Do not reclaim the symbols of the rule whose action triggered |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1560 | 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 | `-------------------------------------------------------------*/ |
| 1571 | yyerrlab1: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1572 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1573 | |
| 1574 | for (;;) |
| 1575 | { |
| 1576 | yyn = yypact[yystate]; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1577 | if (!yypact_value_is_default (yyn)) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1578 | { |
| 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 Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1587 | |
| 1588 | /* Pop the current state because it cannot handle the error token. */ |
| 1589 | if (yyssp == yyss) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1590 | YYABORT; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1591 | |
| 1592 | |
| 1593 | yydestruct ("Error: popping", |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1594 | yystos[yystate], yyvsp); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1595 | YYPOPSTACK (1); |
| 1596 | yystate = *yyssp; |
| 1597 | YY_STACK_PRINT (yyss, yyssp); |
| 1598 | } |
| 1599 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1600 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1601 | *++yyvsp = yylval; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1602 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1603 | |
| 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 | `-------------------------------------*/ |
| 1615 | yyacceptlab: |
| 1616 | yyresult = 0; |
| 1617 | goto yyreturn; |
| 1618 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1619 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1620 | /*-----------------------------------. |
| 1621 | | yyabortlab -- YYABORT comes here. | |
| 1622 | `-----------------------------------*/ |
| 1623 | yyabortlab: |
| 1624 | yyresult = 1; |
| 1625 | goto yyreturn; |
| 1626 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1627 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1628 | #if !defined yyoverflow || YYERROR_VERBOSE |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1629 | /*-------------------------------------------------. |
| 1630 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 1631 | `-------------------------------------------------*/ |
| 1632 | yyexhaustedlab: |
| 1633 | yyerror (YY_("memory exhausted")); |
| 1634 | yyresult = 2; |
| 1635 | /* Fall through. */ |
| 1636 | #endif |
| 1637 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1638 | |
| 1639 | /*-----------------------------------------------------. |
| 1640 | | yyreturn -- parsing is finished, return the result. | |
| 1641 | `-----------------------------------------------------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1642 | yyreturn: |
| 1643 | if (yychar != YYEMPTY) |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1644 | { |
| 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1651 | /* Do not reclaim the symbols of the rule whose action triggered |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1652 | this YYABORT or YYACCEPT. */ |
| 1653 | YYPOPSTACK (yylen); |
| 1654 | YY_STACK_PRINT (yyss, yyssp); |
| 1655 | while (yyssp != yyss) |
| 1656 | { |
| 1657 | yydestruct ("Cleanup: popping", |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1658 | yystos[+*yyssp], yyvsp); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1659 | 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 Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1669 | return yyresult; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1670 | } |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1671 | |