[Forensics-changes] [yara] 212/407: Improve syntax error recovery
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.3.0
in repository yara.
commit f3edcf29f94e36dd02bbd1bb78b30c66eec3d1e1
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date: Fri Nov 7 21:54:58 2014 +0100
Improve syntax error recovery
---
libyara/grammar.c | 810 +++++++++++++++++++++++++++---------------------------
libyara/grammar.y | 3 +-
2 files changed, 407 insertions(+), 406 deletions(-)
diff --git a/libyara/grammar.c b/libyara/grammar.c
index 31ccf99..7f47b2a 100644
--- a/libyara/grammar.c
+++ b/libyara/grammar.c
@@ -511,13 +511,13 @@ union yyalloc
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 35
/* YYNRULES -- Number of rules. */
-#define YYNRULES 110
+#define YYNRULES 111
/* YYNRULES -- Number of states. */
-#define YYNSTATES 196
+#define YYNSTATES 197
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 303
+#define YYMAXUTOK 304
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -535,7 +535,7 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 64, 54, 65, 41, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 58, 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, 59, 40, 60, 57, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -555,7 +555,7 @@ static const yytype_uint8 yytranslate[] =
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 56
+ 48, 49, 50, 56, 58
};
#if YYDEBUG
@@ -563,76 +563,76 @@ static const yytype_uint8 yytranslate[] =
YYRHS. */
static const yytype_uint16 yyprhs[] =
{
- 0, 0, 3, 4, 7, 10, 14, 18, 21, 31,
- 32, 36, 37, 41, 45, 46, 49, 51, 53, 54,
- 57, 59, 62, 64, 67, 71, 75, 79, 83, 85,
- 88, 93, 94, 100, 104, 105, 108, 110, 112, 114,
- 116, 118, 122, 127, 132, 133, 135, 139, 141, 143,
- 145, 147, 151, 155, 157, 161, 165, 166, 167, 179,
- 180, 190, 194, 197, 201, 205, 209, 213, 217, 221,
- 225, 229, 233, 235, 239, 243, 245, 252, 254, 258,
- 259, 264, 266, 268, 272, 274, 276, 278, 280, 282,
- 286, 288, 290, 295, 297, 299, 301, 306, 308, 310,
- 314, 318, 322, 326, 330, 334, 338, 342, 345, 349,
- 353
+ 0, 0, 3, 4, 7, 10, 14, 18, 22, 25,
+ 35, 36, 40, 41, 45, 49, 50, 53, 55, 57,
+ 58, 61, 63, 66, 68, 71, 75, 79, 83, 87,
+ 89, 92, 97, 98, 104, 108, 109, 112, 114, 116,
+ 118, 120, 122, 126, 131, 136, 137, 139, 143, 145,
+ 147, 149, 151, 155, 159, 161, 165, 169, 170, 171,
+ 183, 184, 194, 198, 201, 205, 209, 213, 217, 221,
+ 225, 229, 233, 237, 239, 243, 247, 249, 256, 258,
+ 262, 263, 268, 270, 272, 276, 278, 280, 282, 284,
+ 286, 290, 292, 294, 299, 301, 303, 305, 310, 312,
+ 314, 318, 322, 326, 330, 334, 338, 342, 346, 349,
+ 353, 357
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
70, 0, -1, -1, 70, 72, -1, 70, 71, -1,
- 70, 1, 72, -1, 70, 1, 58, -1, 34, 16,
- -1, 76, 3, 9, 78, 59, 73, 74, 75, 60,
- -1, -1, 6, 61, 80, -1, -1, 7, 61, 82,
- -1, 8, 61, 90, -1, -1, 76, 77, -1, 4,
- -1, 5, -1, -1, 61, 79, -1, 9, -1, 79,
- 9, -1, 81, -1, 80, 81, -1, 9, 62, 16,
- -1, 9, 62, 14, -1, 9, 62, 35, -1, 9,
- 62, 36, -1, 83, -1, 82, 83, -1, 10, 62,
- 16, 85, -1, -1, 10, 62, 84, 18, 85, -1,
- 10, 62, 17, -1, -1, 85, 86, -1, 20, -1,
- 19, -1, 21, -1, 22, -1, 9, -1, 87, 63,
- 9, -1, 87, 64, 103, 65, -1, 87, 66, 88,
- 67, -1, -1, 91, -1, 88, 68, 91, -1, 18,
- -1, 91, -1, 35, -1, 36, -1, 103, 32, 89,
- -1, 103, 33, 103, -1, 10, -1, 10, 23, 103,
- -1, 10, 28, 96, -1, -1, -1, 30, 102, 9,
- 28, 92, 95, 61, 93, 66, 90, 67, -1, -1,
- 30, 102, 29, 98, 61, 94, 66, 90, 67, -1,
- 102, 29, 98, -1, 56, 90, -1, 90, 38, 90,
- -1, 90, 37, 90, -1, 103, 48, 103, -1, 103,
- 46, 103, -1, 103, 47, 103, -1, 103, 45, 103,
- -1, 103, 44, 103, -1, 103, 42, 103, -1, 103,
- 43, 103, -1, 103, -1, 66, 91, 67, -1, 66,
- 97, 67, -1, 96, -1, 66, 103, 63, 63, 103,
- 67, -1, 103, -1, 97, 68, 103, -1, -1, 66,
- 99, 100, 67, -1, 31, -1, 101, -1, 100, 68,
- 101, -1, 10, -1, 13, -1, 103, -1, 26, -1,
- 27, -1, 66, 103, 67, -1, 24, -1, 25, -1,
- 15, 66, 103, 67, -1, 14, -1, 16, -1, 11,
- -1, 12, 64, 103, 65, -1, 12, -1, 87, -1,
- 103, 51, 103, -1, 103, 52, 103, -1, 103, 53,
- 103, -1, 103, 54, 103, -1, 103, 55, 103, -1,
- 103, 41, 103, -1, 103, 39, 103, -1, 103, 40,
- 103, -1, 57, 103, -1, 103, 50, 103, -1, 103,
- 49, 103, -1, 89, -1
+ 70, 1, 72, -1, 70, 1, 58, -1, 70, 1,
+ 71, -1, 34, 16, -1, 76, 3, 9, 78, 59,
+ 73, 74, 75, 60, -1, -1, 6, 61, 80, -1,
+ -1, 7, 61, 82, -1, 8, 61, 90, -1, -1,
+ 76, 77, -1, 4, -1, 5, -1, -1, 61, 79,
+ -1, 9, -1, 79, 9, -1, 81, -1, 80, 81,
+ -1, 9, 62, 16, -1, 9, 62, 14, -1, 9,
+ 62, 35, -1, 9, 62, 36, -1, 83, -1, 82,
+ 83, -1, 10, 62, 16, 85, -1, -1, 10, 62,
+ 84, 18, 85, -1, 10, 62, 17, -1, -1, 85,
+ 86, -1, 20, -1, 19, -1, 21, -1, 22, -1,
+ 9, -1, 87, 63, 9, -1, 87, 64, 103, 65,
+ -1, 87, 66, 88, 67, -1, -1, 91, -1, 88,
+ 68, 91, -1, 18, -1, 91, -1, 35, -1, 36,
+ -1, 103, 32, 89, -1, 103, 33, 103, -1, 10,
+ -1, 10, 23, 103, -1, 10, 28, 96, -1, -1,
+ -1, 30, 102, 9, 28, 92, 95, 61, 93, 66,
+ 90, 67, -1, -1, 30, 102, 29, 98, 61, 94,
+ 66, 90, 67, -1, 102, 29, 98, -1, 56, 90,
+ -1, 90, 38, 90, -1, 90, 37, 90, -1, 103,
+ 48, 103, -1, 103, 46, 103, -1, 103, 47, 103,
+ -1, 103, 45, 103, -1, 103, 44, 103, -1, 103,
+ 42, 103, -1, 103, 43, 103, -1, 103, -1, 66,
+ 91, 67, -1, 66, 97, 67, -1, 96, -1, 66,
+ 103, 63, 63, 103, 67, -1, 103, -1, 97, 68,
+ 103, -1, -1, 66, 99, 100, 67, -1, 31, -1,
+ 101, -1, 100, 68, 101, -1, 10, -1, 13, -1,
+ 103, -1, 26, -1, 27, -1, 66, 103, 67, -1,
+ 24, -1, 25, -1, 15, 66, 103, 67, -1, 14,
+ -1, 16, -1, 11, -1, 12, 64, 103, 65, -1,
+ 12, -1, 87, -1, 103, 51, 103, -1, 103, 52,
+ 103, -1, 103, 53, 103, -1, 103, 54, 103, -1,
+ 103, 55, 103, -1, 103, 41, 103, -1, 103, 39,
+ 103, -1, 103, 40, 103, -1, 57, 103, -1, 103,
+ 50, 103, -1, 103, 49, 103, -1, 89, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 195, 195, 197, 198, 199, 200, 205, 217, 236,
- 239, 267, 271, 299, 304, 305, 310, 311, 317, 320,
- 338, 351, 388, 389, 394, 410, 423, 436, 453, 454,
- 459, 473, 472, 489, 506, 507, 512, 513, 514, 515,
- 520, 608, 657, 707, 749, 752, 774, 807, 852, 869,
- 878, 887, 902, 916, 930, 946, 961, 996, 960, 1110,
- 1109, 1188, 1194, 1200, 1206, 1214, 1223, 1232, 1241, 1250,
- 1277, 1304, 1331, 1335, 1343, 1344, 1349, 1371, 1383, 1399,
- 1398, 1404, 1413, 1414, 1419, 1424, 1433, 1434, 1438, 1446,
- 1450, 1460, 1473, 1489, 1499, 1522, 1537, 1552, 1574, 1611,
- 1621, 1631, 1641, 1651, 1661, 1671, 1681, 1691, 1701, 1711,
- 1721
+ 0, 195, 195, 197, 198, 199, 200, 201, 206, 218,
+ 237, 240, 268, 272, 300, 305, 306, 311, 312, 318,
+ 321, 339, 352, 389, 390, 395, 411, 424, 437, 454,
+ 455, 460, 474, 473, 490, 507, 508, 513, 514, 515,
+ 516, 521, 609, 658, 708, 750, 753, 775, 808, 853,
+ 870, 879, 888, 903, 917, 931, 947, 962, 997, 961,
+ 1111, 1110, 1189, 1195, 1201, 1207, 1215, 1224, 1233, 1242,
+ 1251, 1278, 1305, 1332, 1336, 1344, 1345, 1350, 1372, 1384,
+ 1400, 1399, 1405, 1414, 1415, 1420, 1425, 1434, 1435, 1439,
+ 1447, 1451, 1461, 1474, 1490, 1500, 1523, 1538, 1553, 1575,
+ 1612, 1622, 1632, 1642, 1652, 1662, 1672, 1682, 1692, 1702,
+ 1712, 1722
};
#endif
@@ -651,7 +651,7 @@ static const char *const yytname[] =
"_IMPORT_", "_TRUE_", "_FALSE_", "_OR_", "_AND_", "'&'", "'|'", "'^'",
"_IS_", "_NEQ_", "_EQ_", "_GE_", "_GT_", "_LE_", "_LT_", "_SHIFT_RIGHT_",
"_SHIFT_LEFT_", "'+'", "'-'", "'*'", "'\\\\'", "'%'", "_NOT_", "'~'",
- "'include'", "'{'", "'}'", "':'", "'='", "'.'", "'['", "']'", "'('",
+ "\"include\"", "'{'", "'}'", "':'", "'='", "'.'", "'['", "']'", "'('",
"')'", "','", "$accept", "rules", "import", "rule", "meta", "strings",
"condition", "rule_modifiers", "rule_modifier", "tags", "tag_list",
"meta_declarations", "meta_declaration", "string_declarations",
@@ -673,7 +673,7 @@ static const yytype_uint16 yytoknum[] =
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 38,
124, 94, 294, 295, 296, 297, 298, 299, 300, 301,
- 302, 43, 45, 42, 92, 37, 303, 126, 105, 123,
+ 302, 43, 45, 42, 92, 37, 303, 126, 304, 123,
125, 58, 61, 46, 91, 93, 40, 41, 44
};
# endif
@@ -681,35 +681,35 @@ static const yytype_uint16 yytoknum[] =
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 69, 70, 70, 70, 70, 70, 71, 72, 73,
- 73, 74, 74, 75, 76, 76, 77, 77, 78, 78,
- 79, 79, 80, 80, 81, 81, 81, 81, 82, 82,
- 83, 84, 83, 83, 85, 85, 86, 86, 86, 86,
- 87, 87, 87, 87, 88, 88, 88, 89, 90, 91,
- 91, 91, 91, 91, 91, 91, 92, 93, 91, 94,
- 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
- 91, 91, 91, 91, 95, 95, 96, 97, 97, 99,
- 98, 98, 100, 100, 101, 101, 102, 102, 102, 103,
+ 0, 69, 70, 70, 70, 70, 70, 70, 71, 72,
+ 73, 73, 74, 74, 75, 76, 76, 77, 77, 78,
+ 78, 79, 79, 80, 80, 81, 81, 81, 81, 82,
+ 82, 83, 84, 83, 83, 85, 85, 86, 86, 86,
+ 86, 87, 87, 87, 87, 88, 88, 88, 89, 90,
+ 91, 91, 91, 91, 91, 91, 91, 92, 93, 91,
+ 94, 91, 91, 91, 91, 91, 91, 91, 91, 91,
+ 91, 91, 91, 91, 91, 95, 95, 96, 97, 97,
+ 99, 98, 98, 100, 100, 101, 101, 102, 102, 102,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
- 103
+ 103, 103
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 0, 2, 2, 3, 3, 2, 9, 0,
- 3, 0, 3, 3, 0, 2, 1, 1, 0, 2,
- 1, 2, 1, 2, 3, 3, 3, 3, 1, 2,
- 4, 0, 5, 3, 0, 2, 1, 1, 1, 1,
- 1, 3, 4, 4, 0, 1, 3, 1, 1, 1,
- 1, 3, 3, 1, 3, 3, 0, 0, 11, 0,
- 9, 3, 2, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 1, 3, 3, 1, 6, 1, 3, 0,
- 4, 1, 1, 3, 1, 1, 1, 1, 1, 3,
- 1, 1, 4, 1, 1, 1, 4, 1, 1, 3,
- 3, 3, 3, 3, 3, 3, 3, 2, 3, 3,
- 1
+ 0, 2, 0, 2, 2, 3, 3, 3, 2, 9,
+ 0, 3, 0, 3, 3, 0, 2, 1, 1, 0,
+ 2, 1, 2, 1, 2, 3, 3, 3, 3, 1,
+ 2, 4, 0, 5, 3, 0, 2, 1, 1, 1,
+ 1, 1, 3, 4, 4, 0, 1, 3, 1, 1,
+ 1, 1, 3, 3, 1, 3, 3, 0, 0, 11,
+ 0, 9, 3, 2, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 1, 3, 3, 1, 6, 1, 3,
+ 0, 4, 1, 1, 3, 1, 1, 1, 1, 1,
+ 3, 1, 1, 4, 1, 1, 1, 4, 1, 1,
+ 3, 3, 3, 3, 3, 3, 3, 3, 2, 3,
+ 3, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -717,140 +717,140 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 2, 0, 1, 14, 0, 4, 3, 0, 6, 5,
- 7, 0, 16, 17, 15, 18, 0, 0, 20, 19,
- 9, 21, 0, 11, 0, 0, 0, 0, 10, 22,
- 0, 0, 0, 0, 23, 0, 12, 28, 0, 8,
- 25, 24, 26, 27, 31, 29, 40, 53, 95, 97,
- 93, 0, 94, 47, 90, 91, 87, 88, 0, 49,
- 50, 0, 0, 0, 98, 110, 13, 48, 0, 72,
- 34, 33, 0, 0, 0, 0, 0, 0, 0, 86,
- 62, 107, 0, 48, 72, 0, 0, 44, 0, 0,
+ 2, 0, 1, 15, 0, 4, 3, 0, 6, 7,
+ 5, 8, 0, 17, 18, 16, 19, 0, 0, 21,
+ 20, 10, 22, 0, 12, 0, 0, 0, 0, 11,
+ 23, 0, 0, 0, 0, 24, 0, 13, 29, 0,
+ 9, 26, 25, 27, 28, 32, 30, 41, 54, 96,
+ 98, 94, 0, 95, 48, 91, 92, 88, 89, 0,
+ 50, 51, 0, 0, 0, 99, 111, 14, 49, 0,
+ 73, 35, 34, 0, 0, 0, 0, 0, 0, 0,
+ 87, 63, 108, 0, 49, 73, 0, 0, 45, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 30, 34, 54, 0, 55, 0, 0, 0, 0, 0,
- 73, 89, 41, 0, 0, 45, 64, 63, 81, 79,
- 61, 51, 52, 105, 106, 104, 70, 71, 69, 68,
- 66, 67, 65, 109, 108, 99, 100, 101, 102, 103,
- 37, 36, 38, 39, 35, 32, 0, 96, 92, 56,
- 0, 42, 43, 0, 0, 0, 0, 59, 46, 84,
- 85, 0, 82, 0, 0, 0, 75, 0, 80, 0,
- 0, 0, 77, 57, 0, 83, 76, 74, 0, 0,
- 0, 78, 0, 60, 0, 58
+ 0, 31, 35, 55, 0, 56, 0, 0, 0, 0,
+ 0, 74, 90, 42, 0, 0, 46, 65, 64, 82,
+ 80, 62, 52, 53, 106, 107, 105, 71, 72, 70,
+ 69, 67, 68, 66, 110, 109, 100, 101, 102, 103,
+ 104, 38, 37, 39, 40, 36, 33, 0, 97, 93,
+ 57, 0, 43, 44, 0, 0, 0, 0, 60, 47,
+ 85, 86, 0, 83, 0, 0, 0, 76, 0, 81,
+ 0, 0, 0, 78, 58, 0, 84, 77, 75, 0,
+ 0, 0, 79, 0, 61, 0, 59
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 5, 6, 23, 26, 32, 7, 14, 17,
- 19, 28, 29, 36, 37, 72, 110, 154, 64, 124,
- 65, 82, 67, 166, 189, 177, 175, 114, 181, 130,
- 164, 171, 172, 68, 69
+ -1, 1, 5, 6, 24, 27, 33, 7, 15, 18,
+ 20, 29, 30, 37, 38, 73, 111, 155, 65, 125,
+ 66, 83, 68, 167, 190, 178, 176, 115, 182, 131,
+ 165, 172, 173, 69, 70
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -61
+#define YYPACT_NINF -62
static const yytype_int16 yypact[] =
{
- -61, 7, -61, -34, 4, -61, -61, 85, -61, -61,
- -61, 13, -61, -61, -61, -31, 19, -17, -61, 45,
- 42, -61, 12, 79, 73, 52, 108, 58, 73, -61,
- 114, 70, 72, 17, -61, 83, 114, -61, 69, -61,
- -61, -61, -61, -61, 75, -61, -61, -22, -61, 84,
- -61, 67, -61, -61, -61, -61, -61, -61, 103, -61,
- -61, 69, 141, 69, 11, -61, 60, -61, 105, 227,
- -61, -61, 129, 141, 92, 141, 141, 141, 0, 278,
- -61, -61, 60, 82, 135, 152, 141, 69, 69, 69,
- -29, 144, 141, 141, 141, 141, 141, 141, 141, 141,
+ -62, 7, -62, -28, -15, -62, -62, 85, -62, -62,
+ -62, -62, 13, -62, -62, -62, -37, 19, -17, -62,
+ 45, 67, -62, 21, 79, 104, 59, 108, 62, 104,
+ -62, 121, 72, 74, 17, -62, 70, 121, -62, 69,
+ -62, -62, -62, -62, -62, 75, -62, -62, -8, -62,
+ 81, -62, 82, -62, -62, -62, -62, -62, -62, 103,
+ -62, -62, 69, 141, 69, 11, -62, 60, -62, 118,
+ 227, -62, -62, 131, 141, 92, 141, 141, 141, 0,
+ 278, -62, -62, 60, 94, 135, 153, 141, 69, 69,
+ 69, -29, 145, 141, 141, 141, 141, 141, 141, 141,
141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 25, -61, 278, 141, -61, 244, 160, 179, 142, -29,
- -61, -61, -61, 251, 39, 71, 125, -61, -61, -61,
- -61, -61, 278, 89, 89, 89, 278, 278, 278, 278,
- 278, 278, 278, -36, -36, 47, 47, -61, -61, -61,
- -61, -61, -61, -61, -61, 25, 271, -61, -61, -61,
- 110, -61, -61, 69, 22, 109, 107, -61, 71, -61,
- -61, 43, -61, 141, 141, 130, -61, 126, -61, 22,
- 198, 55, 271, -61, 69, -61, -61, -61, 141, 127,
- -33, 278, 69, -61, -24, -61
+ 141, -3, -62, 278, 141, -62, 244, 160, 179, 142,
+ -29, -62, -62, -62, 251, 39, 71, 133, -62, -62,
+ -62, -62, -62, 278, 89, 89, 89, 278, 278, 278,
+ 278, 278, 278, 278, -7, -7, 47, 47, -62, -62,
+ -62, -62, -62, -62, -62, -62, -3, 271, -62, -62,
+ -62, 111, -62, -62, 69, 22, 110, 125, -62, 71,
+ -62, -62, 43, -62, 141, 141, 132, -62, 126, -62,
+ 22, 198, 55, 271, -62, 69, -62, -62, -62, 141,
+ 128, -33, 278, 69, -62, -24, -62
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -61, -61, -61, 191, -61, -61, -61, -61, -61, -61,
- -61, -61, 167, -61, 161, -61, 93, -61, -61, -61,
- 112, -38, -60, -61, -61, -61, -61, 30, -61, 86,
- -61, -61, 27, 150, -37
+ -62, -62, 192, 193, -62, -62, -62, -62, -62, -62,
+ -62, -62, 168, -62, 166, -62, 93, -62, -62, -62,
+ 112, -39, -61, -62, -62, -62, -62, 41, -62, 86,
+ -62, -62, 36, 158, -38
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -87
+#define YYTABLE_NINF -88
static const yytype_int16 yytable[] =
{
- 66, 73, 128, 83, 88, 89, 74, 2, 3, 118,
- -14, -14, -14, 88, 89, 105, 106, 107, 108, 109,
- 10, 79, 15, 80, 8, 81, 84, 125, 18, 119,
- 16, 40, 169, 41, 193, 170, 112, 129, 115, 116,
- 117, 4, 20, 195, 150, 151, 152, 153, 22, 123,
- 126, 127, 42, 43, 21, 132, 133, 134, 135, 136,
- 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
- 147, 148, 149, 24, 85, 86, 156, 87, 46, 47,
- 48, 49, 27, 50, 51, 52, 25, 53, 11, 12,
- 13, 70, 71, 54, 55, 56, 57, 88, 89, 58,
- 107, 108, 109, 168, 59, 60, 162, 163, -48, -48,
- 178, 179, 46, 30, 48, 49, 31, 50, 51, 52,
- 33, 53, 187, 188, 35, 61, 62, 54, 55, 56,
- 57, 38, 39, 76, 90, 63, 180, 182, 103, 104,
- 105, 106, 107, 108, 109, 44, 190, 111, 75, 120,
- 46, 191, 48, 49, 194, 50, 51, 52, 113, 53,
- 62, 122, 53, 89, -86, 54, 55, 91, 92, 77,
- 159, 167, 173, 174, 93, 94, 95, 96, 97, 98,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 183, 184, 192, 9, 34, 176, 45, 62, 93,
- 94, 95, 121, 131, 155, 160, 185, 77, 78, 103,
- 104, 105, 106, 107, 108, 109, 0, 0, 93, 94,
- 95, 0, 0, 0, 0, 0, 0, 158, 103, 104,
- 105, 106, 107, 108, 109, 0, 0, 93, 94, 95,
- 0, 0, 0, 0, 0, 0, 121, 103, 104, 105,
- 106, 107, 108, 109, 0, 0, -86, 0, 0, 91,
- 92, 0, 0, 0, 0, 186, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 93, 94, 95, 0, 0, 0, 0,
- 93, 94, 95, 103, 104, 105, 106, 107, 108, 109,
- 103, 104, 105, 106, 107, 108, 109, 0, 0, 157,
- 93, 94, 95, 0, 0, 0, 161, 93, 94, 95,
- 103, 104, 105, 106, 107, 108, 109, 103, 104, 105,
- 106, 107, 108, 109, 165
+ 67, 11, 129, 84, 89, 90, 4, 2, 3, 119,
+ -15, -15, -15, 89, 90, 74, 151, 152, 153, 154,
+ 75, 80, 16, 81, 17, 82, 85, 126, 19, 120,
+ 8, 41, 170, 42, 194, 171, 113, 130, 116, 117,
+ 118, 4, 21, 196, 106, 107, 108, 109, 110, 124,
+ 127, 128, 43, 44, 22, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
+ 148, 149, 150, 23, 86, 87, 157, 88, 47, 48,
+ 49, 50, 25, 51, 52, 53, 26, 54, 12, 13,
+ 14, 71, 72, 55, 56, 57, 58, 89, 90, 59,
+ 108, 109, 110, 169, 60, 61, 163, 164, -49, -49,
+ 179, 180, 47, 28, 49, 50, 32, 51, 52, 53,
+ 31, 54, 188, 189, 34, 62, 63, 55, 56, 57,
+ 58, 36, 45, 39, 40, 64, 181, 183, 104, 105,
+ 106, 107, 108, 109, 110, 76, 191, 91, 77, 112,
+ 47, 192, 49, 50, 195, 51, 52, 53, 114, 54,
+ 63, 121, 123, 54, -87, 55, 56, 92, 93, 78,
+ 160, 90, 168, 174, 94, 95, 96, 97, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 175, 185, 184, 193, 9, 10, 35, 63, 94,
+ 95, 96, 122, 46, 132, 156, 161, 78, 177, 104,
+ 105, 106, 107, 108, 109, 110, 186, 79, 94, 95,
+ 96, 0, 0, 0, 0, 0, 0, 159, 104, 105,
+ 106, 107, 108, 109, 110, 0, 0, 94, 95, 96,
+ 0, 0, 0, 0, 0, 0, 122, 104, 105, 106,
+ 107, 108, 109, 110, 0, 0, -87, 0, 0, 92,
+ 93, 0, 0, 0, 0, 187, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 94, 95, 96, 0, 0, 0, 0,
+ 94, 95, 96, 104, 105, 106, 107, 108, 109, 110,
+ 104, 105, 106, 107, 108, 109, 110, 0, 0, 158,
+ 94, 95, 96, 0, 0, 0, 162, 94, 95, 96,
+ 104, 105, 106, 107, 108, 109, 110, 104, 105, 106,
+ 107, 108, 109, 110, 166
};
static const yytype_int16 yycheck[] =
{
- 38, 23, 31, 63, 37, 38, 28, 0, 1, 9,
- 3, 4, 5, 37, 38, 51, 52, 53, 54, 55,
- 16, 58, 9, 61, 58, 62, 63, 87, 9, 29,
- 61, 14, 10, 16, 67, 13, 73, 66, 75, 76,
- 77, 34, 59, 67, 19, 20, 21, 22, 6, 86,
- 88, 89, 35, 36, 9, 92, 93, 94, 95, 96,
- 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
- 107, 108, 109, 61, 63, 64, 113, 66, 9, 10,
- 11, 12, 9, 14, 15, 16, 7, 18, 3, 4,
+ 39, 16, 31, 64, 37, 38, 34, 0, 1, 9,
+ 3, 4, 5, 37, 38, 23, 19, 20, 21, 22,
+ 28, 59, 9, 62, 61, 63, 64, 88, 9, 29,
+ 58, 14, 10, 16, 67, 13, 74, 66, 76, 77,
+ 78, 34, 59, 67, 51, 52, 53, 54, 55, 87,
+ 89, 90, 35, 36, 9, 93, 94, 95, 96, 97,
+ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ 108, 109, 110, 6, 63, 64, 114, 66, 9, 10,
+ 11, 12, 61, 14, 15, 16, 7, 18, 3, 4,
5, 16, 17, 24, 25, 26, 27, 37, 38, 30,
- 53, 54, 55, 163, 35, 36, 67, 68, 37, 38,
- 67, 68, 9, 61, 11, 12, 8, 14, 15, 16,
- 62, 18, 67, 68, 10, 56, 57, 24, 25, 26,
- 27, 61, 60, 66, 29, 66, 173, 174, 49, 50,
- 51, 52, 53, 54, 55, 62, 184, 18, 64, 67,
- 9, 188, 11, 12, 192, 14, 15, 16, 66, 18,
- 57, 9, 18, 38, 29, 24, 25, 32, 33, 66,
- 28, 61, 63, 66, 39, 40, 41, 42, 43, 44,
+ 53, 54, 55, 164, 35, 36, 67, 68, 37, 38,
+ 67, 68, 9, 9, 11, 12, 8, 14, 15, 16,
+ 61, 18, 67, 68, 62, 56, 57, 24, 25, 26,
+ 27, 10, 62, 61, 60, 66, 174, 175, 49, 50,
+ 51, 52, 53, 54, 55, 64, 185, 29, 66, 18,
+ 9, 189, 11, 12, 193, 14, 15, 16, 66, 18,
+ 57, 67, 9, 18, 29, 24, 25, 32, 33, 66,
+ 28, 38, 61, 63, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 61, 66, 66, 3, 28, 166, 36, 57, 39,
- 40, 41, 67, 91, 111, 119, 179, 66, 58, 49,
- 50, 51, 52, 53, 54, 55, -1, -1, 39, 40,
+ 55, 66, 66, 61, 66, 3, 3, 29, 57, 39,
+ 40, 41, 67, 37, 92, 112, 120, 66, 167, 49,
+ 50, 51, 52, 53, 54, 55, 180, 59, 39, 40,
41, -1, -1, -1, -1, -1, -1, 67, 49, 50,
51, 52, 53, 54, 55, -1, -1, 39, 40, 41,
-1, -1, -1, -1, -1, -1, 67, 49, 50, 51,
@@ -869,26 +869,26 @@ static const yytype_int16 yycheck[] =
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 70, 0, 1, 34, 71, 72, 76, 58, 72,
- 16, 3, 4, 5, 77, 9, 61, 78, 9, 79,
- 59, 9, 6, 73, 61, 7, 74, 9, 80, 81,
- 61, 8, 75, 62, 81, 10, 82, 83, 61, 60,
- 14, 16, 35, 36, 62, 83, 9, 10, 11, 12,
- 14, 15, 16, 18, 24, 25, 26, 27, 30, 35,
- 36, 56, 57, 66, 87, 89, 90, 91, 102, 103,
- 16, 17, 84, 23, 28, 64, 66, 66, 102, 103,
- 90, 103, 90, 91, 103, 63, 64, 66, 37, 38,
- 29, 32, 33, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 85, 18, 103, 66, 96, 103, 103, 103, 9, 29,
- 67, 67, 9, 103, 88, 91, 90, 90, 31, 66,
- 98, 89, 103, 103, 103, 103, 103, 103, 103, 103,
+ 0, 70, 0, 1, 34, 71, 72, 76, 58, 71,
+ 72, 16, 3, 4, 5, 77, 9, 61, 78, 9,
+ 79, 59, 9, 6, 73, 61, 7, 74, 9, 80,
+ 81, 61, 8, 75, 62, 81, 10, 82, 83, 61,
+ 60, 14, 16, 35, 36, 62, 83, 9, 10, 11,
+ 12, 14, 15, 16, 18, 24, 25, 26, 27, 30,
+ 35, 36, 56, 57, 66, 87, 89, 90, 91, 102,
+ 103, 16, 17, 84, 23, 28, 64, 66, 66, 102,
+ 103, 90, 103, 90, 91, 103, 63, 64, 66, 37,
+ 38, 29, 32, 33, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 85, 18, 103, 66, 96, 103, 103, 103, 9,
+ 29, 67, 67, 9, 103, 88, 91, 90, 90, 31,
+ 66, 98, 89, 103, 103, 103, 103, 103, 103, 103,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
- 19, 20, 21, 22, 86, 85, 103, 65, 67, 28,
- 98, 65, 67, 68, 99, 63, 92, 61, 91, 10,
- 13, 100, 101, 63, 66, 95, 96, 94, 67, 68,
- 103, 97, 103, 61, 66, 101, 67, 67, 68, 93,
- 90, 103, 66, 67, 90, 67
+ 103, 19, 20, 21, 22, 86, 85, 103, 65, 67,
+ 28, 98, 65, 67, 68, 99, 63, 92, 61, 91,
+ 10, 13, 100, 101, 63, 66, 95, 96, 94, 67,
+ 68, 103, 97, 103, 61, 66, 101, 67, 67, 68,
+ 93, 90, 103, 66, 67, 90, 67
};
#define yyerrok (yyerrstatus = 0)
@@ -1755,8 +1755,8 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 7:
-#line 206 "grammar.y"
+ case 8:
+#line 207 "grammar.y"
{
int result = yr_parser_reduce_import(yyscanner, (yyvsp[(2) - (2)].sized_string));
@@ -1766,8 +1766,8 @@ yyreduce:
}
break;
- case 8:
-#line 218 "grammar.y"
+ case 9:
+#line 219 "grammar.y"
{
int result = yr_parser_reduce_rule_declaration(
yyscanner,
@@ -1783,15 +1783,15 @@ yyreduce:
}
break;
- case 9:
-#line 236 "grammar.y"
+ case 10:
+#line 237 "grammar.y"
{
(yyval.meta) = NULL;
}
break;
- case 10:
-#line 240 "grammar.y"
+ case 11:
+#line 241 "grammar.y"
{
// Each rule have a list of meta-data info, consisting in a
// sequence of YR_META structures. The last YR_META structure does
@@ -1816,16 +1816,16 @@ yyreduce:
}
break;
- case 11:
-#line 267 "grammar.y"
+ case 12:
+#line 268 "grammar.y"
{
(yyval.string) = NULL;
compiler->current_rule_strings = (yyval.string);
}
break;
- case 12:
-#line 272 "grammar.y"
+ case 13:
+#line 273 "grammar.y"
{
// Each rule have a list of strings, consisting in a sequence
// of YR_STRING structures. The last YR_STRING structure does not
@@ -1851,35 +1851,35 @@ yyreduce:
}
break;
- case 14:
-#line 304 "grammar.y"
- { (yyval.integer) = 0; }
- break;
-
case 15:
#line 305 "grammar.y"
- { (yyval.integer) = (yyvsp[(1) - (2)].integer) | (yyvsp[(2) - (2)].integer); }
+ { (yyval.integer) = 0; }
break;
case 16:
-#line 310 "grammar.y"
- { (yyval.integer) = RULE_GFLAGS_PRIVATE; }
+#line 306 "grammar.y"
+ { (yyval.integer) = (yyvsp[(1) - (2)].integer) | (yyvsp[(2) - (2)].integer); }
break;
case 17:
#line 311 "grammar.y"
- { (yyval.integer) = RULE_GFLAGS_GLOBAL; }
+ { (yyval.integer) = RULE_GFLAGS_PRIVATE; }
break;
case 18:
-#line 317 "grammar.y"
+#line 312 "grammar.y"
+ { (yyval.integer) = RULE_GFLAGS_GLOBAL; }
+ break;
+
+ case 19:
+#line 318 "grammar.y"
{
(yyval.c_string) = NULL;
}
break;
- case 19:
-#line 321 "grammar.y"
+ case 20:
+#line 322 "grammar.y"
{
// Tags list is represented in the arena as a sequence
// of null-terminated strings, the sequence ends with an
@@ -1895,8 +1895,8 @@ yyreduce:
}
break;
- case 20:
-#line 339 "grammar.y"
+ case 21:
+#line 340 "grammar.y"
{
char* identifier;
@@ -1911,8 +1911,8 @@ yyreduce:
}
break;
- case 21:
-#line 352 "grammar.y"
+ case 22:
+#line 353 "grammar.y"
{
char* tag_name = (yyvsp[(1) - (2)].c_string);
size_t tag_length = tag_name != NULL ? strlen(tag_name) : 0;
@@ -1946,18 +1946,18 @@ yyreduce:
}
break;
- case 22:
-#line 388 "grammar.y"
+ case 23:
+#line 389 "grammar.y"
{ (yyval.meta) = (yyvsp[(1) - (1)].meta); }
break;
- case 23:
-#line 389 "grammar.y"
+ case 24:
+#line 390 "grammar.y"
{ (yyval.meta) = (yyvsp[(1) - (2)].meta); }
break;
- case 24:
-#line 395 "grammar.y"
+ case 25:
+#line 396 "grammar.y"
{
SIZED_STRING* sized_string = (yyvsp[(3) - (3)].sized_string);
@@ -1975,8 +1975,8 @@ yyreduce:
}
break;
- case 25:
-#line 411 "grammar.y"
+ case 26:
+#line 412 "grammar.y"
{
(yyval.meta) = yr_parser_reduce_meta_declaration(
yyscanner,
@@ -1991,8 +1991,8 @@ yyreduce:
}
break;
- case 26:
-#line 424 "grammar.y"
+ case 27:
+#line 425 "grammar.y"
{
(yyval.meta) = yr_parser_reduce_meta_declaration(
yyscanner,
@@ -2007,8 +2007,8 @@ yyreduce:
}
break;
- case 27:
-#line 437 "grammar.y"
+ case 28:
+#line 438 "grammar.y"
{
(yyval.meta) = yr_parser_reduce_meta_declaration(
yyscanner,
@@ -2023,18 +2023,18 @@ yyreduce:
}
break;
- case 28:
-#line 453 "grammar.y"
+ case 29:
+#line 454 "grammar.y"
{ (yyval.string) = (yyvsp[(1) - (1)].string); }
break;
- case 29:
-#line 454 "grammar.y"
+ case 30:
+#line 455 "grammar.y"
{ (yyval.string) = (yyvsp[(1) - (2)].string); }
break;
- case 30:
-#line 460 "grammar.y"
+ case 31:
+#line 461 "grammar.y"
{
(yyval.string) = yr_parser_reduce_string_declaration(
yyscanner,
@@ -2049,15 +2049,15 @@ yyreduce:
}
break;
- case 31:
-#line 473 "grammar.y"
+ case 32:
+#line 474 "grammar.y"
{
compiler->error_line = yyget_lineno(yyscanner);
}
break;
- case 32:
-#line 477 "grammar.y"
+ case 33:
+#line 478 "grammar.y"
{
(yyval.string) = yr_parser_reduce_string_declaration(
yyscanner,
@@ -2072,8 +2072,8 @@ yyreduce:
}
break;
- case 33:
-#line 490 "grammar.y"
+ case 34:
+#line 491 "grammar.y"
{
(yyval.string) = yr_parser_reduce_string_declaration(
yyscanner,
@@ -2088,38 +2088,38 @@ yyreduce:
}
break;
- case 34:
-#line 506 "grammar.y"
- { (yyval.integer) = 0; }
- break;
-
case 35:
#line 507 "grammar.y"
- { (yyval.integer) = (yyvsp[(1) - (2)].integer) | (yyvsp[(2) - (2)].integer); }
+ { (yyval.integer) = 0; }
break;
case 36:
-#line 512 "grammar.y"
- { (yyval.integer) = STRING_GFLAGS_WIDE; }
+#line 508 "grammar.y"
+ { (yyval.integer) = (yyvsp[(1) - (2)].integer) | (yyvsp[(2) - (2)].integer); }
break;
case 37:
#line 513 "grammar.y"
- { (yyval.integer) = STRING_GFLAGS_ASCII; }
+ { (yyval.integer) = STRING_GFLAGS_WIDE; }
break;
case 38:
#line 514 "grammar.y"
- { (yyval.integer) = STRING_GFLAGS_NO_CASE; }
+ { (yyval.integer) = STRING_GFLAGS_ASCII; }
break;
case 39:
#line 515 "grammar.y"
- { (yyval.integer) = STRING_GFLAGS_FULL_WORD; }
+ { (yyval.integer) = STRING_GFLAGS_NO_CASE; }
break;
case 40:
-#line 521 "grammar.y"
+#line 516 "grammar.y"
+ { (yyval.integer) = STRING_GFLAGS_FULL_WORD; }
+ break;
+
+ case 41:
+#line 522 "grammar.y"
{
YR_OBJECT* object = NULL;
YR_RULE* rule;
@@ -2209,8 +2209,8 @@ yyreduce:
}
break;
- case 41:
-#line 609 "grammar.y"
+ case 42:
+#line 610 "grammar.y"
{
YR_OBJECT* object = (yyvsp[(1) - (3)].object);
YR_OBJECT* field = NULL;
@@ -2261,8 +2261,8 @@ yyreduce:
}
break;
- case 42:
-#line 658 "grammar.y"
+ case 43:
+#line 659 "grammar.y"
{
if ((yyvsp[(1) - (4)].object) != NULL && (yyvsp[(1) - (4)].object)->type == OBJECT_TYPE_ARRAY)
{
@@ -2313,8 +2313,8 @@ yyreduce:
}
break;
- case 43:
-#line 708 "grammar.y"
+ case 44:
+#line 709 "grammar.y"
{
char* args_fmt;
@@ -2353,15 +2353,15 @@ yyreduce:
}
break;
- case 44:
-#line 749 "grammar.y"
+ case 45:
+#line 750 "grammar.y"
{
(yyval.c_string) = yr_strdup("");
}
break;
- case 45:
-#line 753 "grammar.y"
+ case 46:
+#line 754 "grammar.y"
{
(yyval.c_string) = (char*) yr_malloc(MAX_FUNCTION_ARGS + 1);
@@ -2385,8 +2385,8 @@ yyreduce:
}
break;
- case 46:
-#line 775 "grammar.y"
+ case 47:
+#line 776 "grammar.y"
{
if (strlen((yyvsp[(1) - (3)].c_string)) == MAX_FUNCTION_ARGS)
{
@@ -2417,8 +2417,8 @@ yyreduce:
}
break;
- case 47:
-#line 808 "grammar.y"
+ case 48:
+#line 809 "grammar.y"
{
SIZED_STRING* sized_string = (yyvsp[(1) - (1)].sized_string);
RE* re;
@@ -2461,8 +2461,8 @@ yyreduce:
}
break;
- case 48:
-#line 853 "grammar.y"
+ case 49:
+#line 854 "grammar.y"
{
if ((yyvsp[(1) - (1)].expression).type == EXPRESSION_TYPE_STRING)
{
@@ -2478,8 +2478,8 @@ yyreduce:
}
break;
- case 49:
-#line 870 "grammar.y"
+ case 50:
+#line 871 "grammar.y"
{
compiler->last_result = yr_parser_emit_with_arg(
yyscanner, OP_PUSH, 1, NULL);
@@ -2490,8 +2490,8 @@ yyreduce:
}
break;
- case 50:
-#line 879 "grammar.y"
+ case 51:
+#line 880 "grammar.y"
{
compiler->last_result = yr_parser_emit_with_arg(
yyscanner, OP_PUSH, 0, NULL);
@@ -2502,8 +2502,8 @@ yyreduce:
}
break;
- case 51:
-#line 888 "grammar.y"
+ case 52:
+#line 889 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_STRING, "matches");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_REGEXP, "matches");
@@ -2520,8 +2520,8 @@ yyreduce:
}
break;
- case 52:
-#line 903 "grammar.y"
+ case 53:
+#line 904 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_STRING, "contains");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_STRING, "contains");
@@ -2537,8 +2537,8 @@ yyreduce:
}
break;
- case 53:
-#line 917 "grammar.y"
+ case 54:
+#line 918 "grammar.y"
{
int result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2554,8 +2554,8 @@ yyreduce:
}
break;
- case 54:
-#line 931 "grammar.y"
+ case 55:
+#line 932 "grammar.y"
{
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "at");
@@ -2573,8 +2573,8 @@ yyreduce:
}
break;
- case 55:
-#line 947 "grammar.y"
+ case 56:
+#line 948 "grammar.y"
{
compiler->last_result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2590,8 +2590,8 @@ yyreduce:
}
break;
- case 56:
-#line 961 "grammar.y"
+ case 57:
+#line 962 "grammar.y"
{
int var_index;
@@ -2628,8 +2628,8 @@ yyreduce:
}
break;
- case 57:
-#line 996 "grammar.y"
+ case 58:
+#line 997 "grammar.y"
{
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth;
int8_t* addr;
@@ -2666,8 +2666,8 @@ yyreduce:
}
break;
- case 58:
-#line 1031 "grammar.y"
+ case 59:
+#line 1032 "grammar.y"
{
int mem_offset;
@@ -2748,8 +2748,8 @@ yyreduce:
}
break;
- case 59:
-#line 1110 "grammar.y"
+ case 60:
+#line 1111 "grammar.y"
{
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth;
int8_t* addr;
@@ -2781,8 +2781,8 @@ yyreduce:
}
break;
- case 60:
-#line 1140 "grammar.y"
+ case 61:
+#line 1141 "grammar.y"
{
int mem_offset;
@@ -2833,8 +2833,8 @@ yyreduce:
}
break;
- case 61:
-#line 1189 "grammar.y"
+ case 62:
+#line 1190 "grammar.y"
{
yr_parser_emit(yyscanner, OP_OF, NULL);
@@ -2842,8 +2842,8 @@ yyreduce:
}
break;
- case 62:
-#line 1195 "grammar.y"
+ case 63:
+#line 1196 "grammar.y"
{
yr_parser_emit(yyscanner, OP_NOT, NULL);
@@ -2851,8 +2851,8 @@ yyreduce:
}
break;
- case 63:
-#line 1201 "grammar.y"
+ case 64:
+#line 1202 "grammar.y"
{
yr_parser_emit(yyscanner, OP_AND, NULL);
@@ -2860,8 +2860,8 @@ yyreduce:
}
break;
- case 64:
-#line 1207 "grammar.y"
+ case 65:
+#line 1208 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_BOOLEAN, "or");
@@ -2871,8 +2871,8 @@ yyreduce:
}
break;
- case 65:
-#line 1215 "grammar.y"
+ case 66:
+#line 1216 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "<");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "<");
@@ -2883,8 +2883,8 @@ yyreduce:
}
break;
- case 66:
-#line 1224 "grammar.y"
+ case 67:
+#line 1225 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, ">");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, ">");
@@ -2895,8 +2895,8 @@ yyreduce:
}
break;
- case 67:
-#line 1233 "grammar.y"
+ case 68:
+#line 1234 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "<=");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "<=");
@@ -2907,8 +2907,8 @@ yyreduce:
}
break;
- case 68:
-#line 1242 "grammar.y"
+ case 69:
+#line 1243 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, ">=");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, ">=");
@@ -2919,8 +2919,8 @@ yyreduce:
}
break;
- case 69:
-#line 1251 "grammar.y"
+ case 70:
+#line 1252 "grammar.y"
{
if ((yyvsp[(1) - (3)].expression).type != (yyvsp[(3) - (3)].expression).type)
{
@@ -2949,8 +2949,8 @@ yyreduce:
}
break;
- case 70:
-#line 1278 "grammar.y"
+ case 71:
+#line 1279 "grammar.y"
{
if ((yyvsp[(1) - (3)].expression).type != (yyvsp[(3) - (3)].expression).type)
{
@@ -2979,8 +2979,8 @@ yyreduce:
}
break;
- case 71:
-#line 1305 "grammar.y"
+ case 72:
+#line 1306 "grammar.y"
{
if ((yyvsp[(1) - (3)].expression).type != (yyvsp[(3) - (3)].expression).type)
{
@@ -3009,32 +3009,32 @@ yyreduce:
}
break;
- case 72:
-#line 1332 "grammar.y"
+ case 73:
+#line 1333 "grammar.y"
{
(yyval.expression) = (yyvsp[(1) - (1)].expression);
}
break;
- case 73:
-#line 1336 "grammar.y"
+ case 74:
+#line 1337 "grammar.y"
{
(yyval.expression) = (yyvsp[(2) - (3)].expression);
}
break;
- case 74:
-#line 1343 "grammar.y"
+ case 75:
+#line 1344 "grammar.y"
{ (yyval.integer) = INTEGER_SET_ENUMERATION; }
break;
- case 75:
-#line 1344 "grammar.y"
+ case 76:
+#line 1345 "grammar.y"
{ (yyval.integer) = INTEGER_SET_RANGE; }
break;
- case 76:
-#line 1350 "grammar.y"
+ case 77:
+#line 1351 "grammar.y"
{
if ((yyvsp[(2) - (6)].expression).type != EXPRESSION_TYPE_INTEGER)
{
@@ -3054,8 +3054,8 @@ yyreduce:
}
break;
- case 77:
-#line 1372 "grammar.y"
+ case 78:
+#line 1373 "grammar.y"
{
if ((yyvsp[(1) - (1)].expression).type != EXPRESSION_TYPE_INTEGER)
{
@@ -3069,8 +3069,8 @@ yyreduce:
}
break;
- case 78:
-#line 1384 "grammar.y"
+ case 79:
+#line 1385 "grammar.y"
{
if ((yyvsp[(3) - (3)].expression).type != EXPRESSION_TYPE_INTEGER)
{
@@ -3083,61 +3083,61 @@ yyreduce:
}
break;
- case 79:
-#line 1399 "grammar.y"
+ case 80:
+#line 1400 "grammar.y"
{
// Push end-of-list marker
yr_parser_emit_with_arg(yyscanner, OP_PUSH, UNDEFINED, NULL);
}
break;
- case 81:
-#line 1405 "grammar.y"
+ case 82:
+#line 1406 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, OP_PUSH, UNDEFINED, NULL);
yr_parser_emit_pushes_for_strings(yyscanner, "$*");
}
break;
- case 84:
-#line 1420 "grammar.y"
+ case 85:
+#line 1421 "grammar.y"
{
yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[(1) - (1)].c_string));
yr_free((yyvsp[(1) - (1)].c_string));
}
break;
- case 85:
-#line 1425 "grammar.y"
+ case 86:
+#line 1426 "grammar.y"
{
yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[(1) - (1)].c_string));
yr_free((yyvsp[(1) - (1)].c_string));
}
break;
- case 87:
-#line 1435 "grammar.y"
+ case 88:
+#line 1436 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, OP_PUSH, UNDEFINED, NULL);
}
break;
- case 88:
-#line 1439 "grammar.y"
+ case 89:
+#line 1440 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, OP_PUSH, 1, NULL);
}
break;
- case 89:
-#line 1447 "grammar.y"
+ case 90:
+#line 1448 "grammar.y"
{
(yyval.expression) = (yyvsp[(2) - (3)].expression);
}
break;
- case 90:
-#line 1451 "grammar.y"
+ case 91:
+#line 1452 "grammar.y"
{
compiler->last_result = yr_parser_emit(
yyscanner, OP_FILESIZE, NULL);
@@ -3149,8 +3149,8 @@ yyreduce:
}
break;
- case 91:
-#line 1461 "grammar.y"
+ case 92:
+#line 1462 "grammar.y"
{
yywarning(yyscanner,
"Using deprecated \"entrypoint\" keyword. Use the \"entry_point\" " "function from PE module instead.");
@@ -3165,8 +3165,8 @@ yyreduce:
}
break;
- case 92:
-#line 1474 "grammar.y"
+ case 93:
+#line 1475 "grammar.y"
{
CHECK_TYPE((yyvsp[(3) - (4)].expression), EXPRESSION_TYPE_INTEGER, "intXXXX or uintXXXX");
@@ -3184,8 +3184,8 @@ yyreduce:
}
break;
- case 93:
-#line 1490 "grammar.y"
+ case 94:
+#line 1491 "grammar.y"
{
compiler->last_result = yr_parser_emit_with_arg(
yyscanner, OP_PUSH, (yyvsp[(1) - (1)].integer), NULL);
@@ -3197,8 +3197,8 @@ yyreduce:
}
break;
- case 94:
-#line 1500 "grammar.y"
+ case 95:
+#line 1501 "grammar.y"
{
SIZED_STRING* sized_string;
@@ -3223,8 +3223,8 @@ yyreduce:
}
break;
- case 95:
-#line 1523 "grammar.y"
+ case 96:
+#line 1524 "grammar.y"
{
compiler->last_result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -3241,8 +3241,8 @@ yyreduce:
}
break;
- case 96:
-#line 1538 "grammar.y"
+ case 97:
+#line 1539 "grammar.y"
{
compiler->last_result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -3259,8 +3259,8 @@ yyreduce:
}
break;
- case 97:
-#line 1553 "grammar.y"
+ case 98:
+#line 1554 "grammar.y"
{
compiler->last_result = yr_parser_emit_with_arg(
yyscanner,
@@ -3284,8 +3284,8 @@ yyreduce:
}
break;
- case 98:
-#line 1575 "grammar.y"
+ case 99:
+#line 1576 "grammar.y"
{
if ((yyvsp[(1) - (1)].object) == (YR_OBJECT*) -1) // loop identifier
{
@@ -3324,8 +3324,8 @@ yyreduce:
}
break;
- case 99:
-#line 1612 "grammar.y"
+ case 100:
+#line 1613 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "+");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "+");
@@ -3337,8 +3337,8 @@ yyreduce:
}
break;
- case 100:
-#line 1622 "grammar.y"
+ case 101:
+#line 1623 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "-");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "-");
@@ -3350,8 +3350,8 @@ yyreduce:
}
break;
- case 101:
-#line 1632 "grammar.y"
+ case 102:
+#line 1633 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "*");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "*");
@@ -3363,8 +3363,8 @@ yyreduce:
}
break;
- case 102:
-#line 1642 "grammar.y"
+ case 103:
+#line 1643 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "\\");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "\\");
@@ -3376,8 +3376,8 @@ yyreduce:
}
break;
- case 103:
-#line 1652 "grammar.y"
+ case 104:
+#line 1653 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "%");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "%");
@@ -3389,8 +3389,8 @@ yyreduce:
}
break;
- case 104:
-#line 1662 "grammar.y"
+ case 105:
+#line 1663 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "^");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "^");
@@ -3402,8 +3402,8 @@ yyreduce:
}
break;
- case 105:
-#line 1672 "grammar.y"
+ case 106:
+#line 1673 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "^");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "^");
@@ -3415,8 +3415,8 @@ yyreduce:
}
break;
- case 106:
-#line 1682 "grammar.y"
+ case 107:
+#line 1683 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "|");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "|");
@@ -3428,8 +3428,8 @@ yyreduce:
}
break;
- case 107:
-#line 1692 "grammar.y"
+ case 108:
+#line 1693 "grammar.y"
{
CHECK_TYPE((yyvsp[(2) - (2)].expression), EXPRESSION_TYPE_INTEGER, "~");
@@ -3441,8 +3441,8 @@ yyreduce:
}
break;
- case 108:
-#line 1702 "grammar.y"
+ case 109:
+#line 1703 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, "<<");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, "<<");
@@ -3454,8 +3454,8 @@ yyreduce:
}
break;
- case 109:
-#line 1712 "grammar.y"
+ case 110:
+#line 1713 "grammar.y"
{
CHECK_TYPE((yyvsp[(1) - (3)].expression), EXPRESSION_TYPE_INTEGER, ">>");
CHECK_TYPE((yyvsp[(3) - (3)].expression), EXPRESSION_TYPE_INTEGER, ">>");
@@ -3467,8 +3467,8 @@ yyreduce:
}
break;
- case 110:
-#line 1722 "grammar.y"
+ case 111:
+#line 1723 "grammar.y"
{
(yyval.expression) = (yyvsp[(1) - (1)].expression);
}
@@ -3690,6 +3690,6 @@ yyreturn:
}
-#line 1727 "grammar.y"
+#line 1728 "grammar.y"
diff --git a/libyara/grammar.y b/libyara/grammar.y
index 5e087f9..c8671a9 100644
--- a/libyara/grammar.y
+++ b/libyara/grammar.y
@@ -197,7 +197,8 @@ rules
| rules rule
| rules import
| rules error rule /* on error skip until next rule..*/
- | rules error 'include' /* .. or include statement */
+ | rules error import /* .. or import statement */
+ | rules error "include" /* .. or include statement */
;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list