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