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