From 13e240c60287e46feca94800d2f3302600ad0639 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Wed, 28 Apr 2021 14:03:07 -0600 Subject: util/sconfig: Add support for discontiguous FW_CONFIG fields Sooner or later, some board was going to need extra FW_CONFIG bits for a field that was already in production, so this patch adds support for adding extra (unused) bits to a field. The extra are appended via a syntax like: `field FIELD_NAME START0 END0 | START1 END1 | START2 END2 ...` and the suffixed bits are all treated as if they are contiguous when defining option values. BUG=b:185190978 TEST=Modified volteer fw_config to the following: field AUDIO 8 10 | 29 29 | 31 31 option NONE 0 option MAX98357_ALC5682I_I2S 1 option MAX98373_ALC5682I_I2S 2 option MAX98373_ALC5682_SNDW 3 option MAX98373_ALC5682I_I2S_UP4 4 option MAX98360_ALC5682I_I2S 5 option RT1011_ALC5682I_I2S 6 option AUDIO_FOO 7 option AUDIO_BAR 8 option AUDIO_QUUX 9 option AUDIO_BLAH1 10 option AUDIO_BLAH2 15 option AUDIO_BLAH3 16 option AUDIO_BLAH4 31 end which yielded (in static_fw_config.h): FW_CONFIG_FIELD_AUDIO_MASK 0xa0000700 FW_CONFIG_FIELD_AUDIO_OPTION_NONE_VALUE 0x0 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98357_ALC5682I_I2S_VALUE 0x100 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98373_ALC5682I_I2S_VALUE 0x200 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98373_ALC5682_SNDW_VALUE 0x300 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98373_ALC5682I_I2S_UP4_VALUE 0x400 FW_CONFIG_FIELD_AUDIO_OPTION_MAX98360_ALC5682I_I2S_VALUE 0x500 FW_CONFIG_FIELD_AUDIO_OPTION_RT1011_ALC5682I_I2S_VALUE 0x600 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_FOO_VALUE 0x700 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BAR_VALUE 0x20000000 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_QUUX_VALUE 0x20000100 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH1_VALUE 0x20000200 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH2_VALUE 0x20000700 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH3_VALUE 0x80000000 FW_CONFIG_FIELD_AUDIO_OPTION_AUDIO_BLAH4_VALUE 0xa0000700 Change-Id: I5ed76706347ee9642198efc77139abdc3af1b8a6 Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/52747 Reviewed-by: Duncan Laurie Tested-by: build bot (Jenkins) --- util/sconfig/sconfig.tab.c_shipped | 278 ++++++++++++++++++++----------------- 1 file changed, 153 insertions(+), 125 deletions(-) (limited to 'util/sconfig/sconfig.tab.c_shipped') diff --git a/util/sconfig/sconfig.tab.c_shipped b/util/sconfig/sconfig.tab.c_shipped index a8d1e1db1f..68421a15d9 100644 --- a/util/sconfig/sconfig.tab.c_shipped +++ b/util/sconfig/sconfig.tab.c_shipped @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.2. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -45,11 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.7.2" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -80,6 +80,7 @@ void yyerror(const char *s); static struct bus *cur_parent; static struct chip_instance *cur_chip_instance; static struct fw_config_field *cur_field; +static struct fw_config_field_bits *cur_bits; @@ -155,32 +156,35 @@ enum yysymbol_kind_t YYSYMBOL_FW_CONFIG_FIELD = 43, /* FW_CONFIG_FIELD */ YYSYMBOL_FW_CONFIG_OPTION = 44, /* FW_CONFIG_OPTION */ YYSYMBOL_FW_CONFIG_PROBE = 45, /* FW_CONFIG_PROBE */ - YYSYMBOL_YYACCEPT = 46, /* $accept */ - YYSYMBOL_devtree = 47, /* devtree */ - YYSYMBOL_chipchildren = 48, /* chipchildren */ - YYSYMBOL_devicechildren = 49, /* devicechildren */ - YYSYMBOL_chip = 50, /* chip */ - YYSYMBOL_51_1 = 51, /* @1 */ - YYSYMBOL_device = 52, /* device */ - YYSYMBOL_53_2 = 53, /* @2 */ - YYSYMBOL_54_3 = 54, /* @3 */ - YYSYMBOL_alias = 55, /* alias */ - YYSYMBOL_status = 56, /* status */ - YYSYMBOL_resource = 57, /* resource */ - YYSYMBOL_reference = 58, /* reference */ - YYSYMBOL_registers = 59, /* registers */ - YYSYMBOL_subsystemid = 60, /* subsystemid */ - YYSYMBOL_ioapic_irq = 61, /* ioapic_irq */ - YYSYMBOL_smbios_slot_desc = 62, /* smbios_slot_desc */ - YYSYMBOL_fw_config_table = 63, /* fw_config_table */ - YYSYMBOL_fw_config_table_children = 64, /* fw_config_table_children */ - YYSYMBOL_fw_config_field_children = 65, /* fw_config_field_children */ - YYSYMBOL_fw_config_field = 66, /* fw_config_field */ - YYSYMBOL_67_4 = 67, /* $@4 */ - YYSYMBOL_68_5 = 68, /* $@5 */ - YYSYMBOL_69_6 = 69, /* $@6 */ - YYSYMBOL_fw_config_option = 70, /* fw_config_option */ - YYSYMBOL_fw_config_probe = 71 /* fw_config_probe */ + YYSYMBOL_PIPE = 46, /* PIPE */ + YYSYMBOL_YYACCEPT = 47, /* $accept */ + YYSYMBOL_devtree = 48, /* devtree */ + YYSYMBOL_chipchildren = 49, /* chipchildren */ + YYSYMBOL_devicechildren = 50, /* devicechildren */ + YYSYMBOL_chip = 51, /* chip */ + YYSYMBOL_52_1 = 52, /* @1 */ + YYSYMBOL_device = 53, /* device */ + YYSYMBOL_54_2 = 54, /* @2 */ + YYSYMBOL_55_3 = 55, /* @3 */ + YYSYMBOL_alias = 56, /* alias */ + YYSYMBOL_status = 57, /* status */ + YYSYMBOL_resource = 58, /* resource */ + YYSYMBOL_reference = 59, /* reference */ + YYSYMBOL_registers = 60, /* registers */ + YYSYMBOL_subsystemid = 61, /* subsystemid */ + YYSYMBOL_ioapic_irq = 62, /* ioapic_irq */ + YYSYMBOL_smbios_slot_desc = 63, /* smbios_slot_desc */ + YYSYMBOL_fw_config_table = 64, /* fw_config_table */ + YYSYMBOL_fw_config_table_children = 65, /* fw_config_table_children */ + YYSYMBOL_fw_config_field_children = 66, /* fw_config_field_children */ + YYSYMBOL_fw_config_field_bits = 67, /* fw_config_field_bits */ + YYSYMBOL_fw_config_field_bits_repeating = 68, /* fw_config_field_bits_repeating */ + YYSYMBOL_fw_config_field = 69, /* fw_config_field */ + YYSYMBOL_70_4 = 70, /* $@4 */ + YYSYMBOL_71_5 = 71, /* $@5 */ + YYSYMBOL_72_6 = 72, /* $@6 */ + YYSYMBOL_fw_config_option = 73, /* fw_config_option */ + YYSYMBOL_fw_config_probe = 74 /* fw_config_probe */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -224,6 +228,18 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -321,9 +337,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -490,19 +506,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 79 +#define YYLAST 83 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 46 +#define YYNTOKENS 47 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 26 +#define YYNNTS 28 /* YYNRULES -- Number of rules. */ -#define YYNRULES 50 +#define YYNRULES 53 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 89 +#define YYNSTATES 95 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 300 +#define YYMAXUTOK 301 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -546,19 +562,19 @@ static const yytype_int8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45 + 45, 46 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_int8 yyrline[] = +static const yytype_uint8 yyrline[] = { - 0, 25, 25, 25, 25, 27, 27, 27, 27, 27, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 31, - 31, 40, 40, 48, 48, 56, 58, 62, 62, 64, - 67, 70, 73, 76, 79, 82, 85, 88, 92, 95, - 95, 98, 98, 101, 101, 107, 107, 113, 113, 119, - 123 + 0, 26, 26, 26, 26, 28, 28, 28, 28, 28, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 32, + 32, 41, 41, 49, 49, 57, 59, 63, 63, 65, + 68, 71, 74, 77, 80, 83, 86, 89, 93, 96, + 96, 99, 99, 102, 108, 108, 111, 110, 115, 115, + 123, 123, 129, 133 }; #endif @@ -581,11 +597,12 @@ static const char *const yytname[] = "SLOT_DESC", "IO", "NUMBER", "SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC", "SPI", "USB", "MMIO", "LPC", "ESPI", "GPIO", "FW_CONFIG_TABLE", "FW_CONFIG_FIELD", "FW_CONFIG_OPTION", - "FW_CONFIG_PROBE", "$accept", "devtree", "chipchildren", + "FW_CONFIG_PROBE", "PIPE", "$accept", "devtree", "chipchildren", "devicechildren", "chip", "@1", "device", "@2", "@3", "alias", "status", "resource", "reference", "registers", "subsystemid", "ioapic_irq", "smbios_slot_desc", "fw_config_table", "fw_config_table_children", - "fw_config_field_children", "fw_config_field", "$@4", "$@5", "$@6", + "fw_config_field_children", "fw_config_field_bits", + "fw_config_field_bits_repeating", "fw_config_field", "$@4", "$@5", "$@6", "fw_config_option", "fw_config_probe", YY_NULLPTR }; @@ -605,11 +622,11 @@ static const yytype_int16 yytoknum[] = 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300 + 295, 296, 297, 298, 299, 300, 301 }; #endif -#define YYPACT_NINF (-15) +#define YYPACT_NINF (-21) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -623,15 +640,16 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int8 yypact[] = { - -15, 9, -15, 0, -15, -15, -15, -15, -11, -15, - -15, 2, -15, 45, -8, 13, 6, 19, -15, -15, - -15, -15, -15, 10, -15, 23, 12, 11, 36, -15, - -15, -7, 25, 39, 30, 37, -15, -6, -15, 38, - -15, -15, -15, -15, 40, 25, -15, -15, -1, -15, - 24, -15, -15, -15, -15, -15, -3, -15, 27, -15, - 41, 31, 32, 46, -15, -15, -15, -15, -15, -15, - -15, -15, 1, 47, 48, 35, 33, 49, -15, 42, - 51, 43, 44, -15, -15, 52, -15, -15, -15 + -21, 9, -21, 2, -21, -21, -21, -21, -11, -21, + -21, 8, -21, 45, -13, 10, 18, 19, -21, -21, + -21, -21, -21, 12, -20, -21, 22, 15, 25, 37, + -21, -21, 24, -21, -7, 11, 41, 38, 39, -6, + 12, -20, -21, -21, 40, -21, -21, -21, -21, 43, + 11, -21, -21, -21, -21, -1, 29, -21, -21, -21, + -21, -21, -3, -21, 32, -21, 46, 33, 35, 48, + -21, -21, -21, -21, -21, -21, -21, -21, 1, 51, + 50, 42, 20, 52, -21, 44, 53, 47, 54, -21, + -21, 55, -21, -21, -21 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -640,30 +658,31 @@ static const yytype_int8 yypact[] = static const yytype_int8 yydefact[] = { 2, 0, 1, 0, 40, 3, 4, 19, 0, 9, - 38, 0, 39, 0, 47, 0, 0, 0, 20, 6, - 5, 8, 7, 45, 42, 0, 0, 0, 0, 43, - 42, 0, 0, 25, 0, 0, 42, 0, 48, 0, - 41, 27, 28, 23, 0, 0, 31, 30, 0, 46, - 0, 18, 26, 21, 44, 49, 0, 18, 0, 24, - 0, 0, 0, 0, 11, 10, 12, 16, 13, 14, - 15, 17, 0, 0, 0, 0, 0, 0, 22, 0, - 37, 32, 0, 50, 29, 36, 33, 34, 35 + 38, 0, 39, 0, 50, 0, 0, 0, 20, 6, + 5, 8, 7, 48, 45, 42, 0, 0, 0, 0, + 43, 42, 0, 46, 0, 0, 25, 0, 0, 0, + 0, 45, 42, 51, 0, 41, 27, 28, 23, 0, + 0, 31, 30, 49, 44, 0, 0, 18, 26, 21, + 47, 52, 0, 18, 0, 24, 0, 0, 0, 0, + 11, 10, 12, 16, 13, 14, 15, 17, 0, 0, + 0, 0, 0, 0, 22, 0, 37, 32, 0, 53, + 29, 36, 33, 34, 35 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -15, -15, -15, 15, 17, -15, 57, -15, -15, -15, - 34, -15, -15, 62, -15, -15, -15, -15, -15, -14, - -15, -15, -15, -15, -15, -15 + -21, -21, -21, 5, 17, -21, 61, -21, -21, -21, + 26, -21, -21, 62, -21, -21, -21, -21, -21, -8, + 49, 36, -21, -21, -21, -21, -21, -21 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 13, 56, 64, 9, 65, 57, 51, 45, - 43, 66, 21, 67, 68, 69, 70, 6, 8, 31, - 12, 36, 30, 24, 40, 71 + 0, 1, 13, 62, 70, 9, 71, 63, 57, 50, + 48, 72, 21, 73, 74, 75, 76, 6, 8, 34, + 24, 33, 12, 42, 31, 25, 45, 77 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -671,52 +690,55 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int8 yytable[] = { - 3, 15, 16, 10, 3, 15, 16, 38, 49, 2, - 58, 59, 3, 54, 58, 78, 37, 7, 5, 14, - 25, 23, 48, 27, 60, 26, 34, 61, 60, 62, - 19, 61, 11, 62, 41, 42, 28, 39, 39, 29, - 32, 33, 63, 39, 35, 44, 63, 46, 3, 15, - 16, 4, 17, 55, 47, 50, 73, 52, 74, 18, - 75, 76, 79, 77, 81, 80, 83, 82, 85, 88, - 20, 84, 72, 87, 86, 22, 0, 0, 0, 53 + 3, 15, 16, 10, 3, 15, 16, 43, 53, 2, + 64, 65, 3, 60, 64, 84, 23, 26, 5, 7, + 46, 47, 27, 39, 66, 14, 32, 67, 66, 68, + 19, 67, 11, 68, 55, 28, 29, 44, 44, 35, + 37, 30, 69, 44, 36, 38, 69, 49, 3, 15, + 16, 4, 17, 40, 88, 51, 52, 56, 61, 18, + 58, 79, 81, 80, 82, 83, 85, 86, 78, 89, + 91, 87, 94, 90, 20, 22, 59, 54, 92, 0, + 0, 41, 0, 93 }; static const yytype_int8 yycheck[] = { 3, 4, 5, 14, 3, 4, 5, 14, 14, 0, - 13, 14, 3, 14, 13, 14, 30, 17, 1, 17, - 7, 29, 36, 17, 27, 12, 15, 30, 27, 32, - 13, 30, 43, 32, 9, 10, 17, 44, 44, 29, - 17, 29, 45, 44, 8, 6, 45, 17, 3, 4, - 5, 42, 7, 29, 17, 17, 29, 17, 17, 14, - 29, 29, 15, 17, 29, 17, 17, 34, 17, 17, - 13, 29, 57, 29, 31, 13, -1, -1, -1, 45 + 13, 14, 3, 14, 13, 14, 29, 7, 1, 17, + 9, 10, 12, 31, 27, 17, 46, 30, 27, 32, + 13, 30, 43, 32, 42, 17, 17, 44, 44, 17, + 15, 29, 45, 44, 29, 8, 45, 6, 3, 4, + 5, 42, 7, 29, 34, 17, 17, 17, 29, 14, + 17, 29, 29, 17, 29, 17, 15, 17, 63, 17, + 17, 29, 17, 29, 13, 13, 50, 41, 31, -1, + -1, 32, -1, 29 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { - 0, 47, 0, 3, 42, 50, 63, 17, 64, 51, - 14, 43, 66, 48, 17, 4, 5, 7, 14, 50, - 52, 58, 59, 29, 69, 7, 12, 17, 17, 29, - 68, 65, 17, 29, 15, 8, 67, 65, 14, 44, - 70, 9, 10, 56, 6, 55, 17, 17, 65, 14, - 17, 54, 17, 56, 14, 29, 49, 53, 13, 14, - 27, 30, 32, 45, 50, 52, 57, 59, 60, 61, - 62, 71, 49, 29, 17, 29, 29, 17, 14, 15, - 17, 29, 34, 17, 29, 17, 31, 29, 17 + 0, 48, 0, 3, 42, 51, 64, 17, 65, 52, + 14, 43, 69, 49, 17, 4, 5, 7, 14, 51, + 53, 59, 60, 29, 67, 72, 7, 12, 17, 17, + 29, 71, 46, 68, 66, 17, 29, 15, 8, 66, + 29, 67, 70, 14, 44, 73, 9, 10, 57, 6, + 56, 17, 17, 14, 68, 66, 17, 55, 17, 57, + 14, 29, 50, 54, 13, 14, 27, 30, 32, 45, + 51, 53, 58, 60, 61, 62, 63, 74, 50, 29, + 17, 29, 29, 17, 14, 15, 17, 29, 34, 17, + 29, 17, 31, 29, 17 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_int8 yyr1[] = { - 0, 46, 47, 47, 47, 48, 48, 48, 48, 48, - 49, 49, 49, 49, 49, 49, 49, 49, 49, 51, - 50, 53, 52, 54, 52, 55, 55, 56, 56, 57, - 58, 59, 60, 60, 61, 62, 62, 62, 63, 64, - 64, 65, 65, 67, 66, 68, 66, 69, 66, 70, - 71 + 0, 47, 48, 48, 48, 49, 49, 49, 49, 49, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 52, + 51, 54, 53, 55, 53, 56, 56, 57, 57, 58, + 59, 60, 61, 61, 62, 63, 63, 63, 64, 65, + 65, 66, 66, 67, 68, 68, 70, 69, 71, 69, + 72, 69, 73, 74 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -726,8 +748,8 @@ static const yytype_int8 yyr2[] = 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 5, 0, 8, 0, 7, 0, 2, 1, 1, 4, 4, 4, 3, 4, 4, 5, 4, 3, 3, 2, - 0, 2, 0, 0, 7, 0, 6, 0, 5, 3, - 3 + 0, 2, 0, 2, 3, 0, 0, 7, 0, 6, + 0, 5, 3, 3 }; @@ -806,7 +828,7 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT @@ -814,7 +836,7 @@ yy_symbol_value_print (FILE *yyo, YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -928,13 +950,13 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1290,41 +1312,47 @@ yyreduce: { } break; - case 43: /* $@4: %empty */ - { - cur_field = new_fw_config_field((yyvsp[-2].string), strtoul((yyvsp[-1].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0)); + case 43: /* fw_config_field_bits: NUMBER NUMBER */ +{ + append_fw_config_bits(&cur_bits, strtoul((yyvsp[-1].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0)); } break; - case 44: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER NUMBER $@4 fw_config_field_children END */ - { } + case 46: /* $@4: %empty */ + { cur_field = new_fw_config_field((yyvsp[-2].string), cur_bits); } + break; + + case 47: /* fw_config_field: FW_CONFIG_FIELD STRING fw_config_field_bits fw_config_field_bits_repeating $@4 fw_config_field_children END */ + { cur_bits = NULL; } break; - case 45: /* $@5: %empty */ + case 48: /* $@5: %empty */ { - cur_field = new_fw_config_field((yyvsp[-1].string), strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0)); + cur_bits = NULL; + append_fw_config_bits(&cur_bits, strtoul((yyvsp[0].string), NULL, 0), strtoul((yyvsp[0].string), NULL, 0)); + cur_field = new_fw_config_field((yyvsp[-1].string), cur_bits); } break; - case 46: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */ - { } + case 49: /* fw_config_field: FW_CONFIG_FIELD STRING NUMBER $@5 fw_config_field_children END */ + { cur_bits = NULL; } break; - case 47: /* $@6: %empty */ + case 50: /* $@6: %empty */ { cur_field = get_fw_config_field((yyvsp[0].string)); } break; - case 48: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */ - { } + case 51: /* fw_config_field: FW_CONFIG_FIELD STRING $@6 fw_config_field_children END */ + { cur_bits = NULL; } break; - case 49: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */ + case 52: /* fw_config_option: FW_CONFIG_OPTION STRING NUMBER */ { add_fw_config_option(cur_field, (yyvsp[-1].string), strtoull((yyvsp[0].string), NULL, 0)); } break; - case 50: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */ + case 53: /* fw_config_probe: FW_CONFIG_PROBE STRING STRING */ { add_fw_config_probe(cur_parent, (yyvsp[-1].string), (yyvsp[0].string)); } break; -- cgit v1.2.3