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