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