Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1 | /* A Bison parser, made by GNU Bison 3.5.1. */ |
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. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 51 | #define YYBISON_VERSION "3.5.1" |
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; |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 80 | static struct fw_config_field *cur_field; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 81 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 82 | |
| 83 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 84 | # ifndef YY_CAST |
| 85 | # ifdef __cplusplus |
| 86 | # define YY_CAST(Type, Val) static_cast<Type> (Val) |
| 87 | # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 88 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 89 | # define YY_CAST(Type, Val) ((Type) (Val)) |
| 90 | # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) |
| 91 | # endif |
| 92 | # endif |
| 93 | # ifndef YY_NULLPTR |
| 94 | # if defined __cplusplus |
| 95 | # if 201103L <= __cplusplus |
| 96 | # define YY_NULLPTR nullptr |
| 97 | # else |
| 98 | # define YY_NULLPTR 0 |
| 99 | # endif |
| 100 | # else |
| 101 | # define YY_NULLPTR ((void*)0) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 102 | # endif |
| 103 | # endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 104 | |
| 105 | /* Enabling verbose error messages. */ |
| 106 | #ifdef YYERROR_VERBOSE |
| 107 | # undef YYERROR_VERBOSE |
| 108 | # define YYERROR_VERBOSE 1 |
| 109 | #else |
| 110 | # define YYERROR_VERBOSE 0 |
| 111 | #endif |
| 112 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 113 | /* Use api.header.include to #include this header |
| 114 | instead of duplicating it here. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 115 | #ifndef YY_YY_SRC_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED |
| 116 | # define YY_YY_SRC_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 117 | /* Debug traces. */ |
| 118 | #ifndef YYDEBUG |
| 119 | # define YYDEBUG 0 |
| 120 | #endif |
| 121 | #if YYDEBUG |
| 122 | extern int yydebug; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 123 | #endif |
| 124 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 125 | /* Token type. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 126 | #ifndef YYTOKENTYPE |
| 127 | # define YYTOKENTYPE |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 128 | enum yytokentype |
| 129 | { |
| 130 | CHIP = 258, |
| 131 | DEVICE = 259, |
| 132 | REGISTER = 260, |
| 133 | BOOL = 261, |
Ronald G. Minnich | 466ca2c | 2019-10-22 02:02:24 +0000 | [diff] [blame] | 134 | STATUS = 262, |
| 135 | MANDATORY = 263, |
| 136 | BUS = 264, |
| 137 | RESOURCE = 265, |
| 138 | END = 266, |
| 139 | EQUALS = 267, |
| 140 | HEX = 268, |
| 141 | STRING = 269, |
| 142 | PCI = 270, |
| 143 | PNP = 271, |
| 144 | I2C = 272, |
| 145 | APIC = 273, |
| 146 | CPU_CLUSTER = 274, |
| 147 | CPU = 275, |
| 148 | DOMAIN = 276, |
| 149 | IRQ = 277, |
| 150 | DRQ = 278, |
| 151 | SLOT_DESC = 279, |
| 152 | IO = 280, |
| 153 | NUMBER = 281, |
| 154 | SUBSYSTEMID = 282, |
| 155 | INHERIT = 283, |
| 156 | IOAPIC_IRQ = 284, |
| 157 | IOAPIC = 285, |
| 158 | PCIINT = 286, |
| 159 | GENERIC = 287, |
| 160 | SPI = 288, |
| 161 | USB = 289, |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 162 | MMIO = 290, |
| 163 | LPC = 291, |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 164 | ESPI = 292, |
| 165 | FW_CONFIG_TABLE = 293, |
| 166 | FW_CONFIG_FIELD = 294, |
| 167 | FW_CONFIG_OPTION = 295, |
| 168 | FW_CONFIG_PROBE = 296 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 169 | }; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 170 | #endif |
| 171 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 172 | /* Value type. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 173 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 174 | union YYSTYPE |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 175 | { |
| 176 | |
Furquan Shaikh | 9319826 | 2018-06-03 04:22:17 -0700 | [diff] [blame] | 177 | struct device *dev; |
Furquan Shaikh | c56ae2f | 2018-05-31 10:33:16 -0700 | [diff] [blame] | 178 | struct chip_instance *chip_instance; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 179 | char *string; |
| 180 | int number; |
| 181 | |
| 182 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 183 | }; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 184 | typedef union YYSTYPE YYSTYPE; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 185 | # define YYSTYPE_IS_TRIVIAL 1 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 186 | # define YYSTYPE_IS_DECLARED 1 |
| 187 | #endif |
| 188 | |
| 189 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 190 | extern YYSTYPE yylval; |
| 191 | |
| 192 | int yyparse (void); |
| 193 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 194 | #endif /* !YY_YY_SRC_COREBOOT_UTIL_SCONFIG_SCONFIG_TAB_H_SHIPPED_INCLUDED */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 195 | |
| 196 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 197 | |
| 198 | #ifdef short |
| 199 | # undef short |
| 200 | #endif |
| 201 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 202 | /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure |
| 203 | <limits.h> and (if available) <stdint.h> are included |
| 204 | so that the code can choose integer types of a good width. */ |
| 205 | |
| 206 | #ifndef __PTRDIFF_MAX__ |
| 207 | # include <limits.h> /* INFRINGES ON USER NAME SPACE */ |
| 208 | # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ |
| 209 | # include <stdint.h> /* INFRINGES ON USER NAME SPACE */ |
| 210 | # define YY_STDINT_H |
| 211 | # endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 212 | #endif |
| 213 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 214 | /* Narrow types that promote to a signed type and that can represent a |
| 215 | signed or unsigned integer of at least N bits. In tables they can |
| 216 | save space and decrease cache pressure. Promoting to a signed type |
| 217 | helps avoid bugs in integer arithmetic. */ |
| 218 | |
| 219 | #ifdef __INT_LEAST8_MAX__ |
| 220 | typedef __INT_LEAST8_TYPE__ yytype_int8; |
| 221 | #elif defined YY_STDINT_H |
| 222 | typedef int_least8_t yytype_int8; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 223 | #else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 224 | typedef signed char yytype_int8; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 225 | #endif |
| 226 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 227 | #ifdef __INT_LEAST16_MAX__ |
| 228 | typedef __INT_LEAST16_TYPE__ yytype_int16; |
| 229 | #elif defined YY_STDINT_H |
| 230 | typedef int_least16_t yytype_int16; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 231 | #else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 232 | typedef short yytype_int16; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 233 | #endif |
| 234 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 235 | #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ |
| 236 | typedef __UINT_LEAST8_TYPE__ yytype_uint8; |
| 237 | #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ |
| 238 | && UINT_LEAST8_MAX <= INT_MAX) |
| 239 | typedef uint_least8_t yytype_uint8; |
| 240 | #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX |
| 241 | typedef unsigned char yytype_uint8; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 242 | #else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 243 | typedef short yytype_uint8; |
| 244 | #endif |
| 245 | |
| 246 | #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ |
| 247 | typedef __UINT_LEAST16_TYPE__ yytype_uint16; |
| 248 | #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ |
| 249 | && UINT_LEAST16_MAX <= INT_MAX) |
| 250 | typedef uint_least16_t yytype_uint16; |
| 251 | #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX |
| 252 | typedef unsigned short yytype_uint16; |
| 253 | #else |
| 254 | typedef int yytype_uint16; |
| 255 | #endif |
| 256 | |
| 257 | #ifndef YYPTRDIFF_T |
| 258 | # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ |
| 259 | # define YYPTRDIFF_T __PTRDIFF_TYPE__ |
| 260 | # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ |
| 261 | # elif defined PTRDIFF_MAX |
| 262 | # ifndef ptrdiff_t |
| 263 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 264 | # endif |
| 265 | # define YYPTRDIFF_T ptrdiff_t |
| 266 | # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX |
| 267 | # else |
| 268 | # define YYPTRDIFF_T long |
| 269 | # define YYPTRDIFF_MAXIMUM LONG_MAX |
| 270 | # endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 271 | #endif |
| 272 | |
| 273 | #ifndef YYSIZE_T |
| 274 | # ifdef __SIZE_TYPE__ |
| 275 | # define YYSIZE_T __SIZE_TYPE__ |
| 276 | # elif defined size_t |
| 277 | # define YYSIZE_T size_t |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 278 | # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 279 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 280 | # define YYSIZE_T size_t |
| 281 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 282 | # define YYSIZE_T unsigned |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 283 | # endif |
| 284 | #endif |
| 285 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 286 | #define YYSIZE_MAXIMUM \ |
| 287 | YY_CAST (YYPTRDIFF_T, \ |
| 288 | (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ |
| 289 | ? YYPTRDIFF_MAXIMUM \ |
| 290 | : YY_CAST (YYSIZE_T, -1))) |
| 291 | |
| 292 | #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) |
| 293 | |
| 294 | /* Stored state numbers (used for stacks). */ |
| 295 | typedef yytype_int8 yy_state_t; |
| 296 | |
| 297 | /* State numbers in computations. */ |
| 298 | typedef int yy_state_fast_t; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 299 | |
| 300 | #ifndef YY_ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 301 | # if defined YYENABLE_NLS && YYENABLE_NLS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 302 | # if ENABLE_NLS |
| 303 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 304 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 305 | # endif |
| 306 | # endif |
| 307 | # ifndef YY_ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 308 | # define YY_(Msgid) Msgid |
| 309 | # endif |
| 310 | #endif |
| 311 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 312 | #ifndef YY_ATTRIBUTE_PURE |
| 313 | # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) |
| 314 | # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 315 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 316 | # define YY_ATTRIBUTE_PURE |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 317 | # endif |
| 318 | #endif |
| 319 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 320 | #ifndef YY_ATTRIBUTE_UNUSED |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 321 | # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) |
| 322 | # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 323 | # else |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 324 | # define YY_ATTRIBUTE_UNUSED |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 325 | # endif |
| 326 | #endif |
| 327 | |
| 328 | /* Suppress unused-variable warnings by "using" E. */ |
| 329 | #if ! defined lint || defined __GNUC__ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 330 | # define YYUSE(E) ((void) (E)) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 331 | #else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 332 | # define YYUSE(E) /* empty */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 333 | #endif |
| 334 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 335 | #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 336 | /* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 337 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
| 338 | _Pragma ("GCC diagnostic push") \ |
| 339 | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 340 | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 341 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 342 | _Pragma ("GCC diagnostic pop") |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 343 | #else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 344 | # define YY_INITIAL_VALUE(Value) Value |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 345 | #endif |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 346 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 347 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 348 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 349 | #endif |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 350 | #ifndef YY_INITIAL_VALUE |
| 351 | # define YY_INITIAL_VALUE(Value) /* Nothing. */ |
| 352 | #endif |
| 353 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 354 | #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ |
| 355 | # define YY_IGNORE_USELESS_CAST_BEGIN \ |
| 356 | _Pragma ("GCC diagnostic push") \ |
| 357 | _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") |
| 358 | # define YY_IGNORE_USELESS_CAST_END \ |
| 359 | _Pragma ("GCC diagnostic pop") |
| 360 | #endif |
| 361 | #ifndef YY_IGNORE_USELESS_CAST_BEGIN |
| 362 | # define YY_IGNORE_USELESS_CAST_BEGIN |
| 363 | # define YY_IGNORE_USELESS_CAST_END |
| 364 | #endif |
| 365 | |
| 366 | |
| 367 | #define YY_ASSERT(E) ((void) (0 && (E))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 368 | |
| 369 | #if ! defined yyoverflow || YYERROR_VERBOSE |
| 370 | |
| 371 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 372 | |
| 373 | # ifdef YYSTACK_USE_ALLOCA |
| 374 | # if YYSTACK_USE_ALLOCA |
| 375 | # ifdef __GNUC__ |
| 376 | # define YYSTACK_ALLOC __builtin_alloca |
| 377 | # elif defined __BUILTIN_VA_ARG_INCR |
| 378 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 379 | # elif defined _AIX |
| 380 | # define YYSTACK_ALLOC __alloca |
| 381 | # elif defined _MSC_VER |
| 382 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 383 | # define alloca _alloca |
| 384 | # else |
| 385 | # define YYSTACK_ALLOC alloca |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 386 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 387 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 388 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 389 | # ifndef EXIT_SUCCESS |
| 390 | # define EXIT_SUCCESS 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 391 | # endif |
| 392 | # endif |
| 393 | # endif |
| 394 | # endif |
| 395 | # endif |
| 396 | |
| 397 | # ifdef YYSTACK_ALLOC |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 398 | /* Pacify GCC's 'empty if-body' warning. */ |
| 399 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 400 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 401 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 402 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 403 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 404 | to allow for a few compiler-allocated temporary stack slots. */ |
| 405 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
| 406 | # endif |
| 407 | # else |
| 408 | # define YYSTACK_ALLOC YYMALLOC |
| 409 | # define YYSTACK_FREE YYFREE |
| 410 | # ifndef YYSTACK_ALLOC_MAXIMUM |
| 411 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 412 | # endif |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 413 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 414 | && ! ((defined YYMALLOC || defined malloc) \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 415 | && (defined YYFREE || defined free))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 416 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 417 | # ifndef EXIT_SUCCESS |
| 418 | # define EXIT_SUCCESS 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 419 | # endif |
| 420 | # endif |
| 421 | # ifndef YYMALLOC |
| 422 | # define YYMALLOC malloc |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 423 | # if ! defined malloc && ! defined EXIT_SUCCESS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 424 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 425 | # endif |
| 426 | # endif |
| 427 | # ifndef YYFREE |
| 428 | # define YYFREE free |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 429 | # if ! defined free && ! defined EXIT_SUCCESS |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 430 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 431 | # endif |
| 432 | # endif |
| 433 | # endif |
| 434 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 435 | |
| 436 | |
| 437 | #if (! defined yyoverflow \ |
| 438 | && (! defined __cplusplus \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 439 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 440 | |
| 441 | /* A type that is properly aligned for any stack member. */ |
| 442 | union yyalloc |
| 443 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 444 | yy_state_t yyss_alloc; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 445 | YYSTYPE yyvs_alloc; |
| 446 | }; |
| 447 | |
| 448 | /* 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] | 449 | # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 450 | |
| 451 | /* The size of an array large to enough to hold all stacks, each with |
| 452 | N elements. */ |
| 453 | # define YYSTACK_BYTES(N) \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 454 | ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 455 | + YYSTACK_GAP_MAXIMUM) |
| 456 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 457 | # define YYCOPY_NEEDED 1 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 458 | |
| 459 | /* Relocate STACK from its old location to the new one. The |
| 460 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 461 | elements in the stack, and YYPTR gives the new location of the |
| 462 | stack. Advance YYPTR to a properly aligned location for the next |
| 463 | stack. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 464 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 465 | do \ |
| 466 | { \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 467 | YYPTRDIFF_T yynewbytes; \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 468 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 469 | Stack = &yyptr->Stack_alloc; \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 470 | yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 471 | yyptr += yynewbytes / YYSIZEOF (*yyptr); \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 472 | } \ |
| 473 | while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 474 | |
| 475 | #endif |
| 476 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 477 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 478 | /* Copy COUNT objects from SRC to DST. The source and destination do |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 479 | not overlap. */ |
| 480 | # ifndef YYCOPY |
| 481 | # if defined __GNUC__ && 1 < __GNUC__ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 482 | # define YYCOPY(Dst, Src, Count) \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 483 | __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 484 | # else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 485 | # define YYCOPY(Dst, Src, Count) \ |
| 486 | do \ |
| 487 | { \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 488 | YYPTRDIFF_T yyi; \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 489 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 490 | (Dst)[yyi] = (Src)[yyi]; \ |
| 491 | } \ |
| 492 | while (0) |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 493 | # endif |
| 494 | # endif |
| 495 | #endif /* !YYCOPY_NEEDED */ |
| 496 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 497 | /* YYFINAL -- State number of the termination state. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 498 | #define YYFINAL 2 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 499 | /* YYLAST -- Last index in YYTABLE. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 500 | #define YYLAST 58 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 501 | |
| 502 | /* YYNTOKENS -- Number of terminals. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 503 | #define YYNTOKENS 42 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 504 | /* YYNNTS -- Number of nonterminals. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 505 | #define YYNNTS 23 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 506 | /* YYNRULES -- Number of rules. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 507 | #define YYNRULES 44 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 508 | /* YYNSTATES -- Number of states. */ |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 509 | #define YYNSTATES 75 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 510 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 511 | #define YYUNDEFTOK 2 |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 512 | #define YYMAXUTOK 296 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 513 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 514 | |
| 515 | /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM |
| 516 | as returned by yylex, with out-of-bounds checking. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 517 | #define YYTRANSLATE(YYX) \ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 518 | (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 519 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 520 | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 521 | as returned by yylex. */ |
| 522 | static const yytype_int8 yytranslate[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 523 | { |
| 524 | 0, 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, 2, 2, 2, 2, |
| 545 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 546 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 547 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 548 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 549 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 550 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 551 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
Ronald G. Minnich | 466ca2c | 2019-10-22 02:02:24 +0000 | [diff] [blame] | 552 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 553 | 35, 36, 37, 38, 39, 40, 41 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 554 | }; |
| 555 | |
| 556 | #if YYDEBUG |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 557 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 558 | static const yytype_int8 yyrline[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 559 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 560 | 0, 24, 24, 24, 24, 26, 26, 26, 26, 28, |
| 561 | 28, 28, 28, 28, 28, 28, 28, 28, 30, 30, |
| 562 | 39, 39, 47, 47, 49, 52, 55, 58, 61, 64, |
| 563 | 67, 70, 74, 77, 77, 80, 80, 83, 83, 89, |
| 564 | 89, 95, 95, 101, 105 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 565 | }; |
| 566 | #endif |
| 567 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 568 | #if YYDEBUG || YYERROR_VERBOSE || 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 569 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 570 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 571 | static const char *const yytname[] = |
| 572 | { |
| 573 | "$end", "error", "$undefined", "CHIP", "DEVICE", "REGISTER", "BOOL", |
Ronald G. Minnich | 466ca2c | 2019-10-22 02:02:24 +0000 | [diff] [blame] | 574 | "STATUS", "MANDATORY", "BUS", "RESOURCE", "END", "EQUALS", "HEX", |
| 575 | "STRING", "PCI", "PNP", "I2C", "APIC", "CPU_CLUSTER", "CPU", "DOMAIN", |
| 576 | "IRQ", "DRQ", "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", |
Raul E Rangel | 3f3f53c | 2020-05-06 11:47:04 -0600 | [diff] [blame] | 577 | "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "LPC", |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 578 | "ESPI", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION", |
| 579 | "FW_CONFIG_PROBE", "$accept", "devtree", "chipchildren", |
| 580 | "devicechildren", "chip", "@1", "device", "@2", "status", "resource", |
| 581 | "registers", "subsystemid", "ioapic_irq", "smbios_slot_desc", |
| 582 | "fw_config_table", "fw_config_table_children", |
| 583 | "fw_config_field_children", "fw_config_field", "$@3", "$@4", "$@5", |
| 584 | "fw_config_option", "fw_config_probe", YY_NULLPTR |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 585 | }; |
| 586 | #endif |
| 587 | |
| 588 | # ifdef YYPRINT |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 589 | /* YYTOKNUM[NUM] -- (External) token number corresponding to the |
| 590 | (internal) symbol number NUM (which must be that of a token). */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 591 | static const yytype_int16 yytoknum[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 592 | { |
| 593 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 594 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
Furquan Shaikh | e670029 | 2017-02-11 00:50:38 -0800 | [diff] [blame] | 595 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 596 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 597 | 295, 296 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 598 | }; |
| 599 | # endif |
| 600 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 601 | #define YYPACT_NINF (-12) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 602 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 603 | #define yypact_value_is_default(Yyn) \ |
| 604 | ((Yyn) == YYPACT_NINF) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 605 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 606 | #define YYTABLE_NINF (-1) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 607 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 608 | #define yytable_value_is_error(Yyn) \ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 609 | 0 |
| 610 | |
| 611 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 612 | STATE-NUM. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 613 | static const yytype_int8 yypact[] = |
| 614 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 615 | -12, 3, -12, 4, -12, -12, -12, -12, -2, -12, |
| 616 | -12, 8, -12, 9, 1, 14, 11, -12, -12, -12, |
| 617 | -12, 2, -12, 5, 17, -12, -12, -6, 10, 16, |
| 618 | -12, -1, -12, 18, -12, -12, -12, -12, -12, 0, |
| 619 | -12, 7, -12, -12, -12, -3, 19, -12, 21, 20, |
| 620 | 22, 28, -12, -12, -12, -12, -12, -12, -12, -12, |
| 621 | 31, 30, 23, 24, 33, 25, 36, 26, 27, -12, |
| 622 | -12, 38, -12, -12, -12 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 623 | }; |
| 624 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 625 | /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
| 626 | Performed when YYTABLE does not specify something else to do. Zero |
| 627 | means the default is an error. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 628 | static const yytype_int8 yydefact[] = |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 629 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 630 | 2, 0, 1, 0, 34, 3, 4, 18, 0, 8, |
| 631 | 32, 0, 33, 0, 41, 0, 0, 19, 6, 5, |
| 632 | 7, 39, 36, 0, 0, 37, 36, 0, 0, 0, |
| 633 | 36, 0, 42, 0, 35, 22, 23, 20, 25, 0, |
| 634 | 40, 0, 17, 38, 43, 0, 0, 21, 0, 0, |
| 635 | 0, 0, 10, 9, 11, 15, 12, 13, 14, 16, |
| 636 | 0, 0, 0, 0, 0, 0, 31, 26, 0, 44, |
| 637 | 24, 30, 27, 28, 29 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 638 | }; |
| 639 | |
| 640 | /* YYPGOTO[NTERM-NUM]. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 641 | static const yytype_int8 yypgoto[] = |
| 642 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 643 | -12, -12, -12, -12, -9, -12, 12, -12, -12, -12, |
| 644 | 13, -12, -12, -12, -12, -12, -11, -12, -12, -12, |
| 645 | -12, -12, -12 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 646 | }; |
| 647 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 648 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 649 | static const yytype_int8 yydefgoto[] = |
| 650 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 651 | -1, 1, 13, 45, 5, 9, 19, 42, 37, 54, |
| 652 | 20, 56, 57, 58, 6, 8, 27, 12, 30, 26, |
| 653 | 22, 34, 59 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 654 | }; |
| 655 | |
| 656 | /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
| 657 | positive, shift that token. If negative, reduce the rule whose |
| 658 | number is the opposite. If YYTABLE_NINF, syntax error. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 659 | static const yytype_int8 yytable[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 660 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 661 | 3, 15, 16, 2, 18, 32, 3, 46, 47, 10, |
| 662 | 40, 43, 3, 15, 16, 31, 35, 36, 7, 39, |
| 663 | 17, 48, 14, 23, 49, 24, 50, 21, 25, 29, |
| 664 | 38, 28, 41, 44, 33, 61, 52, 11, 51, 33, |
| 665 | 33, 4, 64, 65, 66, 60, 62, 69, 63, 67, |
| 666 | 71, 70, 74, 73, 72, 68, 0, 53, 55 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 667 | }; |
| 668 | |
Patrick Georgi | 8f625f6 | 2010-05-05 13:13:47 +0000 | [diff] [blame] | 669 | static const yytype_int8 yycheck[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 670 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 671 | 3, 4, 5, 0, 13, 11, 3, 10, 11, 11, |
| 672 | 11, 11, 3, 4, 5, 26, 6, 7, 14, 30, |
| 673 | 11, 24, 14, 9, 27, 14, 29, 26, 26, 12, |
| 674 | 14, 26, 14, 26, 40, 14, 45, 39, 41, 40, |
| 675 | 40, 38, 14, 12, 14, 26, 26, 14, 26, 26, |
| 676 | 14, 26, 14, 26, 28, 31, -1, 45, 45 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 677 | }; |
| 678 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 679 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 680 | symbol of state STATE-NUM. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 681 | static const yytype_int8 yystos[] = |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 682 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 683 | 0, 43, 0, 3, 38, 46, 56, 14, 57, 47, |
| 684 | 11, 39, 59, 44, 14, 4, 5, 11, 46, 48, |
| 685 | 52, 26, 62, 9, 14, 26, 61, 58, 26, 12, |
| 686 | 60, 58, 11, 40, 63, 6, 7, 50, 14, 58, |
| 687 | 11, 14, 49, 11, 26, 45, 10, 11, 24, 27, |
| 688 | 29, 41, 46, 48, 51, 52, 53, 54, 55, 64, |
| 689 | 26, 14, 26, 26, 14, 12, 14, 26, 31, 14, |
| 690 | 26, 14, 28, 26, 14 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 691 | }; |
| 692 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 693 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 694 | static const yytype_int8 yyr1[] = |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 695 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 696 | 0, 42, 43, 43, 43, 44, 44, 44, 44, 45, |
| 697 | 45, 45, 45, 45, 45, 45, 45, 45, 47, 46, |
| 698 | 49, 48, 50, 50, 51, 52, 53, 53, 54, 55, |
| 699 | 55, 55, 56, 57, 57, 58, 58, 60, 59, 61, |
| 700 | 59, 62, 59, 63, 64 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 701 | }; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 702 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 703 | /* 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] | 704 | static const yytype_int8 yyr2[] = |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 705 | { |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 706 | 0, 2, 0, 2, 2, 2, 2, 2, 0, 2, |
| 707 | 2, 2, 2, 2, 2, 2, 2, 0, 0, 5, |
| 708 | 0, 7, 1, 1, 4, 4, 3, 4, 4, 5, |
| 709 | 4, 3, 3, 2, 0, 2, 0, 0, 7, 0, |
| 710 | 6, 0, 5, 3, 3 |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 711 | }; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 712 | |
| 713 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 714 | #define yyerrok (yyerrstatus = 0) |
| 715 | #define yyclearin (yychar = YYEMPTY) |
| 716 | #define YYEMPTY (-2) |
| 717 | #define YYEOF 0 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 718 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 719 | #define YYACCEPT goto yyacceptlab |
| 720 | #define YYABORT goto yyabortlab |
| 721 | #define YYERROR goto yyerrorlab |
| 722 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 723 | |
| 724 | #define YYRECOVERING() (!!yyerrstatus) |
| 725 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 726 | #define YYBACKUP(Token, Value) \ |
| 727 | do \ |
| 728 | if (yychar == YYEMPTY) \ |
| 729 | { \ |
| 730 | yychar = (Token); \ |
| 731 | yylval = (Value); \ |
| 732 | YYPOPSTACK (yylen); \ |
| 733 | yystate = *yyssp; \ |
| 734 | goto yybackup; \ |
| 735 | } \ |
| 736 | else \ |
| 737 | { \ |
| 738 | yyerror (YY_("syntax error: cannot back up")); \ |
| 739 | YYERROR; \ |
| 740 | } \ |
| 741 | while (0) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 742 | |
| 743 | /* Error token number */ |
| 744 | #define YYTERROR 1 |
| 745 | #define YYERRCODE 256 |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 746 | |
| 747 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 748 | |
| 749 | /* Enable debugging if requested. */ |
| 750 | #if YYDEBUG |
| 751 | |
| 752 | # ifndef YYFPRINTF |
| 753 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 754 | # define YYFPRINTF fprintf |
| 755 | # endif |
| 756 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 757 | # define YYDPRINTF(Args) \ |
| 758 | do { \ |
| 759 | if (yydebug) \ |
| 760 | YYFPRINTF Args; \ |
| 761 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 762 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 763 | /* This macro is provided for backward compatibility. */ |
| 764 | #ifndef YY_LOCATION_PRINT |
| 765 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 766 | #endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 767 | |
| 768 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 769 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 770 | do { \ |
| 771 | if (yydebug) \ |
| 772 | { \ |
| 773 | YYFPRINTF (stderr, "%s ", Title); \ |
| 774 | yy_symbol_print (stderr, \ |
| 775 | Type, Value); \ |
| 776 | YYFPRINTF (stderr, "\n"); \ |
| 777 | } \ |
| 778 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 779 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 780 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 781 | /*-----------------------------------. |
| 782 | | Print this symbol's value on YYO. | |
| 783 | `-----------------------------------*/ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 784 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 785 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 786 | yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 787 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 788 | FILE *yyoutput = yyo; |
| 789 | YYUSE (yyoutput); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 790 | if (!yyvaluep) |
| 791 | return; |
| 792 | # ifdef YYPRINT |
| 793 | if (yytype < YYNTOKENS) |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 794 | YYPRINT (yyo, yytoknum[yytype], *yyvaluep); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 795 | # endif |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 796 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 797 | YYUSE (yytype); |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 798 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 799 | } |
| 800 | |
| 801 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 802 | /*---------------------------. |
| 803 | | Print this symbol on YYO. | |
| 804 | `---------------------------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 805 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 806 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 807 | yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 808 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 809 | YYFPRINTF (yyo, "%s %s (", |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 810 | yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 811 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 812 | yy_symbol_value_print (yyo, yytype, yyvaluep); |
| 813 | YYFPRINTF (yyo, ")"); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 814 | } |
| 815 | |
| 816 | /*------------------------------------------------------------------. |
| 817 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 818 | | TOP (included). | |
| 819 | `------------------------------------------------------------------*/ |
| 820 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 821 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 822 | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 823 | { |
| 824 | YYFPRINTF (stderr, "Stack now"); |
| 825 | for (; yybottom <= yytop; yybottom++) |
| 826 | { |
| 827 | int yybot = *yybottom; |
| 828 | YYFPRINTF (stderr, " %d", yybot); |
| 829 | } |
| 830 | YYFPRINTF (stderr, "\n"); |
| 831 | } |
| 832 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 833 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 834 | do { \ |
| 835 | if (yydebug) \ |
| 836 | yy_stack_print ((Bottom), (Top)); \ |
| 837 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 838 | |
| 839 | |
| 840 | /*------------------------------------------------. |
| 841 | | Report that the YYRULE is going to be reduced. | |
| 842 | `------------------------------------------------*/ |
| 843 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 844 | static void |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 845 | yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 846 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 847 | int yylno = yyrline[yyrule]; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 848 | int yynrhs = yyr2[yyrule]; |
| 849 | int yyi; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 850 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 851 | yyrule - 1, yylno); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 852 | /* The symbols being reduced. */ |
| 853 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 854 | { |
| 855 | YYFPRINTF (stderr, " $%d = ", yyi + 1); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 856 | yy_symbol_print (stderr, |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 857 | yystos[+yyssp[yyi + 1 - yynrhs]], |
| 858 | &yyvsp[(yyi + 1) - (yynrhs)] |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 859 | ); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 860 | YYFPRINTF (stderr, "\n"); |
| 861 | } |
| 862 | } |
| 863 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 864 | # define YY_REDUCE_PRINT(Rule) \ |
| 865 | do { \ |
| 866 | if (yydebug) \ |
| 867 | yy_reduce_print (yyssp, yyvsp, Rule); \ |
| 868 | } while (0) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 869 | |
| 870 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 871 | multiple parsers can coexist. */ |
| 872 | int yydebug; |
| 873 | #else /* !YYDEBUG */ |
| 874 | # define YYDPRINTF(Args) |
| 875 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 876 | # define YY_STACK_PRINT(Bottom, Top) |
| 877 | # define YY_REDUCE_PRINT(Rule) |
| 878 | #endif /* !YYDEBUG */ |
| 879 | |
| 880 | |
| 881 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 882 | #ifndef YYINITDEPTH |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 883 | # define YYINITDEPTH 200 |
| 884 | #endif |
| 885 | |
| 886 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 887 | if the built-in stack extension method is used). |
| 888 | |
| 889 | Do not make this value too large; the results are undefined if |
| 890 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 891 | evaluated with infinite-precision integer arithmetic. */ |
| 892 | |
| 893 | #ifndef YYMAXDEPTH |
| 894 | # define YYMAXDEPTH 10000 |
| 895 | #endif |
| 896 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 897 | |
| 898 | #if YYERROR_VERBOSE |
| 899 | |
| 900 | # ifndef yystrlen |
| 901 | # if defined __GLIBC__ && defined _STRING_H |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 902 | # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 903 | # else |
| 904 | /* Return the length of YYSTR. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 905 | static YYPTRDIFF_T |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 906 | yystrlen (const char *yystr) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 907 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 908 | YYPTRDIFF_T yylen; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 909 | for (yylen = 0; yystr[yylen]; yylen++) |
| 910 | continue; |
| 911 | return yylen; |
| 912 | } |
| 913 | # endif |
| 914 | # endif |
| 915 | |
| 916 | # ifndef yystpcpy |
| 917 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
| 918 | # define yystpcpy stpcpy |
| 919 | # else |
| 920 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 921 | YYDEST. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 922 | static char * |
| 923 | yystpcpy (char *yydest, const char *yysrc) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 924 | { |
| 925 | char *yyd = yydest; |
| 926 | const char *yys = yysrc; |
| 927 | |
| 928 | while ((*yyd++ = *yys++) != '\0') |
| 929 | continue; |
| 930 | |
| 931 | return yyd - 1; |
| 932 | } |
| 933 | # endif |
| 934 | # endif |
| 935 | |
| 936 | # ifndef yytnamerr |
| 937 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 938 | quotes and backslashes, so that it's suitable for yyerror. The |
| 939 | heuristic is that double-quoting is unnecessary unless the string |
| 940 | contains an apostrophe, a comma, or backslash (other than |
| 941 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 942 | null, do not copy; instead, return the length of what the result |
| 943 | would have been. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 944 | static YYPTRDIFF_T |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 945 | yytnamerr (char *yyres, const char *yystr) |
| 946 | { |
| 947 | if (*yystr == '"') |
| 948 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 949 | YYPTRDIFF_T yyn = 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 950 | char const *yyp = yystr; |
| 951 | |
| 952 | for (;;) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 953 | switch (*++yyp) |
| 954 | { |
| 955 | case '\'': |
| 956 | case ',': |
| 957 | goto do_not_strip_quotes; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 958 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 959 | case '\\': |
| 960 | if (*++yyp != '\\') |
| 961 | goto do_not_strip_quotes; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 962 | else |
| 963 | goto append; |
| 964 | |
| 965 | append: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 966 | default: |
| 967 | if (yyres) |
| 968 | yyres[yyn] = *yyp; |
| 969 | yyn++; |
| 970 | break; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 971 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 972 | case '"': |
| 973 | if (yyres) |
| 974 | yyres[yyn] = '\0'; |
| 975 | return yyn; |
| 976 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 977 | do_not_strip_quotes: ; |
| 978 | } |
| 979 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 980 | if (yyres) |
| 981 | return yystpcpy (yyres, yystr) - yyres; |
| 982 | else |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 983 | return yystrlen (yystr); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 984 | } |
| 985 | # endif |
| 986 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 987 | /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
| 988 | about the unexpected token YYTOKEN for the state stack whose top is |
| 989 | YYSSP. |
| 990 | |
| 991 | Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
| 992 | not large enough to hold the message. In that case, also set |
| 993 | *YYMSG_ALLOC to the required number of bytes. Return 2 if the |
| 994 | required number of bytes is too large to store. */ |
| 995 | static int |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 996 | yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, |
| 997 | yy_state_t *yyssp, int yytoken) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 998 | { |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 999 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1000 | /* Internationalized format string. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1001 | const char *yyformat = YY_NULLPTR; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1002 | /* Arguments of yyformat: reported tokens (one for the "unexpected", |
| 1003 | one per "expected"). */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1004 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1005 | /* Actual size of YYARG. */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1006 | int yycount = 0; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1007 | /* Cumulated lengths of YYARG. */ |
| 1008 | YYPTRDIFF_T yysize = 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1009 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1010 | /* There are many possibilities here to consider: |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1011 | - If this state is a consistent state with a default action, then |
| 1012 | the only way this function was invoked is if the default action |
| 1013 | is an error action. In that case, don't check for expected |
| 1014 | tokens because there are none. |
| 1015 | - The only way there can be no lookahead present (in yychar) is if |
| 1016 | this state is a consistent state with a default action. Thus, |
| 1017 | detecting the absence of a lookahead is sufficient to determine |
| 1018 | that there is no unexpected or expected token to report. In that |
| 1019 | case, just report a simple "syntax error". |
| 1020 | - Don't assume there isn't a lookahead just because this state is a |
| 1021 | consistent state with a default action. There might have been a |
| 1022 | previous inconsistent state, consistent state with a non-default |
| 1023 | action, or user semantic action that manipulated yychar. |
| 1024 | - Of course, the expected token list depends on states to have |
| 1025 | correct lookahead information, and it depends on the parser not |
| 1026 | to perform extra reductions after fetching a lookahead from the |
| 1027 | scanner and before detecting a syntax error. Thus, state merging |
| 1028 | (from LALR or IELR) and default reductions corrupt the expected |
| 1029 | token list. However, the list is correct for canonical LR with |
| 1030 | one exception: it will still contain any token that will not be |
| 1031 | accepted due to an error action in a later state. |
| 1032 | */ |
| 1033 | if (yytoken != YYEMPTY) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1034 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1035 | int yyn = yypact[+*yyssp]; |
| 1036 | YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
| 1037 | yysize = yysize0; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1038 | yyarg[yycount++] = yytname[yytoken]; |
| 1039 | if (!yypact_value_is_default (yyn)) |
| 1040 | { |
| 1041 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1042 | YYCHECK. In other words, skip the first -YYN actions for |
| 1043 | this state because they are default actions. */ |
| 1044 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1045 | /* Stay within bounds of both yycheck and yytname. */ |
| 1046 | int yychecklim = YYLAST - yyn + 1; |
| 1047 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1048 | int yyx; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1049 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1050 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1051 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
| 1052 | && !yytable_value_is_error (yytable[yyx + yyn])) |
| 1053 | { |
| 1054 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1055 | { |
| 1056 | yycount = 1; |
| 1057 | yysize = yysize0; |
| 1058 | break; |
| 1059 | } |
| 1060 | yyarg[yycount++] = yytname[yyx]; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1061 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1062 | YYPTRDIFF_T yysize1 |
| 1063 | = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
| 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 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1071 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1072 | |
| 1073 | switch (yycount) |
| 1074 | { |
| 1075 | # define YYCASE_(N, S) \ |
| 1076 | case N: \ |
| 1077 | yyformat = S; \ |
| 1078 | break |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1079 | default: /* Avoid compiler warnings. */ |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1080 | YYCASE_(0, YY_("syntax error")); |
| 1081 | YYCASE_(1, YY_("syntax error, unexpected %s")); |
| 1082 | YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
| 1083 | YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
| 1084 | YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
| 1085 | YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
| 1086 | # undef YYCASE_ |
| 1087 | } |
| 1088 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1089 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1090 | /* Don't count the "%s"s in the final size, but reserve room for |
| 1091 | the terminator. */ |
| 1092 | YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; |
| 1093 | if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) |
| 1094 | yysize = yysize1; |
| 1095 | else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1096 | return 2; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1097 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1098 | |
| 1099 | if (*yymsg_alloc < yysize) |
| 1100 | { |
| 1101 | *yymsg_alloc = 2 * yysize; |
| 1102 | if (! (yysize <= *yymsg_alloc |
| 1103 | && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 1104 | *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
| 1105 | return 1; |
| 1106 | } |
| 1107 | |
| 1108 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1109 | Don't have undefined behavior even if the translation |
| 1110 | produced a string with the wrong number of "%s"s. */ |
| 1111 | { |
| 1112 | char *yyp = *yymsg; |
| 1113 | int yyi = 0; |
| 1114 | while ((*yyp = *yyformat) != '\0') |
| 1115 | if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
| 1116 | { |
| 1117 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1118 | yyformat += 2; |
| 1119 | } |
| 1120 | else |
| 1121 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1122 | ++yyp; |
| 1123 | ++yyformat; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1124 | } |
| 1125 | } |
| 1126 | return 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1127 | } |
| 1128 | #endif /* YYERROR_VERBOSE */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1129 | |
| 1130 | /*-----------------------------------------------. |
| 1131 | | Release the memory associated to this symbol. | |
| 1132 | `-----------------------------------------------*/ |
| 1133 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1134 | static void |
| 1135 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1136 | { |
| 1137 | YYUSE (yyvaluep); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1138 | if (!yymsg) |
| 1139 | yymsg = "Deleting"; |
| 1140 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1141 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1142 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 1143 | YYUSE (yytype); |
| 1144 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1145 | } |
| 1146 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1147 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1148 | |
| 1149 | |
| 1150 | /* The lookahead symbol. */ |
| 1151 | int yychar; |
| 1152 | |
| 1153 | /* The semantic value of the lookahead symbol. */ |
| 1154 | YYSTYPE yylval; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1155 | /* Number of syntax errors so far. */ |
| 1156 | int yynerrs; |
| 1157 | |
| 1158 | |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1159 | /*----------. |
| 1160 | | yyparse. | |
| 1161 | `----------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1162 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1163 | int |
| 1164 | yyparse (void) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1165 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1166 | yy_state_fast_t yystate; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1167 | /* Number of tokens to shift before error messages enabled. */ |
| 1168 | int yyerrstatus; |
| 1169 | |
| 1170 | /* The stacks and their tools: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1171 | 'yyss': related to states. |
| 1172 | 'yyvs': related to semantic values. |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1173 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1174 | Refer to the stacks through separate pointers, to allow yyoverflow |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1175 | to reallocate them elsewhere. */ |
| 1176 | |
| 1177 | /* The state stack. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1178 | yy_state_t yyssa[YYINITDEPTH]; |
| 1179 | yy_state_t *yyss; |
| 1180 | yy_state_t *yyssp; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1181 | |
| 1182 | /* The semantic value stack. */ |
| 1183 | YYSTYPE yyvsa[YYINITDEPTH]; |
| 1184 | YYSTYPE *yyvs; |
| 1185 | YYSTYPE *yyvsp; |
| 1186 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1187 | YYPTRDIFF_T yystacksize; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1188 | |
| 1189 | int yyn; |
| 1190 | int yyresult; |
| 1191 | /* Lookahead token as an internal (translated) token number. */ |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1192 | int yytoken = 0; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1193 | /* The variables used to return semantic value and location from the |
| 1194 | action routines. */ |
| 1195 | YYSTYPE yyval; |
| 1196 | |
| 1197 | #if YYERROR_VERBOSE |
| 1198 | /* Buffer for error messages, and its allocated size. */ |
| 1199 | char yymsgbuf[128]; |
| 1200 | char *yymsg = yymsgbuf; |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1201 | YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1202 | #endif |
| 1203 | |
| 1204 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
| 1205 | |
| 1206 | /* The number of symbols on the RHS of the reduced rule. |
| 1207 | Keep to zero when no symbol should be popped. */ |
| 1208 | int yylen = 0; |
| 1209 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1210 | yyssp = yyss = yyssa; |
| 1211 | yyvsp = yyvs = yyvsa; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1212 | yystacksize = YYINITDEPTH; |
| 1213 | |
| 1214 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 1215 | |
| 1216 | yystate = 0; |
| 1217 | yyerrstatus = 0; |
| 1218 | yynerrs = 0; |
| 1219 | yychar = YYEMPTY; /* Cause a token to be read. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1220 | goto yysetstate; |
| 1221 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1222 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1223 | /*------------------------------------------------------------. |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1224 | | yynewstate -- push a new state, which is found in yystate. | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1225 | `------------------------------------------------------------*/ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1226 | yynewstate: |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1227 | /* In all cases, when you get here, the value and location stacks |
| 1228 | have just been pushed. So pushing a state here evens the stacks. */ |
| 1229 | yyssp++; |
| 1230 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1231 | |
| 1232 | /*--------------------------------------------------------------------. |
| 1233 | | yysetstate -- set current state (the top of the stack) to yystate. | |
| 1234 | `--------------------------------------------------------------------*/ |
| 1235 | yysetstate: |
| 1236 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 1237 | YY_ASSERT (0 <= yystate && yystate < YYNSTATES); |
| 1238 | YY_IGNORE_USELESS_CAST_BEGIN |
| 1239 | *yyssp = YY_CAST (yy_state_t, yystate); |
| 1240 | YY_IGNORE_USELESS_CAST_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1241 | |
| 1242 | if (yyss + yystacksize - 1 <= yyssp) |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1243 | #if !defined yyoverflow && !defined YYSTACK_RELOCATE |
| 1244 | goto yyexhaustedlab; |
| 1245 | #else |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1246 | { |
| 1247 | /* Get the current used size of the three stacks, in elements. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1248 | YYPTRDIFF_T yysize = yyssp - yyss + 1; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1249 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1250 | # if defined yyoverflow |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1251 | { |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1252 | /* Give user a chance to reallocate the stack. Use copies of |
| 1253 | these so that the &'s don't force the real ones into |
| 1254 | memory. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1255 | yy_state_t *yyss1 = yyss; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1256 | YYSTYPE *yyvs1 = yyvs; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1257 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1258 | /* Each stack pointer address is followed by the size of the |
| 1259 | data in use in that stack, in bytes. This used to be a |
| 1260 | conditional around just the two extra args, but that might |
| 1261 | be undefined if yyoverflow is a macro. */ |
| 1262 | yyoverflow (YY_("memory exhausted"), |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1263 | &yyss1, yysize * YYSIZEOF (*yyssp), |
| 1264 | &yyvs1, yysize * YYSIZEOF (*yyvsp), |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1265 | &yystacksize); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1266 | yyss = yyss1; |
| 1267 | yyvs = yyvs1; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1268 | } |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1269 | # else /* defined YYSTACK_RELOCATE */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1270 | /* Extend the stack our own way. */ |
| 1271 | if (YYMAXDEPTH <= yystacksize) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1272 | goto yyexhaustedlab; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1273 | yystacksize *= 2; |
| 1274 | if (YYMAXDEPTH < yystacksize) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1275 | yystacksize = YYMAXDEPTH; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1276 | |
| 1277 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1278 | yy_state_t *yyss1 = yyss; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1279 | union yyalloc *yyptr = |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1280 | YY_CAST (union yyalloc *, |
| 1281 | YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1282 | if (! yyptr) |
| 1283 | goto yyexhaustedlab; |
| 1284 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1285 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1286 | # undef YYSTACK_RELOCATE |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1287 | if (yyss1 != yyssa) |
| 1288 | YYSTACK_FREE (yyss1); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1289 | } |
| 1290 | # endif |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1291 | |
| 1292 | yyssp = yyss + yysize - 1; |
| 1293 | yyvsp = yyvs + yysize - 1; |
| 1294 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1295 | YY_IGNORE_USELESS_CAST_BEGIN |
| 1296 | YYDPRINTF ((stderr, "Stack size increased to %ld\n", |
| 1297 | YY_CAST (long, yystacksize))); |
| 1298 | YY_IGNORE_USELESS_CAST_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1299 | |
| 1300 | if (yyss + yystacksize - 1 <= yyssp) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1301 | YYABORT; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1302 | } |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1303 | #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1304 | |
| 1305 | if (yystate == YYFINAL) |
| 1306 | YYACCEPT; |
| 1307 | |
| 1308 | goto yybackup; |
| 1309 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1310 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1311 | /*-----------. |
| 1312 | | yybackup. | |
| 1313 | `-----------*/ |
| 1314 | yybackup: |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1315 | /* Do appropriate processing given the current state. Read a |
| 1316 | lookahead token if we need one and don't already have one. */ |
| 1317 | |
| 1318 | /* First try to decide what to do without reference to lookahead token. */ |
| 1319 | yyn = yypact[yystate]; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1320 | if (yypact_value_is_default (yyn)) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1321 | goto yydefault; |
| 1322 | |
| 1323 | /* Not known => get a lookahead token if don't already have one. */ |
| 1324 | |
| 1325 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 1326 | if (yychar == YYEMPTY) |
| 1327 | { |
| 1328 | YYDPRINTF ((stderr, "Reading a token: ")); |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1329 | yychar = yylex (); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1330 | } |
| 1331 | |
| 1332 | if (yychar <= YYEOF) |
| 1333 | { |
| 1334 | yychar = yytoken = YYEOF; |
| 1335 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 1336 | } |
| 1337 | else |
| 1338 | { |
| 1339 | yytoken = YYTRANSLATE (yychar); |
| 1340 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 1341 | } |
| 1342 | |
| 1343 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 1344 | detect an error, take that action. */ |
| 1345 | yyn += yytoken; |
| 1346 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
| 1347 | goto yydefault; |
| 1348 | yyn = yytable[yyn]; |
| 1349 | if (yyn <= 0) |
| 1350 | { |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1351 | if (yytable_value_is_error (yyn)) |
| 1352 | goto yyerrlab; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1353 | yyn = -yyn; |
| 1354 | goto yyreduce; |
| 1355 | } |
| 1356 | |
| 1357 | /* Count tokens shifted since error; after three, turn off error |
| 1358 | status. */ |
| 1359 | if (yyerrstatus) |
| 1360 | yyerrstatus--; |
| 1361 | |
| 1362 | /* Shift the lookahead token. */ |
| 1363 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1364 | yystate = yyn; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1365 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1366 | *++yyvsp = yylval; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1367 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1368 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1369 | /* Discard the shifted token. */ |
| 1370 | yychar = YYEMPTY; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1371 | goto yynewstate; |
| 1372 | |
| 1373 | |
| 1374 | /*-----------------------------------------------------------. |
| 1375 | | yydefault -- do the default action for the current state. | |
| 1376 | `-----------------------------------------------------------*/ |
| 1377 | yydefault: |
| 1378 | yyn = yydefact[yystate]; |
| 1379 | if (yyn == 0) |
| 1380 | goto yyerrlab; |
| 1381 | goto yyreduce; |
| 1382 | |
| 1383 | |
| 1384 | /*-----------------------------. |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1385 | | yyreduce -- do a reduction. | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1386 | `-----------------------------*/ |
| 1387 | yyreduce: |
| 1388 | /* yyn is the number of a rule to reduce with. */ |
| 1389 | yylen = yyr2[yyn]; |
| 1390 | |
| 1391 | /* If YYLEN is nonzero, implement the default value of the action: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1392 | '$$ = $1'. |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1393 | |
| 1394 | Otherwise, the following line sets YYVAL to garbage. |
| 1395 | This behavior is undocumented and Bison |
| 1396 | users should not rely upon it. Assigning to YYVAL |
| 1397 | unconditionally makes the parser a bit smaller, and it avoids a |
| 1398 | GCC warning that YYVAL may be used uninitialized. */ |
| 1399 | yyval = yyvsp[1-yylen]; |
| 1400 | |
| 1401 | |
| 1402 | YY_REDUCE_PRINT (yyn); |
| 1403 | switch (yyn) |
| 1404 | { |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1405 | case 2: |
| 1406 | { cur_parent = root_parent; } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1407 | break; |
| 1408 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1409 | case 18: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1410 | { |
Furquan Shaikh | c56ae2f | 2018-05-31 10:33:16 -0700 | [diff] [blame] | 1411 | (yyval.chip_instance) = new_chip_instance((yyvsp[0].string)); |
| 1412 | chip_enqueue_tail(cur_chip_instance); |
| 1413 | cur_chip_instance = (yyval.chip_instance); |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1414 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1415 | break; |
| 1416 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1417 | case 19: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1418 | { |
| 1419 | cur_chip_instance = chip_dequeue_tail(); |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1420 | } |
| 1421 | break; |
| 1422 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1423 | case 20: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1424 | { |
| 1425 | (yyval.dev) = new_device(cur_parent, cur_chip_instance, (yyvsp[-2].number), (yyvsp[-1].string), (yyvsp[0].number)); |
| 1426 | cur_parent = (yyval.dev)->last_bus; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1427 | } |
Patrick Georgi | 68befd5 | 2010-05-05 12:05:25 +0000 | [diff] [blame] | 1428 | break; |
| 1429 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1430 | case 21: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1431 | { |
| 1432 | cur_parent = (yyvsp[-2].dev)->parent; |
| 1433 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1434 | break; |
| 1435 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1436 | case 24: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1437 | { 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] | 1438 | break; |
| 1439 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1440 | case 25: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1441 | { add_register(cur_chip_instance, (yyvsp[-2].string), (yyvsp[0].string)); } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1442 | break; |
| 1443 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1444 | case 26: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1445 | { 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] | 1446 | break; |
| 1447 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1448 | case 27: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1449 | { 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] | 1450 | break; |
| 1451 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1452 | case 28: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1453 | { 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] | 1454 | break; |
| 1455 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1456 | case 29: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1457 | { 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] | 1458 | break; |
| 1459 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1460 | case 30: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1461 | { add_slot_desc(cur_parent, (yyvsp[-2].string), (yyvsp[-1].string), (yyvsp[0].string), NULL); } |
| 1462 | break; |
Patrick Rudolph | ac24d3c | 2019-04-12 14:42:17 +0200 | [diff] [blame] | 1463 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1464 | case 31: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1465 | { 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] | 1466 | break; |
| 1467 | |
Duncan Laurie | 47b7b34 | 2020-05-15 15:39:08 -0700 | [diff] [blame] | 1468 | case 32: |
| 1469 | { } |
| 1470 | break; |
| 1471 | |
| 1472 | case 37: |
| 1473 | { |
| 1474 | cur_field = new_fw_config_field((yyvsp[-2].string), strtoul((yyvsp[-1].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0)); |
| 1475 | } |
| 1476 | break; |
| 1477 | |
| 1478 | case 38: |
| 1479 | { } |
| 1480 | break; |
| 1481 | |
| 1482 | case 39: |
| 1483 | { |
| 1484 | cur_field = new_fw_config_field((yyvsp[-1].string), strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0)); |
| 1485 | } |
| 1486 | break; |
| 1487 | |
| 1488 | case 40: |
| 1489 | { } |
| 1490 | break; |
| 1491 | |
| 1492 | case 41: |
| 1493 | { |
| 1494 | cur_field = get_fw_config_field((yyvsp[0].string)); |
| 1495 | } |
| 1496 | break; |
| 1497 | |
| 1498 | case 42: |
| 1499 | { } |
| 1500 | break; |
| 1501 | |
| 1502 | case 43: |
| 1503 | { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoul((yyvsp[0].string), NULL, 0)); } |
| 1504 | break; |
| 1505 | |
| 1506 | case 44: |
| 1507 | { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); } |
| 1508 | break; |
| 1509 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1510 | |
| 1511 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1512 | default: break; |
| 1513 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1514 | /* User semantic actions sometimes alter yychar, and that requires |
| 1515 | that yytoken be updated with the new translation. We take the |
| 1516 | approach of translating immediately before every use of yytoken. |
| 1517 | One alternative is translating here after every semantic action, |
| 1518 | but that translation would be missed if the semantic action invokes |
| 1519 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
| 1520 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
| 1521 | incorrect destructor might then be invoked immediately. In the |
| 1522 | case of YYERROR or YYBACKUP, subsequent parser actions might lead |
| 1523 | to an incorrect destructor call or verbose syntax error message |
| 1524 | before the lookahead is translated. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1525 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 1526 | |
| 1527 | YYPOPSTACK (yylen); |
| 1528 | yylen = 0; |
| 1529 | YY_STACK_PRINT (yyss, yyssp); |
| 1530 | |
| 1531 | *++yyvsp = yyval; |
| 1532 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1533 | /* Now 'shift' the result of the reduction. Determine what state |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1534 | that goes to, based on the state we popped back to and the rule |
| 1535 | number reduced by. */ |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1536 | { |
| 1537 | const int yylhs = yyr1[yyn] - YYNTOKENS; |
| 1538 | const int yyi = yypgoto[yylhs] + *yyssp; |
| 1539 | yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp |
| 1540 | ? yytable[yyi] |
| 1541 | : yydefgoto[yylhs]); |
| 1542 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1543 | |
| 1544 | goto yynewstate; |
| 1545 | |
| 1546 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1547 | /*--------------------------------------. |
| 1548 | | yyerrlab -- here on detecting error. | |
| 1549 | `--------------------------------------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1550 | yyerrlab: |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1551 | /* Make sure we have latest lookahead translation. See comments at |
| 1552 | user semantic actions for why this is necessary. */ |
| 1553 | yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
| 1554 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1555 | /* If not already recovering from an error, report this error. */ |
| 1556 | if (!yyerrstatus) |
| 1557 | { |
| 1558 | ++yynerrs; |
| 1559 | #if ! YYERROR_VERBOSE |
| 1560 | yyerror (YY_("syntax error")); |
| 1561 | #else |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1562 | # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
| 1563 | yyssp, yytoken) |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1564 | { |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1565 | char const *yymsgp = YY_("syntax error"); |
| 1566 | int yysyntax_error_status; |
| 1567 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 1568 | if (yysyntax_error_status == 0) |
| 1569 | yymsgp = yymsg; |
| 1570 | else if (yysyntax_error_status == 1) |
| 1571 | { |
| 1572 | if (yymsg != yymsgbuf) |
| 1573 | YYSTACK_FREE (yymsg); |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1574 | yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1575 | if (!yymsg) |
| 1576 | { |
| 1577 | yymsg = yymsgbuf; |
| 1578 | yymsg_alloc = sizeof yymsgbuf; |
| 1579 | yysyntax_error_status = 2; |
| 1580 | } |
| 1581 | else |
| 1582 | { |
| 1583 | yysyntax_error_status = YYSYNTAX_ERROR; |
| 1584 | yymsgp = yymsg; |
| 1585 | } |
| 1586 | } |
| 1587 | yyerror (yymsgp); |
| 1588 | if (yysyntax_error_status == 2) |
| 1589 | goto yyexhaustedlab; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1590 | } |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1591 | # undef YYSYNTAX_ERROR |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1592 | #endif |
| 1593 | } |
| 1594 | |
| 1595 | |
| 1596 | |
| 1597 | if (yyerrstatus == 3) |
| 1598 | { |
| 1599 | /* If just tried and failed to reuse lookahead token after an |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1600 | error, discard it. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1601 | |
| 1602 | if (yychar <= YYEOF) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1603 | { |
| 1604 | /* Return failure if at end of input. */ |
| 1605 | if (yychar == YYEOF) |
| 1606 | YYABORT; |
| 1607 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1608 | else |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1609 | { |
| 1610 | yydestruct ("Error: discarding", |
| 1611 | yytoken, &yylval); |
| 1612 | yychar = YYEMPTY; |
| 1613 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1614 | } |
| 1615 | |
| 1616 | /* Else will try to reuse lookahead token after shifting the error |
| 1617 | token. */ |
| 1618 | goto yyerrlab1; |
| 1619 | |
| 1620 | |
| 1621 | /*---------------------------------------------------. |
| 1622 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 1623 | `---------------------------------------------------*/ |
| 1624 | yyerrorlab: |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1625 | /* Pacify compilers when the user code never invokes YYERROR and the |
| 1626 | label yyerrorlab therefore never appears in user code. */ |
| 1627 | if (0) |
| 1628 | YYERROR; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1629 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1630 | /* Do not reclaim the symbols of the rule whose action triggered |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1631 | this YYERROR. */ |
| 1632 | YYPOPSTACK (yylen); |
| 1633 | yylen = 0; |
| 1634 | YY_STACK_PRINT (yyss, yyssp); |
| 1635 | yystate = *yyssp; |
| 1636 | goto yyerrlab1; |
| 1637 | |
| 1638 | |
| 1639 | /*-------------------------------------------------------------. |
| 1640 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 1641 | `-------------------------------------------------------------*/ |
| 1642 | yyerrlab1: |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1643 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1644 | |
| 1645 | for (;;) |
| 1646 | { |
| 1647 | yyn = yypact[yystate]; |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1648 | if (!yypact_value_is_default (yyn)) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1649 | { |
| 1650 | yyn += YYTERROR; |
| 1651 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 1652 | { |
| 1653 | yyn = yytable[yyn]; |
| 1654 | if (0 < yyn) |
| 1655 | break; |
| 1656 | } |
| 1657 | } |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1658 | |
| 1659 | /* Pop the current state because it cannot handle the error token. */ |
| 1660 | if (yyssp == yyss) |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1661 | YYABORT; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1662 | |
| 1663 | |
| 1664 | yydestruct ("Error: popping", |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1665 | yystos[yystate], yyvsp); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1666 | YYPOPSTACK (1); |
| 1667 | yystate = *yyssp; |
| 1668 | YY_STACK_PRINT (yyss, yyssp); |
| 1669 | } |
| 1670 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1671 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1672 | *++yyvsp = yylval; |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1673 | YY_IGNORE_MAYBE_UNINITIALIZED_END |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1674 | |
| 1675 | |
| 1676 | /* Shift the error token. */ |
| 1677 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 1678 | |
| 1679 | yystate = yyn; |
| 1680 | goto yynewstate; |
| 1681 | |
| 1682 | |
| 1683 | /*-------------------------------------. |
| 1684 | | yyacceptlab -- YYACCEPT comes here. | |
| 1685 | `-------------------------------------*/ |
| 1686 | yyacceptlab: |
| 1687 | yyresult = 0; |
| 1688 | goto yyreturn; |
| 1689 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1690 | |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1691 | /*-----------------------------------. |
| 1692 | | yyabortlab -- YYABORT comes here. | |
| 1693 | `-----------------------------------*/ |
| 1694 | yyabortlab: |
| 1695 | yyresult = 1; |
| 1696 | goto yyreturn; |
| 1697 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1698 | |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1699 | #if !defined yyoverflow || YYERROR_VERBOSE |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1700 | /*-------------------------------------------------. |
| 1701 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 1702 | `-------------------------------------------------*/ |
| 1703 | yyexhaustedlab: |
| 1704 | yyerror (YY_("memory exhausted")); |
| 1705 | yyresult = 2; |
| 1706 | /* Fall through. */ |
| 1707 | #endif |
| 1708 | |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1709 | |
| 1710 | /*-----------------------------------------------------. |
| 1711 | | yyreturn -- parsing is finished, return the result. | |
| 1712 | `-----------------------------------------------------*/ |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1713 | yyreturn: |
| 1714 | if (yychar != YYEMPTY) |
Sven Schnelle | 0fa50a1 | 2012-06-21 22:19:48 +0200 | [diff] [blame] | 1715 | { |
| 1716 | /* Make sure we have latest lookahead translation. See comments at |
| 1717 | user semantic actions for why this is necessary. */ |
| 1718 | yytoken = YYTRANSLATE (yychar); |
| 1719 | yydestruct ("Cleanup: discarding lookahead", |
| 1720 | yytoken, &yylval); |
| 1721 | } |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1722 | /* Do not reclaim the symbols of the rule whose action triggered |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1723 | this YYABORT or YYACCEPT. */ |
| 1724 | YYPOPSTACK (yylen); |
| 1725 | YY_STACK_PRINT (yyss, yyssp); |
| 1726 | while (yyssp != yyss) |
| 1727 | { |
| 1728 | yydestruct ("Cleanup: popping", |
Nico Huber | d9b2f79 | 2020-04-28 16:28:03 +0200 | [diff] [blame] | 1729 | yystos[+*yyssp], yyvsp); |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1730 | YYPOPSTACK (1); |
| 1731 | } |
| 1732 | #ifndef yyoverflow |
| 1733 | if (yyss != yyssa) |
| 1734 | YYSTACK_FREE (yyss); |
| 1735 | #endif |
| 1736 | #if YYERROR_VERBOSE |
| 1737 | if (yymsg != yymsgbuf) |
| 1738 | YYSTACK_FREE (yymsg); |
| 1739 | #endif |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1740 | return yyresult; |
Patrick Georgi | 7e8c9aa | 2010-04-08 11:37:43 +0000 | [diff] [blame] | 1741 | } |
Stefan Reinauer | 2e78aa5 | 2016-05-07 01:11:14 -0700 | [diff] [blame] | 1742 | |