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