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