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