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