From 86bddc1cfe0be8a1e1be77f1298acb748059d24a Mon Sep 17 00:00:00 2001 From: Peter Babka Date: Mon, 18 Oct 2021 15:32:04 +0200 Subject: [PATCH] Fix merge --- libyara/grammar.c | 1471 ++++++++++++++++++++++----------------------- libyara/grammar.h | 49 +- libyara/lexer.c | 722 +++++++++++----------- 3 files changed, 1124 insertions(+), 1118 deletions(-) diff --git a/libyara/grammar.c b/libyara/grammar.c index 17d923af76..4dfdaf953e 100644 --- a/libyara/grammar.c +++ b/libyara/grammar.c @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.7. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -45,11 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Identify Bison output, and Bison version. */ -#define YYBISON 30706 +/* Identify Bison output. */ +#define YYBISON 1 -/* Bison version string. */ -#define YYBISON_VERSION "3.7.6" +/* Bison version. */ +#define YYBISON_VERSION "3.7" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -277,20 +277,20 @@ extern int yara_yydebug; _OR_ = 306, /* "" */ _AND_ = 307, /* "" */ _NOT_ = 308, /* "" */ - _EQ_ = 309, /* "==" */ - _NEQ_ = 310, /* "!=" */ - _LT_ = 311, /* "<" */ - _LE_ = 312, /* "<=" */ - _GT_ = 313, /* ">" */ - _GE_ = 314, /* ">=" */ - _SHIFT_LEFT_ = 315, /* "<<" */ - _SHIFT_RIGHT_ = 316, /* ">>" */ - UNARY_MINUS = 317 /* UNARY_MINUS */ + _DEFINED_ = 309, /* "" */ + _EQ_ = 310, /* "==" */ + _NEQ_ = 311, /* "!=" */ + _LT_ = 312, /* "<" */ + _LE_ = 313, /* "<=" */ + _GT_ = 314, /* ">" */ + _GE_ = 315, /* ">=" */ + _SHIFT_LEFT_ = 316, /* "<<" */ + _SHIFT_RIGHT_ = 317, /* ">>" */ + UNARY_MINUS = 318 /* UNARY_MINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif /* Token kinds. */ -#define YYEMPTY -2 #define _END_OF_FILE_ 0 #define YYerror 256 #define YYUNDEF 257 @@ -345,21 +345,22 @@ extern int yara_yydebug; #define _OR_ 306 #define _AND_ 307 #define _NOT_ 308 -#define _EQ_ 309 -#define _NEQ_ 310 -#define _LT_ 311 -#define _LE_ 312 -#define _GT_ 313 -#define _GE_ 314 -#define _SHIFT_LEFT_ 315 -#define _SHIFT_RIGHT_ 316 -#define UNARY_MINUS 317 +#define _DEFINED_ 309 +#define _EQ_ 310 +#define _NEQ_ 311 +#define _LT_ 312 +#define _LE_ 313 +#define _GT_ 314 +#define _GE_ 315 +#define _SHIFT_LEFT_ 316 +#define _SHIFT_RIGHT_ 317 +#define UNARY_MINUS 318 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 306 "grammar.y" +#line 308 "grammar.y" YR_EXPRESSION expression; SIZED_STRING* sized_string; @@ -373,7 +374,7 @@ union YYSTYPE YR_ARENA_REF meta; YR_ARENA_REF string; -#line 377 "grammar.c" +#line 378 "grammar.c" }; typedef union YYSTYPE YYSTYPE; @@ -444,83 +445,84 @@ enum yysymbol_kind_t YYSYMBOL__OR_ = 51, /* "" */ YYSYMBOL__AND_ = 52, /* "" */ YYSYMBOL__NOT_ = 53, /* "" */ - YYSYMBOL__EQ_ = 54, /* "==" */ - YYSYMBOL__NEQ_ = 55, /* "!=" */ - YYSYMBOL__LT_ = 56, /* "<" */ - YYSYMBOL__LE_ = 57, /* "<=" */ - YYSYMBOL__GT_ = 58, /* ">" */ - YYSYMBOL__GE_ = 59, /* ">=" */ - YYSYMBOL__SHIFT_LEFT_ = 60, /* "<<" */ - YYSYMBOL__SHIFT_RIGHT_ = 61, /* ">>" */ - YYSYMBOL_62_ = 62, /* '|' */ - YYSYMBOL_63_ = 63, /* '^' */ - YYSYMBOL_64_ = 64, /* '&' */ - YYSYMBOL_65_ = 65, /* '+' */ - YYSYMBOL_66_ = 66, /* '-' */ - YYSYMBOL_67_ = 67, /* '*' */ - YYSYMBOL_68_ = 68, /* '\\' */ - YYSYMBOL_69_ = 69, /* '%' */ - YYSYMBOL_70_ = 70, /* '~' */ - YYSYMBOL_UNARY_MINUS = 71, /* UNARY_MINUS */ - YYSYMBOL_72_include_ = 72, /* "include" */ - YYSYMBOL_73_ = 73, /* '{' */ - YYSYMBOL_74_ = 74, /* '}' */ - YYSYMBOL_75_ = 75, /* ':' */ - YYSYMBOL_76_ = 76, /* '=' */ - YYSYMBOL_77_ = 77, /* '(' */ - YYSYMBOL_78_ = 78, /* ')' */ - YYSYMBOL_79_ = 79, /* '.' */ - YYSYMBOL_80_ = 80, /* '[' */ - YYSYMBOL_81_ = 81, /* ']' */ - YYSYMBOL_82_ = 82, /* ',' */ - YYSYMBOL_YYACCEPT = 83, /* $accept */ - YYSYMBOL_rules = 84, /* rules */ - YYSYMBOL_import = 85, /* import */ - YYSYMBOL_rule = 86, /* rule */ - YYSYMBOL_87_1 = 87, /* @1 */ - YYSYMBOL_88_2 = 88, /* $@2 */ - YYSYMBOL_meta = 89, /* meta */ - YYSYMBOL_strings = 90, /* strings */ - YYSYMBOL_condition = 91, /* condition */ - YYSYMBOL_rule_modifiers = 92, /* rule_modifiers */ - YYSYMBOL_rule_modifier = 93, /* rule_modifier */ - YYSYMBOL_tags = 94, /* tags */ - YYSYMBOL_tag_list = 95, /* tag_list */ - YYSYMBOL_meta_declarations = 96, /* meta_declarations */ - YYSYMBOL_meta_declaration = 97, /* meta_declaration */ - YYSYMBOL_string_declarations = 98, /* string_declarations */ - YYSYMBOL_string_declaration = 99, /* string_declaration */ - YYSYMBOL_100_3 = 100, /* $@3 */ - YYSYMBOL_101_4 = 101, /* $@4 */ - YYSYMBOL_102_5 = 102, /* $@5 */ - YYSYMBOL_string_modifiers = 103, /* string_modifiers */ - YYSYMBOL_string_modifier = 104, /* string_modifier */ - YYSYMBOL_regexp_modifiers = 105, /* regexp_modifiers */ - YYSYMBOL_regexp_modifier = 106, /* regexp_modifier */ - YYSYMBOL_hex_modifiers = 107, /* hex_modifiers */ - YYSYMBOL_hex_modifier = 108, /* hex_modifier */ - YYSYMBOL_identifier = 109, /* identifier */ - YYSYMBOL_arguments = 110, /* arguments */ - YYSYMBOL_arguments_list = 111, /* arguments_list */ - YYSYMBOL_regexp = 112, /* regexp */ - YYSYMBOL_boolean_expression = 113, /* boolean_expression */ - YYSYMBOL_expression = 114, /* expression */ - YYSYMBOL_115_6 = 115, /* $@6 */ - YYSYMBOL_116_7 = 116, /* $@7 */ - YYSYMBOL_117_8 = 117, /* $@8 */ - YYSYMBOL_118_9 = 118, /* $@9 */ - YYSYMBOL_119_10 = 119, /* $@10 */ - YYSYMBOL_for_variables = 120, /* for_variables */ - YYSYMBOL_iterator = 121, /* iterator */ - YYSYMBOL_integer_set = 122, /* integer_set */ - YYSYMBOL_range = 123, /* range */ - YYSYMBOL_integer_enumeration = 124, /* integer_enumeration */ - YYSYMBOL_string_set = 125, /* string_set */ - YYSYMBOL_126_11 = 126, /* $@11 */ - YYSYMBOL_string_enumeration = 127, /* string_enumeration */ - YYSYMBOL_string_enumeration_item = 128, /* string_enumeration_item */ - YYSYMBOL_for_expression = 129, /* for_expression */ - YYSYMBOL_primary_expression = 130 /* primary_expression */ + YYSYMBOL__DEFINED_ = 54, /* "" */ + YYSYMBOL__EQ_ = 55, /* "==" */ + YYSYMBOL__NEQ_ = 56, /* "!=" */ + YYSYMBOL__LT_ = 57, /* "<" */ + YYSYMBOL__LE_ = 58, /* "<=" */ + YYSYMBOL__GT_ = 59, /* ">" */ + YYSYMBOL__GE_ = 60, /* ">=" */ + YYSYMBOL__SHIFT_LEFT_ = 61, /* "<<" */ + YYSYMBOL__SHIFT_RIGHT_ = 62, /* ">>" */ + YYSYMBOL_63_ = 63, /* '|' */ + YYSYMBOL_64_ = 64, /* '^' */ + YYSYMBOL_65_ = 65, /* '&' */ + YYSYMBOL_66_ = 66, /* '+' */ + YYSYMBOL_67_ = 67, /* '-' */ + YYSYMBOL_68_ = 68, /* '*' */ + YYSYMBOL_69_ = 69, /* '\\' */ + YYSYMBOL_70_ = 70, /* '%' */ + YYSYMBOL_71_ = 71, /* '~' */ + YYSYMBOL_UNARY_MINUS = 72, /* UNARY_MINUS */ + YYSYMBOL_73_include_ = 73, /* "include" */ + YYSYMBOL_74_ = 74, /* '{' */ + YYSYMBOL_75_ = 75, /* '}' */ + YYSYMBOL_76_ = 76, /* ':' */ + YYSYMBOL_77_ = 77, /* '=' */ + YYSYMBOL_78_ = 78, /* '(' */ + YYSYMBOL_79_ = 79, /* ')' */ + YYSYMBOL_80_ = 80, /* '.' */ + YYSYMBOL_81_ = 81, /* '[' */ + YYSYMBOL_82_ = 82, /* ']' */ + YYSYMBOL_83_ = 83, /* ',' */ + YYSYMBOL_YYACCEPT = 84, /* $accept */ + YYSYMBOL_rules = 85, /* rules */ + YYSYMBOL_import = 86, /* import */ + YYSYMBOL_rule = 87, /* rule */ + YYSYMBOL_88_1 = 88, /* @1 */ + YYSYMBOL_89_2 = 89, /* $@2 */ + YYSYMBOL_meta = 90, /* meta */ + YYSYMBOL_strings = 91, /* strings */ + YYSYMBOL_condition = 92, /* condition */ + YYSYMBOL_rule_modifiers = 93, /* rule_modifiers */ + YYSYMBOL_rule_modifier = 94, /* rule_modifier */ + YYSYMBOL_tags = 95, /* tags */ + YYSYMBOL_tag_list = 96, /* tag_list */ + YYSYMBOL_meta_declarations = 97, /* meta_declarations */ + YYSYMBOL_meta_declaration = 98, /* meta_declaration */ + YYSYMBOL_string_declarations = 99, /* string_declarations */ + YYSYMBOL_string_declaration = 100, /* string_declaration */ + YYSYMBOL_101_3 = 101, /* $@3 */ + YYSYMBOL_102_4 = 102, /* $@4 */ + YYSYMBOL_103_5 = 103, /* $@5 */ + YYSYMBOL_string_modifiers = 104, /* string_modifiers */ + YYSYMBOL_string_modifier = 105, /* string_modifier */ + YYSYMBOL_regexp_modifiers = 106, /* regexp_modifiers */ + YYSYMBOL_regexp_modifier = 107, /* regexp_modifier */ + YYSYMBOL_hex_modifiers = 108, /* hex_modifiers */ + YYSYMBOL_hex_modifier = 109, /* hex_modifier */ + YYSYMBOL_identifier = 110, /* identifier */ + YYSYMBOL_arguments = 111, /* arguments */ + YYSYMBOL_arguments_list = 112, /* arguments_list */ + YYSYMBOL_regexp = 113, /* regexp */ + YYSYMBOL_boolean_expression = 114, /* boolean_expression */ + YYSYMBOL_expression = 115, /* expression */ + YYSYMBOL_116_6 = 116, /* $@6 */ + YYSYMBOL_117_7 = 117, /* $@7 */ + YYSYMBOL_118_8 = 118, /* $@8 */ + YYSYMBOL_119_9 = 119, /* $@9 */ + YYSYMBOL_120_10 = 120, /* $@10 */ + YYSYMBOL_for_variables = 121, /* for_variables */ + YYSYMBOL_iterator = 122, /* iterator */ + YYSYMBOL_integer_set = 123, /* integer_set */ + YYSYMBOL_range = 124, /* range */ + YYSYMBOL_integer_enumeration = 125, /* integer_enumeration */ + YYSYMBOL_string_set = 126, /* string_set */ + YYSYMBOL_127_11 = 127, /* $@11 */ + YYSYMBOL_string_enumeration = 128, /* string_enumeration */ + YYSYMBOL_string_enumeration_item = 129, /* string_enumeration_item */ + YYSYMBOL_for_expression = 130, /* for_expression */ + YYSYMBOL_primary_expression = 131 /* primary_expression */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -564,18 +566,6 @@ 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 \ @@ -673,9 +663,9 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YY_USE(E) ((void) (E)) +# define YYUSE(E) ((void) (E)) #else -# define YY_USE(E) /* empty */ +# define YYUSE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -842,19 +832,19 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 467 +#define YYLAST 435 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 83 +#define YYNTOKENS 84 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 48 /* YYNRULES -- Number of rules. */ -#define YYNRULES 155 +#define YYNRULES 156 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 260 +#define YYNSTATES 262 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 318 +#define YYMAXUTOK 319 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -871,16 +861,16 @@ static const yytype_int8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 69, 64, 2, - 77, 78, 67, 65, 82, 66, 79, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 75, 2, - 2, 76, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 70, 65, 2, + 78, 79, 68, 66, 83, 67, 80, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 76, 2, + 2, 77, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 80, 68, 81, 63, 2, 2, 2, 2, 2, + 2, 81, 69, 82, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 73, 62, 74, 70, 2, 2, 2, + 2, 2, 2, 74, 63, 75, 71, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -899,29 +889,29 @@ static const yytype_int8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 71, 72 + 55, 56, 57, 58, 59, 60, 61, 62, 72, 73 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 324, 324, 325, 326, 327, 328, 329, 330, 338, - 351, 356, 350, 383, 386, 402, 405, 420, 425, 426, - 431, 432, 438, 441, 457, 466, 508, 509, 514, 531, - 545, 559, 573, 591, 592, 598, 597, 614, 613, 634, - 633, 658, 664, 724, 725, 726, 727, 728, 729, 735, - 756, 787, 792, 809, 814, 834, 835, 849, 850, 851, - 852, 853, 857, 858, 872, 876, 971, 1019, 1080, 1127, - 1128, 1132, 1167, 1220, 1262, 1285, 1291, 1297, 1309, 1319, - 1329, 1339, 1349, 1359, 1369, 1379, 1393, 1408, 1419, 1496, - 1534, 1436, 1693, 1692, 1782, 1788, 1808, 1814, 1821, 1820, - 1866, 1865, 1909, 1916, 1923, 1930, 1937, 1944, 1951, 1955, - 1963, 1983, 2011, 2085, 2113, 2121, 2130, 2154, 2169, 2189, - 2188, 2194, 2205, 2206, 2211, 2218, 2229, 2233, 2238, 2243, - 2252, 2256, 2264, 2276, 2290, 2297, 2304, 2329, 2341, 2353, - 2368, 2380, 2395, 2438, 2459, 2494, 2529, 2563, 2588, 2605, - 2615, 2625, 2635, 2645, 2665, 2685 + 0, 326, 326, 327, 328, 329, 330, 331, 332, 340, + 353, 358, 352, 385, 388, 404, 407, 422, 427, 428, + 433, 434, 440, 443, 459, 468, 510, 511, 516, 533, + 547, 561, 575, 593, 594, 600, 599, 616, 615, 636, + 635, 660, 666, 726, 727, 728, 729, 730, 731, 737, + 758, 789, 794, 811, 816, 836, 837, 851, 852, 853, + 854, 855, 859, 860, 874, 878, 973, 1021, 1082, 1129, + 1130, 1134, 1169, 1222, 1264, 1287, 1293, 1299, 1311, 1321, + 1331, 1341, 1351, 1361, 1371, 1381, 1395, 1410, 1421, 1498, + 1536, 1438, 1695, 1694, 1784, 1790, 1810, 1816, 1822, 1828, + 1827, 1873, 1872, 1916, 1923, 1930, 1937, 1944, 1951, 1958, + 1962, 1970, 1990, 2018, 2092, 2120, 2128, 2137, 2161, 2176, + 2196, 2195, 2201, 2212, 2213, 2218, 2225, 2236, 2240, 2245, + 2250, 2259, 2263, 2271, 2283, 2297, 2304, 2311, 2336, 2348, + 2360, 2375, 2387, 2402, 2445, 2466, 2501, 2536, 2570, 2595, + 2612, 2622, 2632, 2642, 2652, 2672, 2692 }; #endif @@ -952,20 +942,21 @@ static const char *const yytname[] = "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", "\"\"", - "\"==\"", "\"!=\"", "\"<\"", "\"<=\"", "\">\"", "\">=\"", "\"<<\"", - "\">>\"", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'\\\\'", "'%'", - "'~'", "UNARY_MINUS", "\"include\"", "'{'", "'}'", "':'", "'='", "'('", - "')'", "'.'", "'['", "']'", "','", "$accept", "rules", "import", "rule", - "@1", "$@2", "meta", "strings", "condition", "rule_modifiers", - "rule_modifier", "tags", "tag_list", "meta_declarations", - "meta_declaration", "string_declarations", "string_declaration", "$@3", - "$@4", "$@5", "string_modifiers", "string_modifier", "regexp_modifiers", - "regexp_modifier", "hex_modifiers", "hex_modifier", "identifier", - "arguments", "arguments_list", "regexp", "boolean_expression", - "expression", "$@6", "$@7", "$@8", "$@9", "$@10", "for_variables", - "iterator", "integer_set", "range", "integer_enumeration", "string_set", - "$@11", "string_enumeration", "string_enumeration_item", - "for_expression", "primary_expression", YY_NULLPTR + "\"\"", "\"==\"", "\"!=\"", "\"<\"", "\"<=\"", "\">\"", + "\">=\"", "\"<<\"", "\">>\"", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", + "'\\\\'", "'%'", "'~'", "UNARY_MINUS", "\"include\"", "'{'", "'}'", + "':'", "'='", "'('", "')'", "'.'", "'['", "']'", "','", "$accept", + "rules", "import", "rule", "@1", "$@2", "meta", "strings", "condition", + "rule_modifiers", "rule_modifier", "tags", "tag_list", + "meta_declarations", "meta_declaration", "string_declarations", + "string_declaration", "$@3", "$@4", "$@5", "string_modifiers", + "string_modifier", "regexp_modifiers", "regexp_modifier", + "hex_modifiers", "hex_modifier", "identifier", "arguments", + "arguments_list", "regexp", "boolean_expression", "expression", "$@6", + "$@7", "$@8", "$@9", "$@10", "for_variables", "iterator", "integer_set", + "range", "integer_enumeration", "string_set", "$@11", + "string_enumeration", "string_enumeration_item", "for_expression", + "primary_expression", YY_NULLPTR }; static const char * @@ -986,18 +977,18 @@ static const yytype_int16 yytoknum[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 124, 94, 38, 43, 45, 42, 92, 37, - 126, 317, 318, 123, 125, 58, 61, 40, 41, 46, - 91, 93, 44 + 315, 316, 317, 124, 94, 38, 43, 45, 42, 92, + 37, 126, 318, 319, 123, 125, 58, 61, 40, 41, + 46, 91, 93, 44 }; #endif -#define YYPACT_NINF (-201) +#define YYPACT_NINF (-114) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-127) +#define YYTABLE_NINF (-128) #define yytable_value_is_error(Yyn) \ 0 @@ -1006,32 +997,33 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -201, 81, -201, -45, -201, -8, -201, -201, 170, -201, - -201, -201, -201, 20, -201, -201, -201, -201, -39, 51, - -9, -201, 90, 86, -201, 34, 121, 120, 64, -201, - 57, 120, -201, 132, 136, 17, -201, 77, 132, -201, - 85, 92, -201, -201, -201, -201, 142, 101, -201, 58, - -201, -201, 151, 162, 164, -201, -7, -201, 106, 108, - -201, -201, 113, -201, -201, -201, -201, -201, -201, -201, - 123, -201, -201, 58, 192, 192, 58, 33, -201, 54, - -201, 157, 269, -201, -201, -201, 192, 122, 192, 192, - 192, 192, 84, 368, -201, -201, -201, 54, 124, 230, - 58, 187, 192, -201, -201, -14, 182, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 150, - 91, 168, 195, 368, 192, -201, 179, 279, 311, 330, - -201, -14, 202, 192, -201, -201, 137, 135, 75, -201, - 289, 58, 58, -201, -201, 183, -201, 368, 368, 368, - 368, 368, 368, 368, 368, 368, 368, 368, 368, 368, - 83, 83, 378, 388, 398, 111, 111, -201, -201, -14, - -201, -201, -201, -201, 141, 144, 145, -201, -201, -201, - -201, -201, -201, -201, -201, -201, -201, -201, 169, -201, - -201, -201, 153, -201, -21, -201, 58, -201, 173, -201, - -2, 122, -201, 209, 229, 231, 192, -201, 2, 239, - 75, -201, -201, -50, -201, -201, -62, 174, 175, 349, - 177, 192, 33, 180, -201, -201, -201, -201, -2, 240, - -201, -201, -201, -201, 58, 22, 169, -201, -201, 178, - -43, -201, 192, 184, -201, -201, 368, 58, 47, -201 + -114, 96, -114, -37, -114, 9, -114, -114, 175, -114, + -114, -114, -114, 27, -114, -114, -114, -114, -7, 77, + 34, -114, 126, 143, -114, 64, 156, 165, 103, -114, + 114, 165, -114, 186, 190, 14, -114, 119, 186, -114, + 125, 127, -114, -114, -114, -114, 187, 107, -114, 60, + -114, -114, 183, 185, 193, -114, 3, -114, 124, 138, + -114, -114, 130, -114, -114, -114, -114, -114, -114, -114, + 128, -114, -114, 60, 60, 198, 198, 60, -66, -114, + 132, -114, 188, 277, -114, -114, -114, 198, 145, 198, + 198, 198, 198, 89, 335, -114, -114, -114, -114, 132, + 148, 237, 60, 210, 198, -114, -114, -13, 202, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 198, 198, + 198, 155, 129, 83, 222, 335, 198, -114, 54, 184, + 194, 297, -114, -13, 220, 198, -114, -114, 153, 151, + 142, -114, 287, 60, 60, -114, -114, 231, -114, 335, + 335, 335, 335, 335, 335, 335, 335, 335, 335, 335, + 335, 335, 17, 17, 345, 355, 365, 120, 120, -114, + -114, -13, -114, -114, -114, -114, 192, 197, 207, -114, + -114, -114, -114, -114, -114, -114, -114, -114, -114, -114, + 174, -114, -114, -114, 195, -114, -17, -114, 60, -114, + 216, -114, 1, 145, -114, 255, 266, 267, 198, -114, + -8, 278, 142, -114, -114, 51, -114, -114, -51, 209, + 211, 316, 213, 198, -66, 232, -114, -114, -114, -114, + 1, 292, -114, -114, -114, -114, 60, 88, 174, -114, + -114, 233, -47, -114, 198, 235, -114, -114, 335, 60, + -42, -114 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1044,47 +1036,48 @@ static const yytype_uint8 yydefact[] = 0, 24, 23, 13, 25, 0, 15, 0, 0, 11, 0, 14, 26, 0, 0, 0, 27, 0, 16, 33, 0, 0, 29, 28, 31, 32, 0, 35, 34, 0, - 12, 30, 0, 0, 0, 65, 85, 137, 139, 141, - 134, 135, 0, 136, 73, 131, 132, 127, 128, 129, - 0, 75, 76, 0, 0, 0, 0, 142, 155, 17, - 74, 0, 108, 41, 55, 62, 0, 0, 0, 0, - 0, 0, 0, 126, 97, 143, 152, 0, 74, 108, - 69, 0, 0, 100, 98, 0, 0, 0, 0, 0, + 12, 30, 0, 0, 0, 65, 85, 138, 140, 142, + 135, 136, 0, 137, 73, 132, 133, 128, 129, 130, + 0, 75, 76, 0, 0, 0, 0, 0, 143, 156, + 17, 74, 0, 109, 41, 55, 62, 0, 0, 0, + 0, 0, 0, 0, 127, 97, 98, 144, 153, 0, + 74, 109, 69, 0, 0, 101, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 36, 38, 40, 86, 0, 87, 0, 0, 0, 0, - 88, 0, 0, 0, 109, 130, 0, 70, 71, 66, - 0, 0, 0, 121, 119, 94, 77, 78, 80, 82, - 79, 81, 83, 84, 106, 107, 102, 104, 103, 105, - 153, 154, 151, 149, 150, 144, 145, 146, 147, 0, - 148, 47, 44, 43, 48, 51, 53, 45, 46, 42, - 61, 58, 57, 59, 60, 56, 64, 63, 0, 138, - 140, 133, 0, 110, 0, 68, 0, 67, 101, 99, - 0, 0, 95, 0, 0, 0, 0, 92, 0, 0, - 72, 124, 125, 0, 122, 96, 0, 0, 0, 0, - 0, 0, 112, 0, 113, 115, 111, 120, 0, 0, - 49, 52, 54, 116, 0, 0, 117, 90, 123, 0, - 0, 114, 0, 0, 50, 93, 118, 0, 0, 91 + 0, 0, 36, 38, 40, 86, 0, 87, 0, 0, + 0, 0, 88, 0, 0, 0, 110, 131, 0, 70, + 71, 66, 0, 0, 0, 122, 120, 94, 77, 78, + 80, 82, 79, 81, 83, 84, 107, 108, 103, 105, + 104, 106, 154, 155, 152, 150, 151, 145, 146, 147, + 148, 0, 149, 47, 44, 43, 48, 51, 53, 45, + 46, 42, 61, 58, 57, 59, 60, 56, 64, 63, + 0, 139, 141, 134, 0, 111, 0, 68, 0, 67, + 102, 100, 0, 0, 95, 0, 0, 0, 0, 92, + 0, 0, 72, 125, 126, 0, 123, 96, 0, 0, + 0, 0, 0, 0, 113, 0, 114, 116, 112, 121, + 0, 0, 49, 52, 54, 117, 0, 0, 118, 90, + 124, 0, 0, 115, 0, 0, 50, 93, 119, 0, + 0, 91 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -201, -201, 256, 260, -201, -201, -201, -201, -201, -201, - -201, -201, -201, -201, 233, -201, 227, -201, -201, -201, - -201, -201, -201, -201, -201, -201, 48, -201, -201, 172, - -49, -74, -201, -201, -201, -201, -201, -201, -201, -201, - -200, -201, -111, -201, -201, 30, 210, -69 + -114, -114, 307, 308, -114, -114, -114, -114, -114, -114, + -114, -114, -114, -114, 284, -114, 288, -114, -114, -114, + -114, -114, -114, -114, -114, -114, 105, -114, -114, 219, + -49, -75, -114, -114, -114, -114, -114, -114, -114, -114, + -88, -114, -113, -114, -114, 90, 258, -69 }; /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_uint8 yydefgoto[] = +static const yytype_int16 yydefgoto[] = { - 0, 1, 6, 7, 18, 34, 26, 29, 41, 8, + -1, 1, 6, 7, 18, 34, 26, 29, 41, 8, 16, 20, 22, 31, 32, 38, 39, 52, 53, 54, - 130, 189, 131, 195, 132, 197, 77, 146, 147, 78, - 97, 80, 142, 253, 230, 152, 151, 204, 233, 234, - 135, 245, 155, 210, 223, 224, 81, 82 + 132, 191, 133, 197, 134, 199, 78, 148, 149, 79, + 99, 81, 144, 255, 232, 154, 153, 206, 235, 236, + 137, 247, 157, 212, 225, 226, 82, 83 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1092,157 +1085,152 @@ static const yytype_uint8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 79, 93, 98, 5, 239, 95, 96, 99, 103, 104, - 221, 225, 12, 55, 222, 218, 240, 133, 235, 136, - 137, 138, 139, 86, 94, 153, 148, 9, 237, 87, - 202, 17, 238, 150, 42, 255, 19, 43, 157, 158, + 80, 94, 100, 55, 105, 106, 97, 98, 101, 105, + 106, 5, 102, 223, 103, 104, 241, 224, 135, 220, + 138, 139, 140, 141, 95, 96, 155, 150, 242, 12, + 204, 42, 257, 87, 43, 152, 9, 261, 17, 88, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 180, 219, 21, 154, 23, 198, 44, 45, 212, 55, - 56, 57, 58, 59, 180, 60, 61, 62, 63, 231, - 64, 2, 3, 46, 4, 140, -18, -18, -18, 65, - 66, 67, 68, 69, 25, -89, 70, 181, 103, 104, - 251, 24, 208, 209, 252, 103, 104, 71, 72, 27, - 100, 73, 101, 102, 182, 183, 184, 185, 186, 187, - 188, 141, -39, -37, 74, 259, -74, -74, 75, 5, - 28, 30, 220, 35, 55, 76, 57, 58, 59, 33, - 60, 61, 62, 63, 37, 64, 40, 229, 125, 126, - 127, 128, 143, 47, 65, 66, 67, 68, 69, 51, - 49, 55, 246, 57, 58, 59, 50, 60, 61, 62, - 63, 83, 64, 216, 190, 13, 14, 15, 127, 128, - 143, 65, 66, 256, 84, 85, 88, 179, 89, 74, - 90, 191, 192, 75, 105, 250, 193, 194, 149, 134, - 91, 196, 144, 55, 64, 57, 58, 59, 258, 60, - 61, 62, 63, 203, 64, 205, 74, 206, 213, 211, - 75, 214, 215, 65, 66, 104, 226, 91, 217, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 143, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 143, 227, - 236, 228, 241, 242, 244, 247, 254, 249, 74, 10, - 199, 257, 75, 11, 36, 48, 232, -126, 248, 91, - 106, 107, 108, 109, 110, 111, 112, 113, 156, 0, - 92, 0, 0, 0, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 0, 0, 0, 0, 0, 0, -126, 0, 145, 106, - 107, 108, 109, 110, 111, 112, 113, 0, 0, 0, - 0, 0, 0, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 143, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 143, 0, - 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 207, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 143, 0, 0, 0, 0, 0, 0, 0, 0, 201, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 143, - 0, 0, 0, 0, 0, 0, 0, 0, 145, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 143, 0, - 0, 0, 0, 0, 0, 0, 0, 243, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 143, 120, 121, - 0, 123, 124, 125, 126, 127, 128, 143, 120, 121, - 0, 0, 124, 125, 126, 127, 128, 143, 120, 121, - 0, 0, 0, 125, 126, 127, 128, 143 + 179, 180, 182, 44, 45, 156, 221, 200, 214, 19, + 233, 55, 56, 57, 58, 59, 182, 60, 61, 62, + 63, 46, 64, 127, 128, 129, 130, 145, 21, 192, + 142, 65, 66, 67, 68, 69, 2, 3, 70, 4, + -89, -18, -18, -18, 210, 211, 193, 194, 23, 71, + 72, 195, 196, 73, 74, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 145, 227, 143, 75, -39, -37, + 239, 76, 237, 222, 240, 183, 201, 24, 77, 55, + 27, 57, 58, 59, 5, 60, 61, 62, 63, 231, + 64, 25, 184, 185, 186, 187, 188, 189, 190, 65, + 66, 67, 68, 69, 248, 28, 55, 253, 57, 58, + 59, 254, 60, 61, 62, 63, 30, 64, 218, 33, + 13, 14, 15, 105, 106, 258, 65, 66, 129, 130, + 145, 35, 181, -74, -74, 75, 47, 252, 37, 76, + 40, 49, 50, 84, 51, 89, 92, 85, 91, 55, + 260, 57, 58, 59, 86, 60, 61, 62, 63, 90, + 64, 151, 75, 136, 64, 107, 76, 146, 198, 65, + 66, 205, 207, 92, 208, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 145, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 145, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 145, 75, 202, 213, 106, 76, + 215, 219, 228, 203, -127, 216, 92, 108, 109, 110, + 111, 112, 113, 114, 115, 217, 229, 230, 243, 238, + 244, 246, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 249, 251, + 10, 11, 256, 259, -127, 36, 147, 108, 109, 110, + 111, 112, 113, 114, 115, 234, 48, 158, 93, 0, + 250, 0, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 145, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 145, 0, 209, + 0, 0, 0, 0, 0, 0, 147, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 145, 0, 0, 0, + 0, 0, 0, 0, 0, 245, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 145, 122, 123, 0, 125, + 126, 127, 128, 129, 130, 145, 122, 123, 0, 0, + 126, 127, 128, 129, 130, 145, 122, 123, 0, 0, + 0, 127, 128, 129, 130, 145 }; static const yytype_int16 yycheck[] = { - 49, 70, 76, 48, 66, 74, 75, 76, 51, 52, - 12, 211, 20, 11, 16, 36, 78, 86, 218, 88, - 89, 90, 91, 30, 73, 39, 100, 72, 78, 36, - 141, 11, 82, 102, 17, 78, 75, 20, 107, 108, + 49, 70, 77, 11, 51, 52, 75, 76, 77, 51, + 52, 48, 78, 12, 80, 81, 67, 16, 87, 36, + 89, 90, 91, 92, 73, 74, 39, 102, 79, 20, + 143, 17, 79, 30, 20, 104, 73, 79, 11, 36, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 82, 11, 77, 73, 134, 49, 50, 179, 11, - 12, 13, 14, 15, 143, 17, 18, 19, 20, 77, - 22, 0, 1, 66, 3, 1, 5, 6, 7, 31, - 32, 33, 34, 35, 8, 11, 38, 6, 51, 52, - 78, 11, 151, 152, 82, 51, 52, 49, 50, 75, - 77, 53, 79, 80, 23, 24, 25, 26, 27, 28, - 29, 37, 21, 22, 66, 78, 51, 52, 70, 48, - 9, 11, 206, 76, 11, 77, 13, 14, 15, 75, - 17, 18, 19, 20, 12, 22, 10, 216, 65, 66, - 67, 68, 69, 76, 31, 32, 33, 34, 35, 17, - 75, 11, 231, 13, 14, 15, 74, 17, 18, 19, - 20, 20, 22, 4, 6, 5, 6, 7, 67, 68, - 69, 31, 32, 252, 22, 21, 80, 37, 80, 66, - 77, 23, 24, 70, 37, 244, 28, 29, 11, 77, - 77, 6, 78, 11, 22, 13, 14, 15, 257, 17, - 18, 19, 20, 11, 22, 78, 66, 82, 77, 36, - 70, 77, 77, 31, 32, 52, 17, 77, 75, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 20, - 11, 20, 78, 78, 77, 75, 78, 17, 66, 3, - 81, 77, 70, 3, 31, 38, 218, 37, 238, 77, - 40, 41, 42, 43, 44, 45, 46, 47, 106, -1, - 70, -1, -1, -1, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - -1, -1, -1, -1, -1, -1, 37, -1, 78, 40, - 41, 42, 43, 44, 45, 46, 47, -1, -1, -1, - -1, -1, -1, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, - 81, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 81, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, -1, -1, -1, -1, -1, -1, -1, -1, 78, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - -1, -1, -1, -1, -1, -1, -1, -1, 78, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, -1, - -1, -1, -1, -1, -1, -1, -1, 78, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 60, 61, - -1, 63, 64, 65, 66, 67, 68, 69, 60, 61, - -1, -1, 64, 65, 66, 67, 68, 69, 60, 61, - -1, -1, -1, 65, 66, 67, 68, 69 + 129, 130, 131, 49, 50, 78, 83, 136, 181, 76, + 78, 11, 12, 13, 14, 15, 145, 17, 18, 19, + 20, 67, 22, 66, 67, 68, 69, 70, 11, 6, + 1, 31, 32, 33, 34, 35, 0, 1, 38, 3, + 11, 5, 6, 7, 153, 154, 23, 24, 74, 49, + 50, 28, 29, 53, 54, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 213, 37, 67, 21, 22, + 79, 71, 220, 208, 83, 6, 82, 11, 78, 11, + 76, 13, 14, 15, 48, 17, 18, 19, 20, 218, + 22, 8, 23, 24, 25, 26, 27, 28, 29, 31, + 32, 33, 34, 35, 233, 9, 11, 79, 13, 14, + 15, 83, 17, 18, 19, 20, 11, 22, 4, 76, + 5, 6, 7, 51, 52, 254, 31, 32, 68, 69, + 70, 77, 37, 51, 52, 67, 77, 246, 12, 71, + 10, 76, 75, 20, 17, 81, 78, 22, 78, 11, + 259, 13, 14, 15, 21, 17, 18, 19, 20, 81, + 22, 11, 67, 78, 22, 37, 71, 79, 6, 31, + 32, 11, 79, 78, 83, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 67, 82, 36, 52, 71, + 78, 76, 17, 79, 37, 78, 78, 40, 41, 42, + 43, 44, 45, 46, 47, 78, 20, 20, 79, 11, + 79, 78, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 76, 17, + 3, 3, 79, 78, 37, 31, 79, 40, 41, 42, + 43, 44, 45, 46, 47, 220, 38, 108, 70, -1, + 240, -1, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, -1, 82, + -1, -1, -1, -1, -1, -1, 79, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, -1, -1, 79, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 61, 62, -1, 64, + 65, 66, 67, 68, 69, 70, 61, 62, -1, -1, + 65, 66, 67, 68, 69, 70, 61, 62, -1, -1, + -1, 66, 67, 68, 69, 70 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 84, 0, 1, 3, 48, 85, 86, 92, 72, - 85, 86, 20, 5, 6, 7, 93, 11, 87, 75, - 94, 11, 95, 73, 11, 8, 89, 75, 9, 90, - 11, 96, 97, 75, 88, 76, 97, 12, 98, 99, - 10, 91, 17, 20, 49, 50, 66, 76, 99, 75, - 74, 17, 100, 101, 102, 11, 12, 13, 14, 15, + 0, 85, 0, 1, 3, 48, 86, 87, 93, 73, + 86, 87, 20, 5, 6, 7, 94, 11, 88, 76, + 95, 11, 96, 74, 11, 8, 90, 76, 9, 91, + 11, 97, 98, 76, 89, 77, 98, 12, 99, 100, + 10, 92, 17, 20, 49, 50, 67, 77, 100, 76, + 75, 17, 101, 102, 103, 11, 12, 13, 14, 15, 17, 18, 19, 20, 22, 31, 32, 33, 34, 35, - 38, 49, 50, 53, 66, 70, 77, 109, 112, 113, - 114, 129, 130, 20, 22, 21, 30, 36, 80, 80, - 77, 77, 129, 130, 113, 130, 130, 113, 114, 130, - 77, 79, 80, 51, 52, 37, 40, 41, 42, 43, - 44, 45, 46, 47, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 103, 105, 107, 130, 77, 123, 130, 130, 130, 130, - 1, 37, 115, 69, 78, 78, 110, 111, 114, 11, - 130, 119, 118, 39, 77, 125, 112, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 37, - 130, 6, 23, 24, 25, 26, 27, 28, 29, 104, - 6, 23, 24, 28, 29, 106, 6, 108, 130, 81, - 81, 78, 125, 11, 120, 78, 82, 81, 113, 113, - 126, 36, 125, 77, 77, 77, 4, 75, 36, 82, - 114, 12, 16, 127, 128, 123, 17, 20, 20, 130, - 117, 77, 109, 121, 122, 123, 11, 78, 82, 66, - 78, 78, 78, 78, 77, 124, 130, 75, 128, 17, - 113, 78, 82, 116, 78, 78, 130, 77, 113, 78 + 38, 49, 50, 53, 54, 67, 71, 78, 110, 113, + 114, 115, 130, 131, 20, 22, 21, 30, 36, 81, + 81, 78, 78, 130, 131, 114, 114, 131, 131, 114, + 115, 131, 78, 80, 81, 51, 52, 37, 40, 41, + 42, 43, 44, 45, 46, 47, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 104, 106, 108, 131, 78, 124, 131, 131, + 131, 131, 1, 37, 116, 70, 79, 79, 111, 112, + 115, 11, 131, 120, 119, 39, 78, 126, 113, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 37, 131, 6, 23, 24, 25, 26, 27, 28, + 29, 105, 6, 23, 24, 28, 29, 107, 6, 109, + 131, 82, 82, 79, 126, 11, 121, 79, 83, 82, + 114, 114, 127, 36, 126, 78, 78, 78, 4, 76, + 36, 83, 115, 12, 16, 128, 129, 124, 17, 20, + 20, 131, 118, 78, 110, 122, 123, 124, 11, 79, + 83, 67, 79, 79, 79, 79, 78, 125, 131, 76, + 129, 17, 114, 79, 83, 117, 79, 79, 131, 78, + 114, 79 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 83, 84, 84, 84, 84, 84, 84, 84, 85, - 87, 88, 86, 89, 89, 90, 90, 91, 92, 92, - 93, 93, 94, 94, 95, 95, 96, 96, 97, 97, - 97, 97, 97, 98, 98, 100, 99, 101, 99, 102, - 99, 103, 103, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 104, 105, 105, 106, 106, 106, - 106, 106, 107, 107, 108, 109, 109, 109, 109, 110, - 110, 111, 111, 112, 113, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 114, 114, 114, 114, 115, - 116, 114, 117, 114, 114, 114, 114, 114, 118, 114, - 119, 114, 114, 114, 114, 114, 114, 114, 114, 114, - 120, 120, 121, 121, 122, 122, 123, 124, 124, 126, - 125, 125, 127, 127, 128, 128, 129, 129, 129, 129, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130 + 0, 84, 85, 85, 85, 85, 85, 85, 85, 86, + 88, 89, 87, 90, 90, 91, 91, 92, 93, 93, + 94, 94, 95, 95, 96, 96, 97, 97, 98, 98, + 98, 98, 98, 99, 99, 101, 100, 102, 100, 103, + 100, 104, 104, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 106, 106, 107, 107, 107, + 107, 107, 108, 108, 109, 110, 110, 110, 110, 111, + 111, 112, 112, 113, 114, 115, 115, 115, 115, 115, + 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, + 117, 115, 118, 115, 115, 115, 115, 115, 115, 119, + 115, 120, 115, 115, 115, 115, 115, 115, 115, 115, + 115, 121, 121, 122, 122, 123, 123, 124, 125, 125, + 127, 126, 126, 128, 128, 129, 129, 130, 130, 130, + 130, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 131, 131, 131, 131, 131, 131 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1257,13 +1245,13 @@ static const yytype_int8 yyr2[] = 1, 1, 0, 2, 1, 1, 3, 4, 4, 0, 1, 1, 3, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 0, - 0, 11, 0, 9, 3, 4, 5, 2, 0, 4, - 0, 4, 3, 3, 3, 3, 3, 3, 1, 3, - 1, 3, 1, 1, 3, 1, 5, 1, 3, 0, - 4, 1, 1, 3, 1, 1, 1, 1, 1, 1, - 3, 1, 1, 4, 1, 1, 1, 1, 4, 1, - 4, 1, 1, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 3, 3, 1 + 0, 11, 0, 9, 3, 4, 5, 2, 2, 0, + 4, 0, 4, 3, 3, 3, 3, 3, 3, 1, + 3, 1, 3, 1, 1, 3, 1, 5, 1, 3, + 0, 4, 1, 1, 3, 1, 1, 1, 1, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 1, 4, + 1, 4, 1, 1, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 2, 3, 3, 1 }; @@ -1342,9 +1330,9 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, void *yyscanner, YR_COMPILER* compiler) { FILE *yyoutput = yyo; - YY_USE (yyoutput); - YY_USE (yyscanner); - YY_USE (compiler); + YYUSE (yyoutput); + YYUSE (yyscanner); + YYUSE (compiler); if (!yyvaluep) return; # ifdef YYPRINT @@ -1352,7 +1340,7 @@ yy_symbol_value_print (FILE *yyo, YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YY_USE (yykind); + YYUSE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1466,9 +1454,9 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, void *yyscanner, YR_COMPILER* compiler) { - YY_USE (yyvaluep); - YY_USE (yyscanner); - YY_USE (compiler); + YYUSE (yyvaluep); + YYUSE (yyscanner); + YYUSE (compiler); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); @@ -1477,61 +1465,61 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL__IDENTIFIER_: /* "identifier" */ -#line 276 "grammar.y" +#line 278 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1483 "grammar.c" +#line 1471 "grammar.c" break; case YYSYMBOL__STRING_IDENTIFIER_: /* "string identifier" */ -#line 280 "grammar.y" +#line 282 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1489 "grammar.c" +#line 1477 "grammar.c" break; case YYSYMBOL__STRING_COUNT_: /* "string count" */ -#line 277 "grammar.y" +#line 279 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1495 "grammar.c" +#line 1483 "grammar.c" break; case YYSYMBOL__STRING_OFFSET_: /* "string offset" */ -#line 278 "grammar.y" +#line 280 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1501 "grammar.c" +#line 1489 "grammar.c" break; case YYSYMBOL__STRING_LENGTH_: /* "string length" */ -#line 279 "grammar.y" +#line 281 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1507 "grammar.c" +#line 1495 "grammar.c" break; case YYSYMBOL__STRING_IDENTIFIER_WITH_WILDCARD_: /* "string identifier with wildcard" */ -#line 281 "grammar.y" +#line 283 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1513 "grammar.c" +#line 1501 "grammar.c" break; case YYSYMBOL__TEXT_STRING_: /* "text string" */ -#line 282 "grammar.y" +#line 284 "grammar.y" { yr_free(((*yyvaluep).sized_string)); ((*yyvaluep).sized_string) = NULL; } -#line 1519 "grammar.c" +#line 1507 "grammar.c" break; case YYSYMBOL__HEX_STRING_: /* "hex string" */ -#line 283 "grammar.y" +#line 285 "grammar.y" { yr_free(((*yyvaluep).sized_string)); ((*yyvaluep).sized_string) = NULL; } -#line 1525 "grammar.c" +#line 1513 "grammar.c" break; case YYSYMBOL__REGEXP_: /* "regular expression" */ -#line 284 "grammar.y" +#line 286 "grammar.y" { yr_free(((*yyvaluep).sized_string)); ((*yyvaluep).sized_string) = NULL; } -#line 1531 "grammar.c" +#line 1519 "grammar.c" break; case YYSYMBOL_string_modifiers: /* string_modifiers */ -#line 297 "grammar.y" +#line 299 "grammar.y" { if (((*yyvaluep).modifier).alphabet != NULL) { @@ -1539,11 +1527,11 @@ yydestruct (const char *yymsg, ((*yyvaluep).modifier).alphabet = NULL; } } -#line 1543 "grammar.c" +#line 1531 "grammar.c" break; case YYSYMBOL_string_modifier: /* string_modifier */ -#line 289 "grammar.y" +#line 291 "grammar.y" { if (((*yyvaluep).modifier).alphabet != NULL) { @@ -1551,19 +1539,19 @@ yydestruct (const char *yymsg, ((*yyvaluep).modifier).alphabet = NULL; } } -#line 1555 "grammar.c" +#line 1543 "grammar.c" break; case YYSYMBOL_arguments: /* arguments */ -#line 286 "grammar.y" +#line 288 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1561 "grammar.c" +#line 1549 "grammar.c" break; case YYSYMBOL_arguments_list: /* arguments_list */ -#line 287 "grammar.y" +#line 289 "grammar.y" { yr_free(((*yyvaluep).c_string)); ((*yyvaluep).c_string) = NULL; } -#line 1567 "grammar.c" +#line 1555 "grammar.c" break; default: @@ -1835,15 +1823,15 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); switch (yyn) { case 8: /* rules: rules "end of included file" */ -#line 331 "grammar.y" +#line 333 "grammar.y" { _yr_compiler_pop_file_name(compiler); } -#line 1843 "grammar.c" +#line 1831 "grammar.c" break; case 9: /* import: "" "text string" */ -#line 339 "grammar.y" +#line 341 "grammar.y" { int result = yr_parser_reduce_import(yyscanner, (yyvsp[0].sized_string)); @@ -1851,20 +1839,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 1855 "grammar.c" +#line 1843 "grammar.c" break; case 10: /* @1: %empty */ -#line 351 "grammar.y" +#line 353 "grammar.y" { fail_if_error(yr_parser_reduce_rule_declaration_phase_1( yyscanner, (int32_t) (yyvsp[-2].integer), (yyvsp[0].c_string), &(yyval.rule))); } -#line 1864 "grammar.c" +#line 1852 "grammar.c" break; case 11: /* $@2: %empty */ -#line 356 "grammar.y" +#line 358 "grammar.y" { YR_RULE* rule = (YR_RULE*) yr_arena_ref_to_ptr( compiler->arena, &(yyvsp[-4].rule)); @@ -1878,11 +1866,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); rule->strings = (YR_STRING*) yr_arena_ref_to_ptr( compiler->arena, &(yyvsp[0].string)); } -#line 1882 "grammar.c" +#line 1870 "grammar.c" break; case 12: /* rule: rule_modifiers "" "identifier" @1 tags '{' meta strings $@2 condition '}' */ -#line 370 "grammar.y" +#line 372 "grammar.y" { int result = yr_parser_reduce_rule_declaration_phase_2( yyscanner, &(yyvsp[-7].rule)); // rule created in phase 1 @@ -1891,19 +1879,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 1895 "grammar.c" +#line 1883 "grammar.c" break; case 13: /* meta: %empty */ -#line 383 "grammar.y" +#line 385 "grammar.y" { (yyval.meta) = YR_ARENA_NULL_REF; } -#line 1903 "grammar.c" +#line 1891 "grammar.c" break; case 14: /* meta: "" ':' meta_declarations */ -#line 387 "grammar.y" +#line 389 "grammar.y" { YR_META* meta = yr_arena_get_ptr( compiler->arena, @@ -1914,19 +1902,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.meta) = (yyvsp[0].meta); } -#line 1918 "grammar.c" +#line 1906 "grammar.c" break; case 15: /* strings: %empty */ -#line 402 "grammar.y" +#line 404 "grammar.y" { (yyval.string) = YR_ARENA_NULL_REF; } -#line 1926 "grammar.c" +#line 1914 "grammar.c" break; case 16: /* strings: "" ':' string_declarations */ -#line 406 "grammar.y" +#line 408 "grammar.y" { YR_STRING* string = (YR_STRING*) yr_arena_get_ptr( compiler->arena, @@ -1937,43 +1925,43 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.string) = (yyvsp[0].string); } -#line 1941 "grammar.c" +#line 1929 "grammar.c" break; case 18: /* rule_modifiers: %empty */ -#line 425 "grammar.y" +#line 427 "grammar.y" { (yyval.integer) = 0; } -#line 1947 "grammar.c" +#line 1935 "grammar.c" break; case 19: /* rule_modifiers: rule_modifiers rule_modifier */ -#line 426 "grammar.y" +#line 428 "grammar.y" { (yyval.integer) = (yyvsp[-1].integer) | (yyvsp[0].integer); } -#line 1953 "grammar.c" +#line 1941 "grammar.c" break; case 20: /* rule_modifier: "" */ -#line 431 "grammar.y" +#line 433 "grammar.y" { (yyval.integer) = RULE_FLAGS_PRIVATE; } -#line 1959 "grammar.c" +#line 1947 "grammar.c" break; case 21: /* rule_modifier: "" */ -#line 432 "grammar.y" +#line 434 "grammar.y" { (yyval.integer) = RULE_FLAGS_GLOBAL; } -#line 1965 "grammar.c" +#line 1953 "grammar.c" break; case 22: /* tags: %empty */ -#line 438 "grammar.y" +#line 440 "grammar.y" { (yyval.tag) = YR_ARENA_NULL_REF; } -#line 1973 "grammar.c" +#line 1961 "grammar.c" break; case 23: /* tags: ':' tag_list */ -#line 442 "grammar.y" +#line 444 "grammar.y" { // Tags list is represented in the arena as a sequence // of null-terminated strings, the sequence ends with an @@ -1985,11 +1973,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.tag) = (yyvsp[0].tag); } -#line 1989 "grammar.c" +#line 1977 "grammar.c" break; case 24: /* tag_list: "identifier" */ -#line 458 "grammar.y" +#line 460 "grammar.y" { int result = yr_arena_write_string( yyget_extra(yyscanner)->arena, YR_SZ_POOL, (yyvsp[0].c_string), &(yyval.tag)); @@ -1998,11 +1986,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2002 "grammar.c" +#line 1990 "grammar.c" break; case 25: /* tag_list: tag_list "identifier" */ -#line 467 "grammar.y" +#line 469 "grammar.y" { YR_ARENA_REF ref; @@ -2039,23 +2027,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.tag) = (yyvsp[-1].tag); } -#line 2043 "grammar.c" +#line 2031 "grammar.c" break; case 26: /* meta_declarations: meta_declaration */ -#line 508 "grammar.y" +#line 510 "grammar.y" { (yyval.meta) = (yyvsp[0].meta); } -#line 2049 "grammar.c" +#line 2037 "grammar.c" break; case 27: /* meta_declarations: meta_declarations meta_declaration */ -#line 509 "grammar.y" +#line 511 "grammar.y" { (yyval.meta) = (yyvsp[-1].meta); } -#line 2055 "grammar.c" +#line 2043 "grammar.c" break; case 28: /* meta_declaration: "identifier" '=' "text string" */ -#line 515 "grammar.y" +#line 517 "grammar.y" { SIZED_STRING* sized_string = (yyvsp[0].sized_string); @@ -2072,11 +2060,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2076 "grammar.c" +#line 2064 "grammar.c" break; case 29: /* meta_declaration: "identifier" '=' "integer number" */ -#line 532 "grammar.y" +#line 534 "grammar.y" { int result = yr_parser_reduce_meta_declaration( yyscanner, @@ -2090,11 +2078,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2094 "grammar.c" +#line 2082 "grammar.c" break; case 30: /* meta_declaration: "identifier" '=' '-' "integer number" */ -#line 546 "grammar.y" +#line 548 "grammar.y" { int result = yr_parser_reduce_meta_declaration( yyscanner, @@ -2108,11 +2096,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2112 "grammar.c" +#line 2100 "grammar.c" break; case 31: /* meta_declaration: "identifier" '=' "" */ -#line 560 "grammar.y" +#line 562 "grammar.y" { int result = yr_parser_reduce_meta_declaration( yyscanner, @@ -2126,11 +2114,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2130 "grammar.c" +#line 2118 "grammar.c" break; case 32: /* meta_declaration: "identifier" '=' "" */ -#line 574 "grammar.y" +#line 576 "grammar.y" { int result = yr_parser_reduce_meta_declaration( yyscanner, @@ -2144,31 +2132,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2148 "grammar.c" +#line 2136 "grammar.c" break; case 33: /* string_declarations: string_declaration */ -#line 591 "grammar.y" +#line 593 "grammar.y" { (yyval.string) = (yyvsp[0].string); } -#line 2154 "grammar.c" +#line 2142 "grammar.c" break; case 34: /* string_declarations: string_declarations string_declaration */ -#line 592 "grammar.y" +#line 594 "grammar.y" { (yyval.string) = (yyvsp[-1].string); } -#line 2160 "grammar.c" +#line 2148 "grammar.c" break; case 35: /* $@3: %empty */ -#line 598 "grammar.y" +#line 600 "grammar.y" { compiler->current_line = yyget_lineno(yyscanner); } -#line 2168 "grammar.c" +#line 2156 "grammar.c" break; case 36: /* string_declaration: "string identifier" '=' $@3 "text string" string_modifiers */ -#line 602 "grammar.y" +#line 604 "grammar.y" { int result = yr_parser_reduce_string_declaration( yyscanner, (yyvsp[0].modifier), (yyvsp[-4].c_string), (yyvsp[-1].sized_string), &(yyval.string)); @@ -2180,19 +2168,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); compiler->current_line = 0; } -#line 2184 "grammar.c" +#line 2172 "grammar.c" break; case 37: /* $@4: %empty */ -#line 614 "grammar.y" +#line 616 "grammar.y" { compiler->current_line = yyget_lineno(yyscanner); } -#line 2192 "grammar.c" +#line 2180 "grammar.c" break; case 38: /* string_declaration: "string identifier" '=' $@4 "regular expression" regexp_modifiers */ -#line 618 "grammar.y" +#line 620 "grammar.y" { int result; @@ -2208,19 +2196,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); compiler->current_line = 0; } -#line 2212 "grammar.c" +#line 2200 "grammar.c" break; case 39: /* $@5: %empty */ -#line 634 "grammar.y" +#line 636 "grammar.y" { compiler->current_line = yyget_lineno(yyscanner); } -#line 2220 "grammar.c" +#line 2208 "grammar.c" break; case 40: /* string_declaration: "string identifier" '=' $@5 "hex string" hex_modifiers */ -#line 638 "grammar.y" +#line 640 "grammar.y" { int result; @@ -2236,22 +2224,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); compiler->current_line = 0; } -#line 2240 "grammar.c" +#line 2228 "grammar.c" break; case 41: /* string_modifiers: %empty */ -#line 658 "grammar.y" +#line 660 "grammar.y" { (yyval.modifier).flags = 0; (yyval.modifier).xor_min = 0; (yyval.modifier).xor_max = 0; (yyval.modifier).alphabet = NULL; } -#line 2251 "grammar.c" +#line 2239 "grammar.c" break; case 42: /* string_modifiers: string_modifiers string_modifier */ -#line 665 "grammar.y" +#line 667 "grammar.y" { (yyval.modifier) = (yyvsp[-1].modifier); @@ -2307,51 +2295,51 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).flags = (yyval.modifier).flags | (yyvsp[0].modifier).flags; } } -#line 2311 "grammar.c" +#line 2299 "grammar.c" break; case 43: /* string_modifier: "" */ -#line 724 "grammar.y" +#line 726 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_WIDE; } -#line 2317 "grammar.c" +#line 2305 "grammar.c" break; case 44: /* string_modifier: "" */ -#line 725 "grammar.y" +#line 727 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_ASCII; } -#line 2323 "grammar.c" +#line 2311 "grammar.c" break; case 45: /* string_modifier: "" */ -#line 726 "grammar.y" +#line 728 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_NO_CASE; } -#line 2329 "grammar.c" +#line 2317 "grammar.c" break; case 46: /* string_modifier: "" */ -#line 727 "grammar.y" +#line 729 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_FULL_WORD; } -#line 2335 "grammar.c" +#line 2323 "grammar.c" break; case 47: /* string_modifier: "" */ -#line 728 "grammar.y" +#line 730 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_PRIVATE; } -#line 2341 "grammar.c" +#line 2329 "grammar.c" break; case 48: /* string_modifier: "" */ -#line 730 "grammar.y" +#line 732 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_XOR; (yyval.modifier).xor_min = 0; (yyval.modifier).xor_max = 255; } -#line 2351 "grammar.c" +#line 2339 "grammar.c" break; case 49: /* string_modifier: "" '(' "integer number" ')' */ -#line 736 "grammar.y" +#line 738 "grammar.y" { int result = ERROR_SUCCESS; @@ -2367,11 +2355,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).xor_min = (uint8_t) (yyvsp[-1].integer); (yyval.modifier).xor_max = (uint8_t) (yyvsp[-1].integer); } -#line 2371 "grammar.c" +#line 2359 "grammar.c" break; case 50: /* string_modifier: "" '(' "integer number" '-' "integer number" ')' */ -#line 757 "grammar.y" +#line 759 "grammar.y" { int result = ERROR_SUCCESS; @@ -2402,20 +2390,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).xor_min = (uint8_t) (yyvsp[-3].integer); (yyval.modifier).xor_max = (uint8_t) (yyvsp[-1].integer); } -#line 2406 "grammar.c" +#line 2394 "grammar.c" break; case 51: /* string_modifier: "" */ -#line 788 "grammar.y" +#line 790 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_BASE64; (yyval.modifier).alphabet = ss_new(DEFAULT_BASE64_ALPHABET); } -#line 2415 "grammar.c" +#line 2403 "grammar.c" break; case 52: /* string_modifier: "" '(' "text string" ')' */ -#line 793 "grammar.y" +#line 795 "grammar.y" { int result = ERROR_SUCCESS; @@ -2432,20 +2420,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).flags = STRING_FLAGS_BASE64; (yyval.modifier).alphabet = (yyvsp[-1].sized_string); } -#line 2436 "grammar.c" +#line 2424 "grammar.c" break; case 53: /* string_modifier: "" */ -#line 810 "grammar.y" +#line 812 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_BASE64_WIDE; (yyval.modifier).alphabet = ss_new(DEFAULT_BASE64_ALPHABET); } -#line 2445 "grammar.c" +#line 2433 "grammar.c" break; case 54: /* string_modifier: "" '(' "text string" ')' */ -#line 815 "grammar.y" +#line 817 "grammar.y" { int result = ERROR_SUCCESS; @@ -2462,17 +2450,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).flags = STRING_FLAGS_BASE64_WIDE; (yyval.modifier).alphabet = (yyvsp[-1].sized_string); } -#line 2466 "grammar.c" +#line 2454 "grammar.c" break; case 55: /* regexp_modifiers: %empty */ -#line 834 "grammar.y" +#line 836 "grammar.y" { (yyval.modifier).flags = 0; } -#line 2472 "grammar.c" +#line 2460 "grammar.c" break; case 56: /* regexp_modifiers: regexp_modifiers regexp_modifier */ -#line 836 "grammar.y" +#line 838 "grammar.y" { if ((yyvsp[-1].modifier).flags & (yyvsp[0].modifier).flags) { @@ -2483,47 +2471,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).flags = (yyvsp[-1].modifier).flags | (yyvsp[0].modifier).flags; } } -#line 2487 "grammar.c" +#line 2475 "grammar.c" break; case 57: /* regexp_modifier: "" */ -#line 849 "grammar.y" +#line 851 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_WIDE; } -#line 2493 "grammar.c" +#line 2481 "grammar.c" break; case 58: /* regexp_modifier: "" */ -#line 850 "grammar.y" +#line 852 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_ASCII; } -#line 2499 "grammar.c" +#line 2487 "grammar.c" break; case 59: /* regexp_modifier: "" */ -#line 851 "grammar.y" +#line 853 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_NO_CASE; } -#line 2505 "grammar.c" +#line 2493 "grammar.c" break; case 60: /* regexp_modifier: "" */ -#line 852 "grammar.y" +#line 854 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_FULL_WORD; } -#line 2511 "grammar.c" +#line 2499 "grammar.c" break; case 61: /* regexp_modifier: "" */ -#line 853 "grammar.y" +#line 855 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_PRIVATE; } -#line 2517 "grammar.c" +#line 2505 "grammar.c" break; case 62: /* hex_modifiers: %empty */ -#line 857 "grammar.y" +#line 859 "grammar.y" { (yyval.modifier).flags = 0; } -#line 2523 "grammar.c" +#line 2511 "grammar.c" break; case 63: /* hex_modifiers: hex_modifiers hex_modifier */ -#line 859 "grammar.y" +#line 861 "grammar.y" { if ((yyvsp[-1].modifier).flags & (yyvsp[0].modifier).flags) { @@ -2534,17 +2522,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.modifier).flags = (yyvsp[-1].modifier).flags | (yyvsp[0].modifier).flags; } } -#line 2538 "grammar.c" +#line 2526 "grammar.c" break; case 64: /* hex_modifier: "" */ -#line 872 "grammar.y" +#line 874 "grammar.y" { (yyval.modifier).flags = STRING_FLAGS_PRIVATE; } -#line 2544 "grammar.c" +#line 2532 "grammar.c" break; case 65: /* identifier: "identifier" */ -#line 877 "grammar.y" +#line 879 "grammar.y" { YR_EXPRESSION expr; @@ -2639,11 +2627,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2643 "grammar.c" +#line 2631 "grammar.c" break; case 66: /* identifier: identifier '.' "identifier" */ -#line 972 "grammar.y" +#line 974 "grammar.y" { int result = ERROR_SUCCESS; YR_OBJECT* field = NULL; @@ -2691,11 +2679,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2695 "grammar.c" +#line 2683 "grammar.c" break; case 67: /* identifier: identifier '[' primary_expression ']' */ -#line 1020 "grammar.y" +#line 1022 "grammar.y" { int result = ERROR_SUCCESS; YR_OBJECT_ARRAY* array; @@ -2755,11 +2743,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2759 "grammar.c" +#line 2747 "grammar.c" break; case 68: /* identifier: identifier '(' arguments ')' */ -#line 1081 "grammar.y" +#line 1083 "grammar.y" { YR_ARENA_REF ref; int result = ERROR_SUCCESS; @@ -2802,23 +2790,23 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 2806 "grammar.c" +#line 2794 "grammar.c" break; case 69: /* arguments: %empty */ -#line 1127 "grammar.y" +#line 1129 "grammar.y" { (yyval.c_string) = yr_strdup(""); } -#line 2812 "grammar.c" +#line 2800 "grammar.c" break; case 70: /* arguments: arguments_list */ -#line 1128 "grammar.y" +#line 1130 "grammar.y" { (yyval.c_string) = (yyvsp[0].c_string); } -#line 2818 "grammar.c" +#line 2806 "grammar.c" break; case 71: /* arguments_list: expression */ -#line 1133 "grammar.y" +#line 1135 "grammar.y" { (yyval.c_string) = (char*) yr_malloc(YR_MAX_FUNCTION_ARGS + 1); @@ -2853,11 +2841,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); assert(compiler->last_error != ERROR_SUCCESS); } } -#line 2857 "grammar.c" +#line 2845 "grammar.c" break; case 72: /* arguments_list: arguments_list ',' expression */ -#line 1168 "grammar.y" +#line 1170 "grammar.y" { int result = ERROR_SUCCESS; @@ -2906,11 +2894,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.c_string) = (yyvsp[-2].c_string); } -#line 2910 "grammar.c" +#line 2898 "grammar.c" break; case 73: /* regexp: "regular expression" */ -#line 1221 "grammar.y" +#line 1223 "grammar.y" { YR_ARENA_REF re_ref; RE_ERROR error; @@ -2948,11 +2936,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_REGEXP; } -#line 2952 "grammar.c" +#line 2940 "grammar.c" break; case 74: /* boolean_expression: expression */ -#line 1263 "grammar.y" +#line 1265 "grammar.y" { if ((yyvsp[0].expression).type == EXPRESSION_TYPE_STRING) { @@ -2972,31 +2960,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 2976 "grammar.c" +#line 2964 "grammar.c" break; case 75: /* expression: "" */ -#line 1286 "grammar.y" +#line 1288 "grammar.y" { fail_if_error(yr_parser_emit_push_const(yyscanner, 1)); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 2986 "grammar.c" +#line 2974 "grammar.c" break; case 76: /* expression: "" */ -#line 1292 "grammar.y" +#line 1294 "grammar.y" { fail_if_error(yr_parser_emit_push_const(yyscanner, 0)); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 2996 "grammar.c" +#line 2984 "grammar.c" break; case 77: /* expression: primary_expression "" regexp */ -#line 1298 "grammar.y" +#line 1300 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "matches"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_REGEXP, "matches"); @@ -3008,11 +2996,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3012 "grammar.c" +#line 3000 "grammar.c" break; case 78: /* expression: primary_expression "" primary_expression */ -#line 1310 "grammar.y" +#line 1312 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "contains"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "contains"); @@ -3022,11 +3010,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3026 "grammar.c" +#line 3014 "grammar.c" break; case 79: /* expression: primary_expression "" primary_expression */ -#line 1320 "grammar.y" +#line 1322 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "icontains"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "icontains"); @@ -3036,11 +3024,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3040 "grammar.c" +#line 3028 "grammar.c" break; case 80: /* expression: primary_expression "" primary_expression */ -#line 1330 "grammar.y" +#line 1332 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "startswith"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "startswith"); @@ -3050,11 +3038,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3054 "grammar.c" +#line 3042 "grammar.c" break; case 81: /* expression: primary_expression "" primary_expression */ -#line 1340 "grammar.y" +#line 1342 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "istartswith"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "istartswith"); @@ -3064,11 +3052,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3068 "grammar.c" +#line 3056 "grammar.c" break; case 82: /* expression: primary_expression "" primary_expression */ -#line 1350 "grammar.y" +#line 1352 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "endswith"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "endswith"); @@ -3078,11 +3066,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3082 "grammar.c" +#line 3070 "grammar.c" break; case 83: /* expression: primary_expression "" primary_expression */ -#line 1360 "grammar.y" +#line 1362 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "iendswith"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "iendswith"); @@ -3092,11 +3080,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3096 "grammar.c" +#line 3084 "grammar.c" break; case 84: /* expression: primary_expression "" primary_expression */ -#line 1370 "grammar.y" +#line 1372 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_STRING, "iequals"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_STRING, "iequals"); @@ -3106,11 +3094,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3110 "grammar.c" +#line 3098 "grammar.c" break; case 85: /* expression: "string identifier" */ -#line 1380 "grammar.y" +#line 1382 "grammar.y" { int result = yr_parser_reduce_string_identifier( yyscanner, @@ -3124,11 +3112,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3128 "grammar.c" +#line 3116 "grammar.c" break; case 86: /* expression: "string identifier" "" primary_expression */ -#line 1394 "grammar.y" +#line 1396 "grammar.y" { int result; @@ -3143,11 +3131,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3147 "grammar.c" +#line 3135 "grammar.c" break; case 87: /* expression: "string identifier" "" range */ -#line 1409 "grammar.y" +#line 1411 "grammar.y" { int result = yr_parser_reduce_string_identifier( yyscanner, (yyvsp[-2].c_string), OP_FOUND_IN, YR_UNDEFINED); @@ -3158,11 +3146,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3162 "grammar.c" +#line 3150 "grammar.c" break; case 88: /* expression: "" for_expression error */ -#line 1420 "grammar.y" +#line 1422 "grammar.y" { // Free all the loop variable identifiers, including the variables for // the current loop (represented by loop_index), and set loop_index to @@ -3179,11 +3167,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); compiler->loop_index = -1; YYERROR; } -#line 3183 "grammar.c" +#line 3171 "grammar.c" break; case 89: /* $@6: %empty */ -#line 1496 "grammar.y" +#line 1498 "grammar.y" { // var_frame is used for accessing local variables used in this loop. // All local variables are accessed using var_frame as a reference, @@ -3221,11 +3209,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(yr_parser_emit_with_arg( yyscanner, OP_POP_M, var_frame + 2, NULL, NULL)); } -#line 3225 "grammar.c" +#line 3213 "grammar.c" break; case 90: /* $@7: %empty */ -#line 1534 "grammar.y" +#line 1536 "grammar.y" { YR_LOOP_CONTEXT* loop_ctx = &compiler->loop[compiler->loop_index]; YR_FIXUP* fixup; @@ -3274,11 +3262,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); loop_ctx->start_ref = loop_start_ref; } -#line 3278 "grammar.c" +#line 3266 "grammar.c" break; case 91: /* expression: "" for_expression $@6 for_variables "" iterator ':' $@7 '(' boolean_expression ')' */ -#line 1583 "grammar.y" +#line 1585 "grammar.y" { int32_t jmp_offset; YR_FIXUP* fixup; @@ -3388,11 +3376,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3392 "grammar.c" +#line 3380 "grammar.c" break; case 92: /* $@8: %empty */ -#line 1693 "grammar.y" +#line 1695 "grammar.y" { YR_ARENA_REF ref; @@ -3427,11 +3415,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); compiler->loop[compiler->loop_index].vars_internal_count = \ YR_INTERNAL_LOOP_VARS; } -#line 3431 "grammar.c" +#line 3419 "grammar.c" break; case 93: /* expression: "" for_expression "" string_set ':' $@8 '(' boolean_expression ')' */ -#line 1728 "grammar.y" +#line 1730 "grammar.y" { int var_frame = 0; @@ -3486,21 +3474,21 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3490 "grammar.c" +#line 3478 "grammar.c" break; case 94: /* expression: for_expression "" string_set */ -#line 1783 "grammar.y" +#line 1785 "grammar.y" { yr_parser_emit(yyscanner, OP_OF, NULL); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3500 "grammar.c" +#line 3488 "grammar.c" break; case 95: /* expression: primary_expression '%' "" string_set */ -#line 1789 "grammar.y" +#line 1791 "grammar.y" { check_type((yyvsp[-3].expression), EXPRESSION_TYPE_INTEGER, "%"); @@ -3520,31 +3508,40 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); yr_parser_emit(yyscanner, OP_OF_PERCENT, NULL); } -#line 3524 "grammar.c" +#line 3512 "grammar.c" break; case 96: /* expression: for_expression "" string_set "" range */ -#line 1809 "grammar.y" +#line 1811 "grammar.y" { yr_parser_emit(yyscanner, OP_OF_FOUND_IN, NULL); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3534 "grammar.c" +#line 3522 "grammar.c" break; case 97: /* expression: "" boolean_expression */ -#line 1815 "grammar.y" +#line 1817 "grammar.y" { yr_parser_emit(yyscanner, OP_NOT, NULL); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3544 "grammar.c" +#line 3532 "grammar.c" + break; + + case 98: /* expression: "" boolean_expression */ +#line 1823 "grammar.y" + { + yr_parser_emit(yyscanner, OP_DEFINED, NULL); + (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; + } +#line 3541 "grammar.c" break; - case 98: /* $@9: %empty */ -#line 1821 "grammar.y" + case 99: /* $@9: %empty */ +#line 1828 "grammar.y" { YR_FIXUP* fixup; YR_ARENA_REF jmp_offset_ref; @@ -3566,11 +3563,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fixup->next = compiler->fixup_stack_head; compiler->fixup_stack_head = fixup; } -#line 3570 "grammar.c" +#line 3567 "grammar.c" break; - case 99: /* expression: boolean_expression "" $@9 boolean_expression */ -#line 1843 "grammar.y" + case 100: /* expression: boolean_expression "" $@9 boolean_expression */ +#line 1850 "grammar.y" { YR_FIXUP* fixup; @@ -3593,11 +3590,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3597 "grammar.c" +#line 3594 "grammar.c" break; - case 100: /* $@10: %empty */ -#line 1866 "grammar.y" + case 101: /* $@10: %empty */ +#line 1873 "grammar.y" { YR_FIXUP* fixup; YR_ARENA_REF jmp_offset_ref; @@ -3618,11 +3615,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fixup->next = compiler->fixup_stack_head; compiler->fixup_stack_head = fixup; } -#line 3622 "grammar.c" +#line 3619 "grammar.c" break; - case 101: /* expression: boolean_expression "" $@10 boolean_expression */ -#line 1887 "grammar.y" + case 102: /* expression: boolean_expression "" $@10 boolean_expression */ +#line 1894 "grammar.y" { YR_FIXUP* fixup; @@ -3645,93 +3642,93 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3649 "grammar.c" +#line 3646 "grammar.c" break; - case 102: /* expression: primary_expression "<" primary_expression */ -#line 1910 "grammar.y" + case 103: /* expression: primary_expression "<" primary_expression */ +#line 1917 "grammar.y" { fail_if_error(yr_parser_reduce_operation( yyscanner, "<", (yyvsp[-2].expression), (yyvsp[0].expression))); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3660 "grammar.c" +#line 3657 "grammar.c" break; - case 103: /* expression: primary_expression ">" primary_expression */ -#line 1917 "grammar.y" + case 104: /* expression: primary_expression ">" primary_expression */ +#line 1924 "grammar.y" { fail_if_error(yr_parser_reduce_operation( yyscanner, ">", (yyvsp[-2].expression), (yyvsp[0].expression))); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3671 "grammar.c" +#line 3668 "grammar.c" break; - case 104: /* expression: primary_expression "<=" primary_expression */ -#line 1924 "grammar.y" + case 105: /* expression: primary_expression "<=" primary_expression */ +#line 1931 "grammar.y" { fail_if_error(yr_parser_reduce_operation( yyscanner, "<=", (yyvsp[-2].expression), (yyvsp[0].expression))); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3682 "grammar.c" +#line 3679 "grammar.c" break; - case 105: /* expression: primary_expression ">=" primary_expression */ -#line 1931 "grammar.y" + case 106: /* expression: primary_expression ">=" primary_expression */ +#line 1938 "grammar.y" { fail_if_error(yr_parser_reduce_operation( yyscanner, ">=", (yyvsp[-2].expression), (yyvsp[0].expression))); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3693 "grammar.c" +#line 3690 "grammar.c" break; - case 106: /* expression: primary_expression "==" primary_expression */ -#line 1938 "grammar.y" + case 107: /* expression: primary_expression "==" primary_expression */ +#line 1945 "grammar.y" { fail_if_error(yr_parser_reduce_operation( yyscanner, "==", (yyvsp[-2].expression), (yyvsp[0].expression))); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3704 "grammar.c" +#line 3701 "grammar.c" break; - case 107: /* expression: primary_expression "!=" primary_expression */ -#line 1945 "grammar.y" + case 108: /* expression: primary_expression "!=" primary_expression */ +#line 1952 "grammar.y" { fail_if_error(yr_parser_reduce_operation( yyscanner, "!=", (yyvsp[-2].expression), (yyvsp[0].expression))); (yyval.expression).type = EXPRESSION_TYPE_BOOLEAN; } -#line 3715 "grammar.c" +#line 3712 "grammar.c" break; - case 108: /* expression: primary_expression */ -#line 1952 "grammar.y" + case 109: /* expression: primary_expression */ +#line 1959 "grammar.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 3723 "grammar.c" +#line 3720 "grammar.c" break; - case 109: /* expression: '(' expression ')' */ -#line 1956 "grammar.y" + case 110: /* expression: '(' expression ')' */ +#line 1963 "grammar.y" { (yyval.expression) = (yyvsp[-1].expression); } -#line 3731 "grammar.c" +#line 3728 "grammar.c" break; - case 110: /* for_variables: "identifier" */ -#line 1964 "grammar.y" + case 111: /* for_variables: "identifier" */ +#line 1971 "grammar.y" { int result = ERROR_SUCCESS; @@ -3751,11 +3748,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); assert(loop_ctx->vars_count <= YR_MAX_LOOP_VARS); } -#line 3755 "grammar.c" +#line 3752 "grammar.c" break; - case 111: /* for_variables: for_variables ',' "identifier" */ -#line 1984 "grammar.y" + case 112: /* for_variables: for_variables ',' "identifier" */ +#line 1991 "grammar.y" { int result = ERROR_SUCCESS; @@ -3780,11 +3777,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); loop_ctx->vars[loop_ctx->vars_count++].identifier.ptr = (yyvsp[0].c_string); } -#line 3784 "grammar.c" +#line 3781 "grammar.c" break; - case 112: /* iterator: identifier */ -#line 2012 "grammar.y" + case 113: /* iterator: identifier */ +#line 2019 "grammar.y" { YR_LOOP_CONTEXT* loop_ctx = &compiler->loop[compiler->loop_index]; @@ -3858,11 +3855,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 3862 "grammar.c" +#line 3859 "grammar.c" break; - case 113: /* iterator: integer_set */ -#line 2086 "grammar.y" + case 114: /* iterator: integer_set */ +#line 2093 "grammar.y" { int result = ERROR_SUCCESS; @@ -3886,11 +3883,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 3890 "grammar.c" +#line 3887 "grammar.c" break; - case 114: /* integer_set: '(' integer_enumeration ')' */ -#line 2114 "grammar.y" + case 115: /* integer_set: '(' integer_enumeration ')' */ +#line 2121 "grammar.y" { // $2 contains the number of integers in the enumeration fail_if_error(yr_parser_emit_push_const(yyscanner, (yyvsp[-1].integer))); @@ -3898,20 +3895,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(yr_parser_emit( yyscanner, OP_ITER_START_INT_ENUM, NULL)); } -#line 3902 "grammar.c" +#line 3899 "grammar.c" break; - case 115: /* integer_set: range */ -#line 2122 "grammar.y" + case 116: /* integer_set: range */ +#line 2129 "grammar.y" { fail_if_error(yr_parser_emit( yyscanner, OP_ITER_START_INT_RANGE, NULL)); } -#line 3911 "grammar.c" +#line 3908 "grammar.c" break; - case 116: /* range: '(' primary_expression ".." primary_expression ')' */ -#line 2131 "grammar.y" + case 117: /* range: '(' primary_expression ".." primary_expression ')' */ +#line 2138 "grammar.y" { int result = ERROR_SUCCESS; @@ -3931,11 +3928,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 3935 "grammar.c" +#line 3932 "grammar.c" break; - case 117: /* integer_enumeration: primary_expression */ -#line 2155 "grammar.y" + case 118: /* integer_enumeration: primary_expression */ +#line 2162 "grammar.y" { int result = ERROR_SUCCESS; @@ -3950,11 +3947,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.integer) = 1; } -#line 3954 "grammar.c" +#line 3951 "grammar.c" break; - case 118: /* integer_enumeration: integer_enumeration ',' primary_expression */ -#line 2170 "grammar.y" + case 119: /* integer_enumeration: integer_enumeration ',' primary_expression */ +#line 2177 "grammar.y" { int result = ERROR_SUCCESS; @@ -3969,96 +3966,96 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.integer) = (yyvsp[-2].integer) + 1; } -#line 3973 "grammar.c" +#line 3970 "grammar.c" break; - case 119: /* $@11: %empty */ -#line 2189 "grammar.y" + case 120: /* $@11: %empty */ +#line 2196 "grammar.y" { // Push end-of-list marker yr_parser_emit_push_const(yyscanner, YR_UNDEFINED); } -#line 3982 "grammar.c" +#line 3979 "grammar.c" break; - case 121: /* string_set: "" */ -#line 2195 "grammar.y" + case 122: /* string_set: "" */ +#line 2202 "grammar.y" { fail_if_error(yr_parser_emit_push_const(yyscanner, YR_UNDEFINED)); fail_if_error(yr_parser_emit_pushes_for_strings( yyscanner, "$*")); } -#line 3993 "grammar.c" +#line 3990 "grammar.c" break; - case 124: /* string_enumeration_item: "string identifier" */ -#line 2212 "grammar.y" + case 125: /* string_enumeration_item: "string identifier" */ +#line 2219 "grammar.y" { int result = yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[0].c_string)); yr_free((yyvsp[0].c_string)); fail_if_error(result); } -#line 4004 "grammar.c" +#line 4001 "grammar.c" break; - case 125: /* string_enumeration_item: "string identifier with wildcard" */ -#line 2219 "grammar.y" + case 126: /* string_enumeration_item: "string identifier with wildcard" */ +#line 2226 "grammar.y" { int result = yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[0].c_string)); yr_free((yyvsp[0].c_string)); fail_if_error(result); } -#line 4015 "grammar.c" +#line 4012 "grammar.c" break; - case 126: /* for_expression: primary_expression */ -#line 2230 "grammar.y" + case 127: /* for_expression: primary_expression */ +#line 2237 "grammar.y" { (yyval.integer) = FOR_EXPRESSION_ANY; } -#line 4023 "grammar.c" +#line 4020 "grammar.c" break; - case 127: /* for_expression: "" */ -#line 2234 "grammar.y" + case 128: /* for_expression: "" */ +#line 2241 "grammar.y" { yr_parser_emit_push_const(yyscanner, YR_UNDEFINED); (yyval.integer) = FOR_EXPRESSION_ALL; } -#line 4032 "grammar.c" +#line 4029 "grammar.c" break; - case 128: /* for_expression: "" */ -#line 2239 "grammar.y" + case 129: /* for_expression: "" */ +#line 2246 "grammar.y" { yr_parser_emit_push_const(yyscanner, 1); (yyval.integer) = FOR_EXPRESSION_ANY; } -#line 4041 "grammar.c" +#line 4038 "grammar.c" break; - case 129: /* for_expression: "" */ -#line 2244 "grammar.y" + case 130: /* for_expression: "" */ +#line 2251 "grammar.y" { yr_parser_emit_push_const(yyscanner, 0); (yyval.integer) = FOR_EXPRESSION_NONE; } -#line 4050 "grammar.c" +#line 4047 "grammar.c" break; - case 130: /* primary_expression: '(' primary_expression ')' */ -#line 2253 "grammar.y" + case 131: /* primary_expression: '(' primary_expression ')' */ +#line 2260 "grammar.y" { (yyval.expression) = (yyvsp[-1].expression); } -#line 4058 "grammar.c" +#line 4055 "grammar.c" break; - case 131: /* primary_expression: "" */ -#line 2257 "grammar.y" + case 132: /* primary_expression: "" */ +#line 2264 "grammar.y" { fail_if_error(yr_parser_emit( yyscanner, OP_FILESIZE, NULL)); @@ -4066,11 +4063,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4070 "grammar.c" +#line 4067 "grammar.c" break; - case 132: /* primary_expression: "" */ -#line 2265 "grammar.y" + case 133: /* primary_expression: "" */ +#line 2272 "grammar.y" { yywarning(yyscanner, "Using deprecated \"entrypoint\" keyword. Use the \"entry_point\" " @@ -4082,11 +4079,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4086 "grammar.c" +#line 4083 "grammar.c" break; - case 133: /* primary_expression: "integer function" '(' primary_expression ')' */ -#line 2277 "grammar.y" + case 134: /* primary_expression: "integer function" '(' primary_expression ')' */ +#line 2284 "grammar.y" { check_type((yyvsp[-1].expression), EXPRESSION_TYPE_INTEGER, "intXXXX or uintXXXX"); @@ -4100,33 +4097,33 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4104 "grammar.c" +#line 4101 "grammar.c" break; - case 134: /* primary_expression: "integer number" */ -#line 2291 "grammar.y" + case 135: /* primary_expression: "integer number" */ +#line 2298 "grammar.y" { fail_if_error(yr_parser_emit_push_const(yyscanner, (yyvsp[0].integer))); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = (yyvsp[0].integer); } -#line 4115 "grammar.c" +#line 4112 "grammar.c" break; - case 135: /* primary_expression: "floating point number" */ -#line 2298 "grammar.y" + case 136: /* primary_expression: "floating point number" */ +#line 2305 "grammar.y" { fail_if_error(yr_parser_emit_with_arg_double( yyscanner, OP_PUSH, (yyvsp[0].double_), NULL, NULL)); (yyval.expression).type = EXPRESSION_TYPE_FLOAT; } -#line 4126 "grammar.c" +#line 4123 "grammar.c" break; - case 136: /* primary_expression: "text string" */ -#line 2305 "grammar.y" + case 137: /* primary_expression: "text string" */ +#line 2312 "grammar.y" { YR_ARENA_REF ref; @@ -4151,11 +4148,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_STRING; (yyval.expression).value.sized_string_ref = ref; } -#line 4155 "grammar.c" +#line 4152 "grammar.c" break; - case 137: /* primary_expression: "string count" */ -#line 2330 "grammar.y" + case 138: /* primary_expression: "string count" */ +#line 2337 "grammar.y" { int result = yr_parser_reduce_string_identifier( yyscanner, (yyvsp[0].c_string), OP_COUNT, YR_UNDEFINED); @@ -4167,11 +4164,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4171 "grammar.c" +#line 4168 "grammar.c" break; - case 138: /* primary_expression: "string offset" '[' primary_expression ']' */ -#line 2342 "grammar.y" + case 139: /* primary_expression: "string offset" '[' primary_expression ']' */ +#line 2349 "grammar.y" { int result = yr_parser_reduce_string_identifier( yyscanner, (yyvsp[-3].c_string), OP_OFFSET, YR_UNDEFINED); @@ -4183,11 +4180,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4187 "grammar.c" +#line 4184 "grammar.c" break; - case 139: /* primary_expression: "string offset" */ -#line 2354 "grammar.y" + case 140: /* primary_expression: "string offset" */ +#line 2361 "grammar.y" { int result = yr_parser_emit_push_const(yyscanner, 1); @@ -4202,11 +4199,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4206 "grammar.c" +#line 4203 "grammar.c" break; - case 140: /* primary_expression: "string length" '[' primary_expression ']' */ -#line 2369 "grammar.y" + case 141: /* primary_expression: "string length" '[' primary_expression ']' */ +#line 2376 "grammar.y" { int result = yr_parser_reduce_string_identifier( yyscanner, (yyvsp[-3].c_string), OP_LENGTH, YR_UNDEFINED); @@ -4218,11 +4215,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4222 "grammar.c" +#line 4219 "grammar.c" break; - case 141: /* primary_expression: "string length" */ -#line 2381 "grammar.y" + case 142: /* primary_expression: "string length" */ +#line 2388 "grammar.y" { int result = yr_parser_emit_push_const(yyscanner, 1); @@ -4237,11 +4234,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = YR_UNDEFINED; } -#line 4241 "grammar.c" +#line 4238 "grammar.c" break; - case 142: /* primary_expression: identifier */ -#line 2396 "grammar.y" + case 143: /* primary_expression: identifier */ +#line 2403 "grammar.y" { int result = ERROR_SUCCESS; @@ -4284,11 +4281,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4288 "grammar.c" +#line 4285 "grammar.c" break; - case 143: /* primary_expression: '-' primary_expression */ -#line 2439 "grammar.y" + case 144: /* primary_expression: '-' primary_expression */ +#line 2446 "grammar.y" { int result = ERROR_SUCCESS; @@ -4309,11 +4306,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4313 "grammar.c" +#line 4310 "grammar.c" break; - case 144: /* primary_expression: primary_expression '+' primary_expression */ -#line 2460 "grammar.y" + case 145: /* primary_expression: primary_expression '+' primary_expression */ +#line 2467 "grammar.y" { int result = yr_parser_reduce_operation( yyscanner, "+", (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -4348,11 +4345,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4352 "grammar.c" +#line 4349 "grammar.c" break; - case 145: /* primary_expression: primary_expression '-' primary_expression */ -#line 2495 "grammar.y" + case 146: /* primary_expression: primary_expression '-' primary_expression */ +#line 2502 "grammar.y" { int result = yr_parser_reduce_operation( yyscanner, "-", (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -4387,11 +4384,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4391 "grammar.c" +#line 4388 "grammar.c" break; - case 146: /* primary_expression: primary_expression '*' primary_expression */ -#line 2530 "grammar.y" + case 147: /* primary_expression: primary_expression '*' primary_expression */ +#line 2537 "grammar.y" { int result = yr_parser_reduce_operation( yyscanner, "*", (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -4425,11 +4422,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4429 "grammar.c" +#line 4426 "grammar.c" break; - case 147: /* primary_expression: primary_expression '\\' primary_expression */ -#line 2564 "grammar.y" + case 148: /* primary_expression: primary_expression '\\' primary_expression */ +#line 2571 "grammar.y" { int result = yr_parser_reduce_operation( yyscanner, "\\", (yyvsp[-2].expression), (yyvsp[0].expression)); @@ -4454,11 +4451,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4458 "grammar.c" +#line 4455 "grammar.c" break; - case 148: /* primary_expression: primary_expression '%' primary_expression */ -#line 2589 "grammar.y" + case 149: /* primary_expression: primary_expression '%' primary_expression */ +#line 2596 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_INTEGER, "%"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_INTEGER, "%"); @@ -4475,11 +4472,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(ERROR_DIVISION_BY_ZERO); } } -#line 4479 "grammar.c" +#line 4476 "grammar.c" break; - case 149: /* primary_expression: primary_expression '^' primary_expression */ -#line 2606 "grammar.y" + case 150: /* primary_expression: primary_expression '^' primary_expression */ +#line 2613 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_INTEGER, "^"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_INTEGER, "^"); @@ -4489,11 +4486,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = OPERATION(^, (yyvsp[-2].expression).value.integer, (yyvsp[0].expression).value.integer); } -#line 4493 "grammar.c" +#line 4490 "grammar.c" break; - case 150: /* primary_expression: primary_expression '&' primary_expression */ -#line 2616 "grammar.y" + case 151: /* primary_expression: primary_expression '&' primary_expression */ +#line 2623 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_INTEGER, "^"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_INTEGER, "^"); @@ -4503,11 +4500,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = OPERATION(&, (yyvsp[-2].expression).value.integer, (yyvsp[0].expression).value.integer); } -#line 4507 "grammar.c" +#line 4504 "grammar.c" break; - case 151: /* primary_expression: primary_expression '|' primary_expression */ -#line 2626 "grammar.y" + case 152: /* primary_expression: primary_expression '|' primary_expression */ +#line 2633 "grammar.y" { check_type((yyvsp[-2].expression), EXPRESSION_TYPE_INTEGER, "|"); check_type((yyvsp[0].expression), EXPRESSION_TYPE_INTEGER, "|"); @@ -4517,11 +4514,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).type = EXPRESSION_TYPE_INTEGER; (yyval.expression).value.integer = OPERATION(|, (yyvsp[-2].expression).value.integer, (yyvsp[0].expression).value.integer); } -#line 4521 "grammar.c" +#line 4518 "grammar.c" break; - case 152: /* primary_expression: '~' primary_expression */ -#line 2636 "grammar.y" + case 153: /* primary_expression: '~' primary_expression */ +#line 2643 "grammar.y" { check_type((yyvsp[0].expression), EXPRESSION_TYPE_INTEGER, "~"); @@ -4531,11 +4528,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.expression).value.integer = ((yyvsp[0].expression).value.integer == YR_UNDEFINED) ? YR_UNDEFINED : ~((yyvsp[0].expression).value.integer); } -#line 4535 "grammar.c" +#line 4532 "grammar.c" break; - case 153: /* primary_expression: primary_expression "<<" primary_expression */ -#line 2646 "grammar.y" + case 154: /* primary_expression: primary_expression "<<" primary_expression */ +#line 2653 "grammar.y" { int result; @@ -4555,11 +4552,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4559 "grammar.c" +#line 4556 "grammar.c" break; - case 154: /* primary_expression: primary_expression ">>" primary_expression */ -#line 2666 "grammar.y" + case 155: /* primary_expression: primary_expression ">>" primary_expression */ +#line 2673 "grammar.y" { int result; @@ -4579,19 +4576,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); fail_if_error(result); } -#line 4583 "grammar.c" +#line 4580 "grammar.c" break; - case 155: /* primary_expression: regexp */ -#line 2686 "grammar.y" + case 156: /* primary_expression: regexp */ +#line 2693 "grammar.y" { (yyval.expression) = (yyvsp[0].expression); } -#line 4591 "grammar.c" +#line 4588 "grammar.c" break; -#line 4595 "grammar.c" +#line 4592 "grammar.c" default: break; } @@ -4785,5 +4782,5 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); return yyresult; } -#line 2691 "grammar.y" +#line 2698 "grammar.y" diff --git a/libyara/grammar.h b/libyara/grammar.h index eeeb4742bc..9366227729 100644 --- a/libyara/grammar.h +++ b/libyara/grammar.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.6. */ +/* A Bison parser, made by GNU Bison 3.7. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -105,20 +105,20 @@ extern int yara_yydebug; _OR_ = 306, /* "" */ _AND_ = 307, /* "" */ _NOT_ = 308, /* "" */ - _EQ_ = 309, /* "==" */ - _NEQ_ = 310, /* "!=" */ - _LT_ = 311, /* "<" */ - _LE_ = 312, /* "<=" */ - _GT_ = 313, /* ">" */ - _GE_ = 314, /* ">=" */ - _SHIFT_LEFT_ = 315, /* "<<" */ - _SHIFT_RIGHT_ = 316, /* ">>" */ - UNARY_MINUS = 317 /* UNARY_MINUS */ + _DEFINED_ = 309, /* "" */ + _EQ_ = 310, /* "==" */ + _NEQ_ = 311, /* "!=" */ + _LT_ = 312, /* "<" */ + _LE_ = 313, /* "<=" */ + _GT_ = 314, /* ">" */ + _GE_ = 315, /* ">=" */ + _SHIFT_LEFT_ = 316, /* "<<" */ + _SHIFT_RIGHT_ = 317, /* ">>" */ + UNARY_MINUS = 318 /* UNARY_MINUS */ }; typedef enum yytokentype yytoken_kind_t; #endif /* Token kinds. */ -#define YYEMPTY -2 #define _END_OF_FILE_ 0 #define YYerror 256 #define YYUNDEF 257 @@ -173,21 +173,22 @@ extern int yara_yydebug; #define _OR_ 306 #define _AND_ 307 #define _NOT_ 308 -#define _EQ_ 309 -#define _NEQ_ 310 -#define _LT_ 311 -#define _LE_ 312 -#define _GT_ 313 -#define _GE_ 314 -#define _SHIFT_LEFT_ 315 -#define _SHIFT_RIGHT_ 316 -#define UNARY_MINUS 317 +#define _DEFINED_ 309 +#define _EQ_ 310 +#define _NEQ_ 311 +#define _LT_ 312 +#define _LE_ 313 +#define _GT_ 314 +#define _GE_ 315 +#define _SHIFT_LEFT_ 316 +#define _SHIFT_RIGHT_ 317 +#define UNARY_MINUS 318 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 306 "grammar.y" +#line 308 "grammar.y" YR_EXPRESSION expression; SIZED_STRING* sized_string; @@ -201,7 +202,7 @@ union YYSTYPE YR_ARENA_REF meta; YR_ARENA_REF string; -#line 205 "grammar.h" +#line 206 "grammar.h" }; typedef union YYSTYPE YYSTYPE; diff --git a/libyara/lexer.c b/libyara/lexer.c index fe9ae6b7ef..30cf7c13f4 100644 --- a/libyara/lexer.c +++ b/libyara/lexer.c @@ -1,6 +1,6 @@ -#line 1 "lexer.c" +#line 2 "lexer.c" -#line 3 "lexer.c" +#line 4 "lexer.c" #define YY_INT_ALIGNED short int @@ -580,8 +580,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 85 -#define YY_END_OF_BUFFER 86 +#define YY_NUM_RULES 86 +#define YY_END_OF_BUFFER 87 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -589,42 +589,43 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[306] = +static const flex_int16_t yy_accept[313] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 86, 84, 83, 83, 58, 80, 56, 55, 84, 81, - 61, 61, 2, 84, 3, 57, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 84, 72, 73, 65, 85, 78, - 79, 75, 85, 52, 53, 49, 49, 58, 7, 56, - 54, 55, 1, 47, 50, 0, 61, 0, 0, 0, - 0, 8, 4, 6, 5, 9, 57, 60, 60, 60, - 60, 28, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 29, 60, 60, 60, 60, 30, 27, - - 60, 60, 60, 60, 60, 60, 60, 60, 0, 0, - 72, 74, 69, 70, 68, 67, 66, 74, 78, 75, - 75, 77, 76, 52, 48, 50, 62, 61, 64, 63, - 33, 26, 34, 60, 60, 60, 60, 60, 60, 60, - 32, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 25, 60, 60, 60, 60, 60, - 60, 60, 60, 17, 82, 0, 0, 0, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 59, 60, 60, 13, 60, - 35, 60, 12, 60, 60, 31, 23, 16, 0, 0, - - 0, 0, 0, 82, 71, 15, 60, 60, 60, 60, - 60, 24, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 0, 0, 18, - 60, 60, 60, 60, 60, 60, 11, 60, 60, 60, - 46, 60, 59, 60, 60, 21, 60, 60, 60, 0, - 0, 0, 0, 0, 82, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 45, 60, 60, 38, 10, 60, - 14, 0, 82, 0, 0, 0, 60, 60, 39, 41, - 60, 37, 20, 60, 60, 0, 60, 60, 0, 0, - 0, 60, 22, 60, 42, 44, 51, 60, 60, 19, - - 36, 60, 40, 43, 0 + 87, 85, 84, 84, 59, 81, 57, 56, 85, 82, + 62, 62, 2, 85, 3, 58, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 85, 73, 74, 66, 86, + 79, 80, 76, 86, 53, 54, 50, 50, 59, 7, + 57, 55, 56, 1, 48, 51, 0, 62, 0, 0, + 0, 0, 8, 4, 6, 5, 9, 58, 61, 61, + 61, 61, 28, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 29, 61, 61, 61, 61, + + 30, 27, 61, 61, 61, 61, 61, 61, 61, 61, + 0, 0, 73, 75, 70, 71, 69, 68, 67, 75, + 79, 76, 76, 78, 77, 53, 49, 51, 63, 62, + 65, 64, 33, 26, 34, 61, 61, 61, 61, 61, + 61, 61, 61, 32, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 25, 61, 61, + 61, 61, 61, 61, 61, 61, 17, 83, 0, 0, + 0, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, 61, 60, + 61, 61, 13, 61, 35, 61, 12, 61, 61, 31, + + 23, 16, 0, 0, 0, 0, 0, 83, 72, 15, + 61, 61, 61, 61, 61, 61, 24, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 0, 0, 18, 61, 61, 61, 61, 61, + 61, 61, 11, 61, 61, 61, 46, 61, 60, 61, + 61, 21, 61, 61, 61, 0, 0, 0, 0, 0, + 83, 61, 61, 61, 47, 61, 61, 61, 61, 61, + 61, 45, 61, 61, 38, 10, 61, 14, 0, 83, + 0, 0, 0, 61, 61, 39, 41, 61, 37, 20, + 61, 61, 0, 61, 61, 0, 0, 0, 61, 22, + + 61, 42, 44, 52, 61, 61, 19, 36, 61, 40, + 43, 0 } ; static const YY_CHAR yy_ec[256] = @@ -669,169 +670,171 @@ static const YY_CHAR yy_meta[59] = 11, 11, 11, 12, 11, 11, 1, 1 } ; -static const flex_int16_t yy_base[329] = +static const flex_int16_t yy_base[336] = { 0, - 0, 0, 56, 57, 58, 61, 639, 638, 633, 632, - 641, 646, 646, 646, 617, 646, 0, 629, 627, 55, - 55, 61, 46, 614, 51, 0, 0, 52, 603, 590, - 590, 62, 591, 73, 43, 587, 33, 583, 579, 579, - 38, 587, 586, 581, 613, 0, 646, 646, 87, 0, - 646, 56, 612, 0, 646, 646, 611, 599, 646, 0, - 646, 611, 646, 646, 0, 0, 0, 593, 592, 110, - 0, 646, 646, 646, 646, 646, 0, 0, 576, 43, - 582, 0, 567, 571, 83, 572, 571, 564, 569, 565, - 564, 67, 562, 86, 557, 556, 555, 95, 0, 0, - - 563, 561, 99, 565, 550, 556, 563, 550, 92, 128, - 0, 646, 646, 646, 646, 646, 646, 0, 0, 548, - 646, 646, 646, 0, 646, 0, 0, 646, 138, 0, - 0, 0, 0, 555, 558, 84, 545, 544, 514, 523, - 0, 506, 502, 478, 478, 459, 441, 443, 128, 448, - 443, 444, 443, 433, 0, 413, 425, 413, 419, 415, - 416, 401, 413, 0, 646, 435, 156, 0, 344, 365, - 342, 349, 328, 325, 342, 329, 324, 343, 325, 325, - 340, 324, 320, 351, 354, 334, 319, 320, 0, 310, - 0, 325, 0, 307, 312, 0, 0, 0, 343, 151, - - 213, 0, 152, 0, 646, 0, 335, 301, 309, 298, - 290, 0, 294, 289, 291, 237, 216, 226, 217, 230, - 228, 214, 226, 225, 211, 211, 220, 271, 168, 205, - 216, 212, 205, 209, 197, 204, 0, 204, 203, 194, - 0, 205, 0, 192, 189, 0, 200, 183, 186, 0, - 0, 328, 212, 169, 0, 182, 176, 171, 179, 177, - 176, 176, 167, 160, 0, 207, 155, 0, 0, 166, - 0, 174, 196, 175, 193, 185, 167, 154, 0, 0, - 144, 0, 0, 118, 126, 194, 108, 96, 189, 0, - 192, 106, 0, 62, 0, 0, 646, 49, 43, 0, - - 0, 42, 0, 0, 646, 386, 399, 412, 425, 431, - 436, 444, 451, 456, 461, 472, 482, 494, 507, 519, - 532, 545, 69, 551, 554, 564, 577, 583 + 0, 0, 56, 57, 58, 61, 645, 644, 639, 638, + 647, 652, 652, 652, 623, 652, 0, 635, 633, 55, + 55, 61, 46, 620, 51, 0, 0, 52, 609, 596, + 603, 595, 62, 596, 73, 43, 592, 33, 588, 584, + 584, 38, 592, 591, 586, 618, 0, 652, 652, 87, + 0, 652, 56, 617, 0, 652, 652, 616, 604, 652, + 0, 652, 616, 652, 652, 0, 0, 0, 598, 597, + 110, 0, 652, 652, 652, 652, 652, 0, 0, 581, + 43, 587, 0, 572, 576, 581, 83, 576, 575, 568, + 573, 569, 568, 67, 566, 86, 561, 560, 559, 95, + + 0, 0, 567, 565, 99, 569, 554, 560, 567, 554, + 92, 128, 0, 652, 652, 652, 652, 652, 652, 0, + 0, 552, 652, 652, 652, 0, 652, 0, 0, 652, + 138, 0, 0, 0, 0, 559, 562, 84, 557, 548, + 548, 546, 557, 0, 550, 529, 516, 512, 485, 477, + 472, 128, 477, 451, 452, 448, 441, 0, 425, 439, + 422, 424, 419, 424, 410, 421, 0, 652, 443, 156, + 0, 410, 431, 404, 352, 340, 330, 327, 344, 331, + 326, 345, 327, 327, 342, 326, 322, 353, 356, 336, + 321, 328, 0, 318, 0, 327, 0, 309, 314, 0, + + 0, 0, 347, 151, 213, 0, 152, 0, 652, 0, + 339, 303, 311, 314, 309, 293, 0, 295, 290, 292, + 300, 217, 227, 218, 231, 229, 215, 227, 226, 212, + 212, 221, 271, 168, 206, 217, 213, 220, 205, 209, + 197, 204, 0, 204, 203, 194, 0, 205, 0, 192, + 189, 0, 200, 183, 186, 0, 0, 328, 212, 169, + 0, 182, 176, 171, 0, 179, 177, 176, 176, 167, + 160, 0, 207, 155, 0, 0, 166, 0, 174, 196, + 175, 193, 185, 167, 154, 0, 0, 144, 0, 0, + 118, 126, 194, 108, 96, 189, 0, 192, 106, 0, + + 62, 0, 0, 652, 49, 43, 0, 0, 42, 0, + 0, 652, 386, 399, 412, 425, 431, 436, 444, 451, + 456, 461, 472, 482, 494, 507, 519, 532, 545, 69, + 551, 554, 564, 577, 583 } ; -static const flex_int16_t yy_def[329] = +static const flex_int16_t yy_def[336] = { 0, - 305, 1, 306, 306, 307, 307, 308, 308, 309, 309, - 305, 305, 305, 305, 310, 305, 311, 312, 305, 305, - 313, 313, 305, 305, 305, 314, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 316, 317, 305, 305, 318, 319, - 305, 305, 320, 321, 305, 305, 305, 310, 305, 311, - 305, 312, 305, 305, 322, 323, 22, 305, 305, 305, - 324, 305, 305, 305, 305, 305, 314, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - - 315, 315, 315, 315, 315, 315, 315, 315, 316, 305, - 317, 305, 305, 305, 305, 305, 305, 325, 319, 305, - 305, 305, 305, 321, 305, 322, 323, 305, 305, 324, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 305, 326, 327, 328, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 326, 326, - - 327, 201, 201, 201, 305, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 305, 201, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 228, - 228, 326, 228, 228, 228, 315, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 315, 315, 315, 315, 315, - 315, 326, 326, 201, 228, 228, 315, 315, 315, 315, - 315, 315, 315, 315, 315, 305, 315, 315, 326, 228, - 228, 315, 315, 315, 315, 315, 305, 315, 315, 315, - - 315, 315, 315, 315, 0, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305 + 312, 1, 313, 313, 314, 314, 315, 315, 316, 316, + 312, 312, 312, 312, 317, 312, 318, 319, 312, 312, + 320, 320, 312, 312, 312, 321, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 323, 324, 312, 312, 325, + 326, 312, 312, 327, 328, 312, 312, 312, 317, 312, + 318, 312, 319, 312, 312, 329, 330, 22, 312, 312, + 312, 331, 312, 312, 312, 312, 312, 321, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 323, 312, 324, 312, 312, 312, 312, 312, 312, 332, + 326, 312, 312, 312, 312, 328, 312, 329, 330, 312, + 312, 331, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 312, 333, 334, + 335, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + + 322, 322, 333, 333, 334, 205, 205, 205, 312, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 312, 205, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 233, 233, 333, 233, 233, + 233, 322, 322, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 322, 322, 322, 322, 322, 322, 333, 333, + 205, 233, 233, 322, 322, 322, 322, 322, 322, 322, + 322, 322, 312, 322, 322, 333, 233, 233, 322, 322, + + 322, 322, 322, 312, 322, 322, 322, 322, 322, 322, + 322, 0, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312 } ; -static const flex_int16_t yy_nxt[705] = +static const flex_int16_t yy_nxt[711] = { 0, 12, 13, 14, 13, 15, 16, 17, 18, 12, 12, 19, 20, 21, 22, 22, 22, 22, 22, 22, 22, 22, 23, 24, 25, 26, 27, 27, 27, 27, 27, - 12, 27, 28, 29, 30, 27, 31, 32, 33, 27, - 34, 27, 35, 36, 37, 38, 27, 39, 40, 41, - 42, 27, 43, 44, 27, 27, 45, 12, 47, 47, - 51, 48, 48, 51, 64, 66, 65, 72, 73, 52, - 99, 66, 52, 75, 76, 96, 127, 104, 132, 97, - 100, 304, 303, 68, 69, 105, 49, 49, 53, 68, - 69, 53, 113, 79, 86, 80, 120, 133, 302, 70, - - 81, 82, 87, 110, 121, 305, 88, 91, 71, 92, - 145, 301, 89, 146, 305, 93, 94, 114, 137, 171, - 148, 95, 129, 129, 129, 129, 129, 129, 129, 153, - 115, 158, 138, 172, 116, 149, 117, 166, 154, 167, - 118, 184, 300, 185, 155, 299, 159, 186, 298, 165, - 129, 129, 129, 129, 129, 129, 129, 202, 109, 202, - 200, 228, 109, 229, 202, 296, 295, 203, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 228, 275, 229, - 276, 202, 202, 289, 228, 290, 229, 294, 202, 202, - 202, 202, 202, 202, 275, 286, 276, 293, 200, 297, - - 252, 275, 292, 276, 291, 200, 288, 287, 286, 285, - 284, 283, 282, 204, 202, 109, 202, 281, 280, 279, - 278, 202, 277, 274, 203, 202, 202, 202, 202, 202, - 202, 202, 202, 202, 271, 270, 269, 268, 202, 202, - 267, 266, 265, 264, 263, 202, 202, 202, 202, 202, - 202, 262, 261, 260, 259, 258, 257, 256, 249, 248, - 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, - 204, 250, 251, 252, 251, 250, 250, 250, 250, 251, - 253, 250, 254, 251, 251, 251, 251, 251, 251, 251, - 251, 251, 250, 250, 250, 250, 251, 251, 250, 250, - - 250, 250, 250, 251, 251, 251, 251, 251, 251, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 255, 252, - 252, 252, 237, 236, 235, 234, 252, 200, 233, 272, - 252, 252, 252, 252, 252, 252, 252, 252, 252, 232, - 231, 230, 200, 252, 252, 227, 226, 225, 224, 223, - 252, 252, 252, 252, 252, 252, 222, 221, 186, 186, - 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, - 210, 209, 208, 207, 206, 273, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 50, - - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 54, 54, 54, 54, 54, 54, 54, 54, - 54, 54, 54, 54, 54, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 58, 58, - 58, 58, 58, 60, 200, 60, 60, 60, 62, 198, - 149, 62, 197, 62, 62, 62, 67, 196, 67, 195, - 194, 193, 67, 77, 192, 77, 77, 77, 78, 191, - 78, 78, 78, 109, 109, 190, 189, 188, 109, 109, - 187, 109, 111, 111, 183, 182, 111, 111, 111, 111, - 111, 111, 111, 111, 112, 112, 112, 112, 112, 112, - - 112, 112, 112, 112, 112, 112, 112, 119, 119, 181, - 119, 119, 119, 180, 119, 119, 119, 119, 119, 122, - 122, 179, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 124, 124, 124, 178, 124, 124, 124, 124, - 124, 124, 124, 124, 124, 126, 126, 177, 126, 126, - 126, 126, 126, 126, 126, 126, 126, 126, 130, 176, - 130, 168, 175, 168, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 199, 201, 201, 201, - 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, - 205, 174, 205, 173, 170, 169, 121, 164, 163, 162, - - 161, 160, 157, 156, 152, 151, 150, 147, 144, 143, - 142, 141, 140, 139, 136, 135, 134, 131, 128, 128, - 61, 305, 125, 123, 110, 108, 107, 106, 103, 102, - 101, 98, 90, 85, 84, 83, 74, 63, 61, 59, - 305, 57, 57, 55, 55, 11, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - - 305, 305, 305, 305 + 12, 27, 28, 29, 30, 31, 32, 33, 34, 27, + 35, 27, 36, 37, 38, 39, 27, 40, 41, 42, + 43, 27, 44, 45, 27, 27, 46, 12, 48, 48, + 52, 49, 49, 52, 65, 67, 66, 73, 74, 53, + 101, 67, 53, 76, 77, 98, 129, 106, 134, 99, + 102, 311, 310, 69, 70, 107, 50, 50, 54, 69, + 70, 54, 115, 80, 88, 81, 122, 135, 309, 71, + + 82, 83, 89, 112, 123, 312, 90, 93, 72, 94, + 148, 308, 91, 149, 312, 95, 96, 116, 140, 174, + 151, 97, 131, 131, 131, 131, 131, 131, 131, 156, + 117, 161, 141, 175, 118, 152, 119, 169, 157, 170, + 120, 188, 307, 189, 158, 306, 162, 190, 305, 168, + 131, 131, 131, 131, 131, 131, 131, 206, 111, 206, + 204, 233, 111, 234, 206, 303, 302, 207, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 233, 282, 234, + 283, 206, 206, 296, 233, 297, 234, 301, 206, 206, + 206, 206, 206, 206, 282, 293, 283, 300, 204, 304, + + 258, 282, 299, 283, 298, 204, 295, 294, 293, 292, + 291, 290, 289, 208, 206, 111, 206, 288, 287, 286, + 285, 206, 284, 281, 207, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 278, 277, 276, 275, 206, 206, + 274, 273, 272, 271, 270, 206, 206, 206, 206, 206, + 206, 269, 268, 267, 266, 265, 264, 263, 262, 255, + 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, + 208, 256, 257, 258, 257, 256, 256, 256, 256, 257, + 259, 256, 260, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 256, 256, 256, 256, 257, 257, 256, 256, + + 256, 256, 256, 257, 257, 257, 257, 257, 257, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, + 256, 256, 256, 256, 256, 256, 256, 256, 261, 258, + 258, 258, 244, 243, 242, 241, 258, 204, 240, 279, + 258, 258, 258, 258, 258, 258, 258, 258, 258, 239, + 238, 237, 236, 258, 258, 235, 204, 232, 231, 230, + 258, 258, 258, 258, 258, 258, 229, 228, 227, 226, + 190, 190, 225, 224, 223, 222, 221, 220, 219, 218, + 217, 216, 215, 214, 213, 280, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 51, + + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 59, 59, + 59, 59, 59, 61, 212, 61, 61, 61, 63, 211, + 210, 63, 204, 63, 63, 63, 68, 202, 68, 152, + 201, 200, 68, 78, 199, 78, 78, 78, 79, 198, + 79, 79, 79, 111, 111, 197, 196, 195, 111, 111, + 194, 111, 113, 113, 193, 192, 113, 113, 113, 113, + 113, 113, 113, 113, 114, 114, 114, 114, 114, 114, + + 114, 114, 114, 114, 114, 114, 114, 121, 121, 191, + 121, 121, 121, 187, 121, 121, 121, 121, 121, 124, + 124, 186, 124, 124, 124, 124, 124, 124, 124, 124, + 124, 124, 126, 126, 126, 185, 126, 126, 126, 126, + 126, 126, 126, 126, 126, 128, 128, 184, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 132, 183, + 132, 171, 182, 171, 203, 203, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 203, 205, 205, 205, + 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, + 209, 181, 209, 180, 179, 178, 177, 176, 173, 172, + + 123, 167, 166, 165, 164, 163, 160, 159, 155, 154, + 153, 150, 147, 146, 145, 144, 143, 142, 139, 138, + 137, 136, 133, 130, 130, 62, 312, 127, 125, 112, + 110, 109, 108, 105, 104, 103, 100, 92, 87, 86, + 85, 84, 75, 64, 62, 60, 312, 58, 58, 56, + 56, 11, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312 } ; -static const flex_int16_t yy_chk[705] = +static const flex_int16_t yy_chk[711] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -840,87 +843,87 @@ static const flex_int16_t yy_chk[705] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 3, 4, 6, 20, 21, 20, 23, 23, 5, - 37, 22, 6, 25, 25, 35, 323, 41, 80, 35, - 37, 302, 299, 21, 21, 41, 3, 4, 5, 22, - 22, 6, 49, 28, 32, 28, 52, 80, 298, 21, - - 28, 28, 32, 109, 52, 22, 32, 34, 21, 34, - 92, 294, 32, 92, 22, 34, 34, 49, 85, 136, - 94, 34, 70, 70, 70, 70, 70, 70, 70, 98, - 49, 103, 85, 136, 49, 94, 49, 110, 98, 110, - 49, 149, 292, 149, 98, 288, 103, 149, 287, 109, - 129, 129, 129, 129, 129, 129, 129, 167, 167, 167, - 200, 203, 200, 203, 167, 285, 284, 167, 167, 167, - 167, 167, 167, 167, 167, 167, 167, 229, 254, 229, - 254, 167, 167, 272, 274, 272, 274, 281, 167, 167, - 167, 167, 167, 167, 276, 286, 276, 278, 289, 286, - - 289, 291, 277, 291, 275, 273, 270, 267, 266, 264, - 263, 262, 261, 167, 201, 201, 201, 260, 259, 258, - 257, 201, 256, 253, 201, 201, 201, 201, 201, 201, - 201, 201, 201, 201, 249, 248, 247, 245, 201, 201, - 244, 242, 240, 239, 238, 201, 201, 201, 201, 201, - 201, 236, 235, 234, 233, 232, 231, 230, 227, 226, - 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, - 201, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, - 228, 228, 228, 228, 228, 228, 228, 228, 228, 252, - 252, 252, 215, 214, 213, 211, 252, 252, 210, 252, - 252, 252, 252, 252, 252, 252, 252, 252, 252, 209, - 208, 207, 199, 252, 252, 195, 194, 192, 190, 188, - 252, 252, 252, 252, 252, 252, 187, 186, 185, 184, - 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, - 173, 172, 171, 170, 169, 252, 306, 306, 306, 306, - 306, 306, 306, 306, 306, 306, 306, 306, 306, 307, - - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 308, 308, 308, 308, 308, 308, 308, 308, - 308, 308, 308, 308, 308, 309, 309, 309, 309, 309, - 309, 309, 309, 309, 309, 309, 309, 309, 310, 310, - 310, 310, 310, 311, 166, 311, 311, 311, 312, 163, - 162, 312, 161, 312, 312, 312, 313, 160, 313, 159, - 158, 157, 313, 314, 156, 314, 314, 314, 315, 154, - 315, 315, 315, 316, 316, 153, 152, 151, 316, 316, - 150, 316, 317, 317, 148, 147, 317, 317, 317, 317, - 317, 317, 317, 317, 318, 318, 318, 318, 318, 318, - - 318, 318, 318, 318, 318, 318, 318, 319, 319, 146, - 319, 319, 319, 145, 319, 319, 319, 319, 319, 320, - 320, 144, 320, 320, 320, 320, 320, 320, 320, 320, - 320, 320, 321, 321, 321, 143, 321, 321, 321, 321, - 321, 321, 321, 321, 321, 322, 322, 142, 322, 322, - 322, 322, 322, 322, 322, 322, 322, 322, 324, 140, - 324, 325, 139, 325, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 327, 327, 327, - 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, - 328, 138, 328, 137, 135, 134, 120, 108, 107, 106, - - 105, 104, 102, 101, 97, 96, 95, 93, 91, 90, - 89, 88, 87, 86, 84, 83, 81, 79, 69, 68, - 62, 58, 57, 53, 45, 44, 43, 42, 40, 39, - 38, 36, 33, 31, 30, 29, 24, 19, 18, 15, - 11, 10, 9, 8, 7, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, - - 305, 305, 305, 305 + 38, 22, 6, 25, 25, 36, 330, 42, 81, 36, + 38, 309, 306, 21, 21, 42, 3, 4, 5, 22, + 22, 6, 50, 28, 33, 28, 53, 81, 305, 21, + + 28, 28, 33, 111, 53, 22, 33, 35, 21, 35, + 94, 301, 33, 94, 22, 35, 35, 50, 87, 138, + 96, 35, 71, 71, 71, 71, 71, 71, 71, 100, + 50, 105, 87, 138, 50, 96, 50, 112, 100, 112, + 50, 152, 299, 152, 100, 295, 105, 152, 294, 111, + 131, 131, 131, 131, 131, 131, 131, 170, 170, 170, + 204, 207, 204, 207, 170, 292, 291, 170, 170, 170, + 170, 170, 170, 170, 170, 170, 170, 234, 260, 234, + 260, 170, 170, 279, 281, 279, 281, 288, 170, 170, + 170, 170, 170, 170, 283, 293, 283, 285, 296, 293, + + 296, 298, 284, 298, 282, 280, 277, 274, 273, 271, + 270, 269, 268, 170, 205, 205, 205, 267, 266, 264, + 263, 205, 262, 259, 205, 205, 205, 205, 205, 205, + 205, 205, 205, 205, 255, 254, 253, 251, 205, 205, + 250, 248, 246, 245, 244, 205, 205, 205, 205, 205, + 205, 242, 241, 240, 239, 238, 237, 236, 235, 232, + 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, + 205, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, + 233, 233, 233, 233, 233, 233, 233, 233, 233, 258, + 258, 258, 221, 220, 219, 218, 258, 258, 216, 258, + 258, 258, 258, 258, 258, 258, 258, 258, 258, 215, + 214, 213, 212, 258, 258, 211, 203, 199, 198, 196, + 258, 258, 258, 258, 258, 258, 194, 192, 191, 190, + 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, + 179, 178, 177, 176, 175, 258, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 313, 314, + + 314, 314, 314, 314, 314, 314, 314, 314, 314, 314, + 314, 314, 315, 315, 315, 315, 315, 315, 315, 315, + 315, 315, 315, 315, 315, 316, 316, 316, 316, 316, + 316, 316, 316, 316, 316, 316, 316, 316, 317, 317, + 317, 317, 317, 318, 174, 318, 318, 318, 319, 173, + 172, 319, 169, 319, 319, 319, 320, 166, 320, 165, + 164, 163, 320, 321, 162, 321, 321, 321, 322, 161, + 322, 322, 322, 323, 323, 160, 159, 157, 323, 323, + 156, 323, 324, 324, 155, 154, 324, 324, 324, 324, + 324, 324, 324, 324, 325, 325, 325, 325, 325, 325, + + 325, 325, 325, 325, 325, 325, 325, 326, 326, 153, + 326, 326, 326, 151, 326, 326, 326, 326, 326, 327, + 327, 150, 327, 327, 327, 327, 327, 327, 327, 327, + 327, 327, 328, 328, 328, 149, 328, 328, 328, 328, + 328, 328, 328, 328, 328, 329, 329, 148, 329, 329, + 329, 329, 329, 329, 329, 329, 329, 329, 331, 147, + 331, 332, 146, 332, 333, 333, 333, 333, 333, 333, + 333, 333, 333, 333, 333, 333, 333, 334, 334, 334, + 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, + 335, 145, 335, 143, 142, 141, 140, 139, 137, 136, + + 122, 110, 109, 108, 107, 106, 104, 103, 99, 98, + 97, 95, 93, 92, 91, 90, 89, 88, 86, 85, + 84, 82, 80, 70, 69, 63, 59, 58, 54, 46, + 45, 44, 43, 41, 40, 39, 37, 34, 32, 31, + 30, 29, 24, 19, 18, 15, 11, 10, 9, 8, + 7, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312, + + 312, 312, 312, 312, 312, 312, 312, 312, 312, 312 } ; /* Table of booleans, true if rule could match eol. */ -static const flex_int32_t yy_rule_can_match_eol[86] = +static const flex_int32_t yy_rule_can_match_eol[87] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, - 0, 0, 1, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, + 1, 0, 0, 1, 1, 0, 0, }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -1065,11 +1068,11 @@ static bool is_absolute_path( #endif } -#line 1068 "lexer.c" +#line 1072 "lexer.c" #define YY_NO_UNISTD_H 1 #define YY_NO_INPUT 1 -#line 1072 "lexer.c" +#line 1076 "lexer.c" #define INITIAL 0 #define str 1 @@ -1348,7 +1351,7 @@ YY_DECL #line 163 "lexer.l" -#line 1351 "lexer.c" +#line 1355 "lexer.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1375,13 +1378,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 306 ) + if ( yy_current_state >= 313 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 305 ); + while ( yy_current_state != 312 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -1645,43 +1648,48 @@ YY_RULE_SETUP YY_BREAK case 47: YY_RULE_SETUP -#line 213 "lexer.l" -{ BEGIN(comment); } +#line 211 "lexer.l" +{ return _DEFINED_; } YY_BREAK case 48: YY_RULE_SETUP #line 214 "lexer.l" -{ BEGIN(INITIAL); } +{ BEGIN(comment); } YY_BREAK case 49: -/* rule 49 can match eol */ YY_RULE_SETUP #line 215 "lexer.l" -{ /* skip comments */ } +{ BEGIN(INITIAL); } YY_BREAK case 50: +/* rule 50 can match eol */ YY_RULE_SETUP -#line 218 "lexer.l" -{ /* skip single-line comments */ } +#line 216 "lexer.l" +{ /* skip comments */ } YY_BREAK case 51: YY_RULE_SETUP -#line 221 "lexer.l" +#line 219 "lexer.l" +{ /* skip single-line comments */ } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 222 "lexer.l" { yyextra->lex_buf_ptr = yyextra->lex_buf; yyextra->lex_buf_len = 0; BEGIN(include); } YY_BREAK -case 52: -/* rule 52 can match eol */ +case 53: +/* rule 53 can match eol */ YY_RULE_SETUP -#line 228 "lexer.l" +#line 229 "lexer.l" { yytext_to_buffer; } YY_BREAK -case 53: +case 54: YY_RULE_SETUP -#line 231 "lexer.l" +#line 232 "lexer.l" { if (compiler->include_callback != NULL) @@ -1818,7 +1826,7 @@ case YY_STATE_EOF(str): case YY_STATE_EOF(regexp): case YY_STATE_EOF(include): case YY_STATE_EOF(comment): -#line 363 "lexer.l" +#line 364 "lexer.l" { yypop_buffer_state(yyscanner); @@ -1829,9 +1837,9 @@ case YY_STATE_EOF(comment): return _END_OF_INCLUDED_FILE_; } YY_BREAK -case 54: +case 55: YY_RULE_SETUP -#line 374 "lexer.l" +#line 375 "lexer.l" { yylval->c_string = yr_strdup(yytext); @@ -1842,9 +1850,9 @@ YY_RULE_SETUP return _STRING_IDENTIFIER_WITH_WILDCARD_; } YY_BREAK -case 55: +case 56: YY_RULE_SETUP -#line 385 "lexer.l" +#line 386 "lexer.l" { yylval->c_string = yr_strdup(yytext); @@ -1855,9 +1863,9 @@ YY_RULE_SETUP return _STRING_IDENTIFIER_; } YY_BREAK -case 56: +case 57: YY_RULE_SETUP -#line 396 "lexer.l" +#line 397 "lexer.l" { yylval->c_string = yr_strdup(yytext); @@ -1874,9 +1882,9 @@ YY_RULE_SETUP return _STRING_COUNT_; } YY_BREAK -case 57: +case 58: YY_RULE_SETUP -#line 413 "lexer.l" +#line 414 "lexer.l" { yylval->c_string = yr_strdup(yytext); @@ -1893,9 +1901,9 @@ YY_RULE_SETUP return _STRING_OFFSET_; } YY_BREAK -case 58: +case 59: YY_RULE_SETUP -#line 430 "lexer.l" +#line 431 "lexer.l" { yylval->c_string = yr_strdup(yytext); @@ -1912,9 +1920,9 @@ YY_RULE_SETUP return _STRING_LENGTH_; } YY_BREAK -case 59: +case 60: YY_RULE_SETUP -#line 447 "lexer.l" +#line 448 "lexer.l" { char* text = yytext; @@ -1953,9 +1961,9 @@ YY_RULE_SETUP return _INTEGER_FUNCTION_; } YY_BREAK -case 60: +case 61: YY_RULE_SETUP -#line 486 "lexer.l" +#line 487 "lexer.l" { if (strlen(yytext) > 128) @@ -1969,9 +1977,9 @@ YY_RULE_SETUP return _IDENTIFIER_; } YY_BREAK -case 61: +case 62: YY_RULE_SETUP -#line 500 "lexer.l" +#line 501 "lexer.l" { char *endptr; @@ -2012,17 +2020,17 @@ YY_RULE_SETUP return _NUMBER_; } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 540 "lexer.l" +#line 541 "lexer.l" { yylval->double_ = atof(yytext); return _DOUBLE_; } YY_BREAK -case 63: +case 64: YY_RULE_SETUP -#line 545 "lexer.l" +#line 546 "lexer.l" { char *endptr; @@ -2039,9 +2047,9 @@ YY_RULE_SETUP return _NUMBER_; } YY_BREAK -case 64: +case 65: YY_RULE_SETUP -#line 561 "lexer.l" +#line 562 "lexer.l" { char *endptr; @@ -2058,9 +2066,9 @@ YY_RULE_SETUP return _NUMBER_; } YY_BREAK -case 65: +case 66: YY_RULE_SETUP -#line 578 "lexer.l" +#line 579 "lexer.l" { /* saw closing quote - all done */ alloc_sized_string(s, yyextra->lex_buf_len); @@ -2075,9 +2083,9 @@ YY_RULE_SETUP return _TEXT_STRING_; } YY_BREAK -case 66: +case 67: YY_RULE_SETUP -#line 593 "lexer.l" +#line 594 "lexer.l" { lex_check_space_ok("\t", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2085,9 +2093,9 @@ YY_RULE_SETUP yyextra->lex_buf_len++; } YY_BREAK -case 67: +case 68: YY_RULE_SETUP -#line 601 "lexer.l" +#line 602 "lexer.l" { lex_check_space_ok("\r", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2095,9 +2103,9 @@ YY_RULE_SETUP yyextra->lex_buf_len++; } YY_BREAK -case 68: +case 69: YY_RULE_SETUP -#line 609 "lexer.l" +#line 610 "lexer.l" { lex_check_space_ok("\n", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2105,9 +2113,9 @@ YY_RULE_SETUP yyextra->lex_buf_len++; } YY_BREAK -case 69: +case 70: YY_RULE_SETUP -#line 617 "lexer.l" +#line 618 "lexer.l" { lex_check_space_ok("\"", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2115,9 +2123,9 @@ YY_RULE_SETUP yyextra->lex_buf_len++; } YY_BREAK -case 70: +case 71: YY_RULE_SETUP -#line 625 "lexer.l" +#line 626 "lexer.l" { lex_check_space_ok("\\", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2125,9 +2133,9 @@ YY_RULE_SETUP yyextra->lex_buf_len++; } YY_BREAK -case 71: +case 72: YY_RULE_SETUP -#line 633 "lexer.l" +#line 634 "lexer.l" { int result; @@ -2138,30 +2146,30 @@ YY_RULE_SETUP yyextra->lex_buf_len++; } YY_BREAK -case 72: +case 73: YY_RULE_SETUP -#line 644 "lexer.l" +#line 645 "lexer.l" { yytext_to_buffer; } YY_BREAK -case 73: -/* rule 73 can match eol */ +case 74: +/* rule 74 can match eol */ YY_RULE_SETUP -#line 647 "lexer.l" +#line 648 "lexer.l" { syntax_error("unterminated string"); } YY_BREAK -case 74: -/* rule 74 can match eol */ +case 75: +/* rule 75 can match eol */ YY_RULE_SETUP -#line 652 "lexer.l" +#line 653 "lexer.l" { syntax_error("illegal escape sequence"); } YY_BREAK -case 75: +case 76: YY_RULE_SETUP -#line 657 "lexer.l" +#line 658 "lexer.l" { if (yyextra->lex_buf_len > 0) @@ -2188,9 +2196,9 @@ YY_RULE_SETUP return _REGEXP_; } YY_BREAK -case 76: +case 77: YY_RULE_SETUP -#line 684 "lexer.l" +#line 685 "lexer.l" { lex_check_space_ok("/", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2198,9 +2206,9 @@ YY_RULE_SETUP yyextra->lex_buf_len++ ; } YY_BREAK -case 77: +case 78: YY_RULE_SETUP -#line 692 "lexer.l" +#line 693 "lexer.l" { lex_check_space_ok("\\.", yyextra->lex_buf_len, YR_LEX_BUF_SIZE); @@ -2213,22 +2221,22 @@ YY_RULE_SETUP yyextra->lex_buf_len += 2; } YY_BREAK -case 78: +case 79: YY_RULE_SETUP -#line 705 "lexer.l" +#line 706 "lexer.l" { yytext_to_buffer; } YY_BREAK -case 79: -/* rule 79 can match eol */ +case 80: +/* rule 80 can match eol */ YY_RULE_SETUP -#line 708 "lexer.l" +#line 709 "lexer.l" { syntax_error("unterminated regular expression"); } YY_BREAK -case 80: +case 81: YY_RULE_SETUP -#line 713 "lexer.l" +#line 714 "lexer.l" { yylval->sized_string = NULL; @@ -2237,9 +2245,9 @@ YY_RULE_SETUP BEGIN(str); } YY_BREAK -case 81: +case 82: YY_RULE_SETUP -#line 722 "lexer.l" +#line 723 "lexer.l" { yylval->sized_string = NULL; @@ -2248,10 +2256,10 @@ YY_RULE_SETUP BEGIN(regexp); } YY_BREAK -case 82: -/* rule 82 can match eol */ +case 83: +/* rule 83 can match eol */ YY_RULE_SETUP -#line 731 "lexer.l" +#line 732 "lexer.l" { // Match hex-digits with whitespace or comments. The latter are stripped // out by hex_lexer.l @@ -2268,15 +2276,15 @@ YY_RULE_SETUP return _HEX_STRING_; } YY_BREAK -case 83: -/* rule 83 can match eol */ +case 84: +/* rule 84 can match eol */ YY_RULE_SETUP -#line 748 "lexer.l" +#line 749 "lexer.l" /* skip whitespace */ YY_BREAK -case 84: +case 85: YY_RULE_SETUP -#line 750 "lexer.l" +#line 751 "lexer.l" { if (yytext[0] >= 32 && yytext[0] < 127) @@ -2289,12 +2297,12 @@ YY_RULE_SETUP } } YY_BREAK -case 85: +case 86: YY_RULE_SETUP -#line 762 "lexer.l" +#line 763 "lexer.l" ECHO; YY_BREAK -#line 2297 "lexer.c" +#line 2306 "lexer.c" case YY_END_OF_BUFFER: { @@ -2592,7 +2600,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 306 ) + if ( yy_current_state >= 313 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -2621,11 +2629,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 306 ) + if ( yy_current_state >= 313 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 305); + yy_is_jam = (yy_current_state == 312); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -3443,7 +3451,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 762 "lexer.l" +#line 763 "lexer.l"