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