[Forensics-changes] [yara] 122/135: Fix issues with Bison 3.0
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:27:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.1.0
in repository yara.
commit bc3bc5369f1cee81a74a6457ac64e189418bce6d
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date: Sat Aug 23 23:35:23 2014 +0200
Fix issues with Bison 3.0
---
libyara/hex_grammar.c | 70 +++++++++++++++++--------------------
libyara/hex_grammar.h | 2 +-
libyara/hex_grammar.y | 6 ----
libyara/re_grammar.c | 95 ++++++++++++++++++++++++---------------------------
libyara/re_grammar.h | 2 +-
libyara/re_grammar.y | 7 ----
6 files changed, 78 insertions(+), 104 deletions(-)
diff --git a/libyara/hex_grammar.c b/libyara/hex_grammar.c
index b257bf5..79d61fb 100644
--- a/libyara/hex_grammar.c
+++ b/libyara/hex_grammar.c
@@ -107,15 +107,9 @@
#define YYERROR_VERBOSE
-#define YYDEBUG 0
-
#define mark_as_not_fast_hex_regexp() \
((RE*) yyget_extra(yyscanner))->flags &= ~RE_FLAGS_FAST_HEX_REGEXP
-#if YYDEBUG
-yydebug = 1;
-#endif
-
#define ERROR_IF(x, error) \
if (x) \
{ \
@@ -151,13 +145,13 @@ yydebug = 1;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 70 "hex_grammar.y"
+#line 64 "hex_grammar.y"
{
int integer;
RE_NODE *re_node;
}
/* Line 193 of yacc.c. */
-#line 161 "hex_grammar.c"
+#line 155 "hex_grammar.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -170,7 +164,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 174 "hex_grammar.c"
+#line 168 "hex_grammar.c"
#ifdef short
# undef short
@@ -457,8 +451,8 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 89, 89, 97, 101, 112, 117, 116, 125, 133,
- 162, 200, 228, 253, 257, 270, 278
+ 0, 83, 83, 91, 95, 106, 111, 110, 119, 127,
+ 156, 194, 222, 247, 251, 264, 272
};
#endif
@@ -1075,29 +1069,29 @@ yydestruct (yymsg, yytype, yyvaluep, yyscanner, lex_env)
switch (yytype)
{
case 16: /* "tokens" */
-#line 81 "hex_grammar.y"
+#line 75 "hex_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1081 "hex_grammar.c"
+#line 1075 "hex_grammar.c"
break;
case 17: /* "token" */
-#line 82 "hex_grammar.y"
+#line 76 "hex_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1086 "hex_grammar.c"
+#line 1080 "hex_grammar.c"
break;
case 19: /* "range" */
-#line 85 "hex_grammar.y"
+#line 79 "hex_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1091 "hex_grammar.c"
+#line 1085 "hex_grammar.c"
break;
case 20: /* "alternatives" */
-#line 84 "hex_grammar.y"
+#line 78 "hex_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1096 "hex_grammar.c"
+#line 1090 "hex_grammar.c"
break;
case 21: /* "byte" */
-#line 83 "hex_grammar.y"
+#line 77 "hex_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1101 "hex_grammar.c"
+#line 1095 "hex_grammar.c"
break;
default:
@@ -1407,7 +1401,7 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 90 "hex_grammar.y"
+#line 84 "hex_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->root_node = (yyvsp[(2) - (3)].re_node);
@@ -1415,14 +1409,14 @@ yyreduce:
break;
case 3:
-#line 98 "hex_grammar.y"
+#line 92 "hex_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;
case 4:
-#line 102 "hex_grammar.y"
+#line 96 "hex_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_CONCAT, (yyvsp[(1) - (2)].re_node), (yyvsp[(2) - (2)].re_node));
@@ -1433,21 +1427,21 @@ yyreduce:
break;
case 5:
-#line 113 "hex_grammar.y"
+#line 107 "hex_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;
case 6:
-#line 117 "hex_grammar.y"
+#line 111 "hex_grammar.y"
{
lex_env->inside_or++;
}
break;
case 7:
-#line 121 "hex_grammar.y"
+#line 115 "hex_grammar.y"
{
(yyval.re_node) = (yyvsp[(3) - (4)].re_node);
lex_env->inside_or--;
@@ -1455,7 +1449,7 @@ yyreduce:
break;
case 8:
-#line 126 "hex_grammar.y"
+#line 120 "hex_grammar.y"
{
(yyval.re_node) = (yyvsp[(2) - (3)].re_node);
(yyval.re_node)->greedy = FALSE;
@@ -1463,7 +1457,7 @@ yyreduce:
break;
case 9:
-#line 134 "hex_grammar.y"
+#line 128 "hex_grammar.y"
{
RE_NODE* re_any;
@@ -1495,7 +1489,7 @@ yyreduce:
break;
case 10:
-#line 163 "hex_grammar.y"
+#line 157 "hex_grammar.y"
{
RE_NODE* re_any;
@@ -1536,7 +1530,7 @@ yyreduce:
break;
case 11:
-#line 201 "hex_grammar.y"
+#line 195 "hex_grammar.y"
{
RE_NODE* re_any;
@@ -1567,7 +1561,7 @@ yyreduce:
break;
case 12:
-#line 229 "hex_grammar.y"
+#line 223 "hex_grammar.y"
{
RE_NODE* re_any;
@@ -1592,14 +1586,14 @@ yyreduce:
break;
case 13:
-#line 254 "hex_grammar.y"
+#line 248 "hex_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;
case 14:
-#line 258 "hex_grammar.y"
+#line 252 "hex_grammar.y"
{
mark_as_not_fast_hex_regexp();
@@ -1613,7 +1607,7 @@ yyreduce:
break;
case 15:
-#line 271 "hex_grammar.y"
+#line 265 "hex_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_LITERAL, NULL, NULL);
@@ -1624,7 +1618,7 @@ yyreduce:
break;
case 16:
-#line 279 "hex_grammar.y"
+#line 273 "hex_grammar.y"
{
uint8_t mask = (yyvsp[(1) - (1)].integer) >> 8;
@@ -1648,7 +1642,7 @@ yyreduce:
/* Line 1267 of yacc.c. */
-#line 1652 "hex_grammar.c"
+#line 1646 "hex_grammar.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1862,7 +1856,7 @@ yyreturn:
}
-#line 300 "hex_grammar.y"
+#line 294 "hex_grammar.y"
diff --git a/libyara/hex_grammar.h b/libyara/hex_grammar.h
index a10af0f..f59c007 100644
--- a/libyara/hex_grammar.h
+++ b/libyara/hex_grammar.h
@@ -54,7 +54,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 70 "hex_grammar.y"
+#line 64 "hex_grammar.y"
{
int integer;
RE_NODE *re_node;
diff --git a/libyara/hex_grammar.y b/libyara/hex_grammar.y
index 7e41d43..cf49b9a 100644
--- a/libyara/hex_grammar.y
+++ b/libyara/hex_grammar.y
@@ -32,15 +32,9 @@ limitations under the License.
#define YYERROR_VERBOSE
-#define YYDEBUG 0
-
#define mark_as_not_fast_hex_regexp() \
((RE*) yyget_extra(yyscanner))->flags &= ~RE_FLAGS_FAST_HEX_REGEXP
-#if YYDEBUG
-yydebug = 1;
-#endif
-
#define ERROR_IF(x, error) \
if (x) \
{ \
diff --git a/libyara/re_grammar.c b/libyara/re_grammar.c
index d8b3ced..4ce2197 100644
--- a/libyara/re_grammar.c
+++ b/libyara/re_grammar.c
@@ -117,13 +117,6 @@
#define YYERROR_VERBOSE
-
-#define YYDEBUG 0
-
-#if YYDEBUG
-yydebug = 1;
-#endif
-
#define ERROR_IF(x, error) \
if (x) \
{ \
@@ -159,7 +152,7 @@ yydebug = 1;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 64 "re_grammar.y"
+#line 57 "re_grammar.y"
{
int integer;
uint32_t range;
@@ -167,7 +160,7 @@ typedef union YYSTYPE
uint8_t* class_vector;
}
/* Line 193 of yacc.c. */
-#line 171 "re_grammar.c"
+#line 164 "re_grammar.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -180,7 +173,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 184 "re_grammar.c"
+#line 177 "re_grammar.c"
#ifdef short
# undef short
@@ -471,9 +464,9 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 93, 93, 98, 101, 105, 114, 129, 133, 143,
- 150, 159, 166, 175, 185, 196, 206, 210, 216, 224,
- 228, 234, 242, 248, 254, 260, 266, 272, 278
+ 0, 86, 86, 91, 94, 98, 107, 122, 126, 136,
+ 143, 152, 159, 168, 178, 189, 199, 203, 209, 217,
+ 221, 227, 235, 241, 247, 253, 259, 265, 271
};
#endif
@@ -1102,29 +1095,29 @@ yydestruct (yymsg, yytype, yyvaluep, yyscanner, lex_env)
switch (yytype)
{
case 6: /* "_CLASS_" */
-#line 85 "re_grammar.y"
+#line 78 "re_grammar.y"
{ yr_free((yyvaluep->class_vector)); };
-#line 1108 "re_grammar.c"
+#line 1101 "re_grammar.c"
break;
case 24: /* "alternative" */
-#line 86 "re_grammar.y"
+#line 79 "re_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1113 "re_grammar.c"
+#line 1106 "re_grammar.c"
break;
case 25: /* "concatenation" */
-#line 87 "re_grammar.y"
+#line 80 "re_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1118 "re_grammar.c"
+#line 1111 "re_grammar.c"
break;
case 26: /* "repeat" */
-#line 88 "re_grammar.y"
+#line 81 "re_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1123 "re_grammar.c"
+#line 1116 "re_grammar.c"
break;
case 27: /* "single" */
-#line 89 "re_grammar.y"
+#line 82 "re_grammar.y"
{ yr_re_node_destroy((yyvaluep->re_node)); };
-#line 1128 "re_grammar.c"
+#line 1121 "re_grammar.c"
break;
default:
@@ -1434,7 +1427,7 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 94 "re_grammar.y"
+#line 87 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->root_node = (yyvsp[(1) - (1)].re_node);
@@ -1442,14 +1435,14 @@ yyreduce:
break;
case 4:
-#line 102 "re_grammar.y"
+#line 95 "re_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;
case 5:
-#line 106 "re_grammar.y"
+#line 99 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ALT, (yyvsp[(1) - (3)].re_node), (yyvsp[(3) - (3)].re_node));
@@ -1461,7 +1454,7 @@ yyreduce:
break;
case 6:
-#line 115 "re_grammar.y"
+#line 108 "re_grammar.y"
{
RE_NODE* node;
@@ -1477,14 +1470,14 @@ yyreduce:
break;
case 7:
-#line 130 "re_grammar.y"
+#line 123 "re_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;
case 8:
-#line 134 "re_grammar.y"
+#line 127 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_CONCAT, (yyvsp[(1) - (2)].re_node), (yyvsp[(2) - (2)].re_node));
@@ -1495,7 +1488,7 @@ yyreduce:
break;
case 9:
-#line 144 "re_grammar.y"
+#line 137 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_STAR, (yyvsp[(1) - (2)].re_node), NULL);
@@ -1505,7 +1498,7 @@ yyreduce:
break;
case 10:
-#line 151 "re_grammar.y"
+#line 144 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_STAR, (yyvsp[(1) - (3)].re_node), NULL);
@@ -1517,7 +1510,7 @@ yyreduce:
break;
case 11:
-#line 160 "re_grammar.y"
+#line 153 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_PLUS, (yyvsp[(1) - (2)].re_node), NULL);
@@ -1527,7 +1520,7 @@ yyreduce:
break;
case 12:
-#line 167 "re_grammar.y"
+#line 160 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_PLUS, (yyvsp[(1) - (3)].re_node), NULL);
@@ -1539,7 +1532,7 @@ yyreduce:
break;
case 13:
-#line 176 "re_grammar.y"
+#line 169 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (2)].re_node), NULL);
@@ -1552,7 +1545,7 @@ yyreduce:
break;
case 14:
-#line 186 "re_grammar.y"
+#line 179 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (3)].re_node), NULL);
@@ -1566,7 +1559,7 @@ yyreduce:
break;
case 15:
-#line 197 "re_grammar.y"
+#line 190 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (2)].re_node), NULL);
@@ -1579,14 +1572,14 @@ yyreduce:
break;
case 16:
-#line 207 "re_grammar.y"
+#line 200 "re_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;
case 17:
-#line 211 "re_grammar.y"
+#line 204 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ANCHOR_START, NULL, NULL);
@@ -1595,7 +1588,7 @@ yyreduce:
break;
case 18:
-#line 217 "re_grammar.y"
+#line 210 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ANCHOR_END, NULL, NULL);
@@ -1604,14 +1597,14 @@ yyreduce:
break;
case 19:
-#line 225 "re_grammar.y"
+#line 218 "re_grammar.y"
{
(yyval.re_node) = (yyvsp[(2) - (3)].re_node);
}
break;
case 20:
-#line 229 "re_grammar.y"
+#line 222 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ANY, NULL, NULL);
@@ -1620,7 +1613,7 @@ yyreduce:
break;
case 21:
-#line 235 "re_grammar.y"
+#line 228 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_LITERAL, NULL, NULL);
@@ -1631,7 +1624,7 @@ yyreduce:
break;
case 22:
-#line 243 "re_grammar.y"
+#line 236 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_WORD_CHAR, NULL, NULL);
@@ -1640,7 +1633,7 @@ yyreduce:
break;
case 23:
-#line 249 "re_grammar.y"
+#line 242 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_WORD_CHAR, NULL, NULL);
@@ -1649,7 +1642,7 @@ yyreduce:
break;
case 24:
-#line 255 "re_grammar.y"
+#line 248 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_SPACE, NULL, NULL);
@@ -1658,7 +1651,7 @@ yyreduce:
break;
case 25:
-#line 261 "re_grammar.y"
+#line 254 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_SPACE, NULL, NULL);
@@ -1667,7 +1660,7 @@ yyreduce:
break;
case 26:
-#line 267 "re_grammar.y"
+#line 260 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_DIGIT, NULL, NULL);
@@ -1676,7 +1669,7 @@ yyreduce:
break;
case 27:
-#line 273 "re_grammar.y"
+#line 266 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_DIGIT, NULL, NULL);
@@ -1685,7 +1678,7 @@ yyreduce:
break;
case 28:
-#line 279 "re_grammar.y"
+#line 272 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_CLASS, NULL, NULL);
@@ -1697,7 +1690,7 @@ yyreduce:
/* Line 1267 of yacc.c. */
-#line 1701 "re_grammar.c"
+#line 1694 "re_grammar.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1911,7 +1904,7 @@ yyreturn:
}
-#line 289 "re_grammar.y"
+#line 282 "re_grammar.y"
diff --git a/libyara/re_grammar.h b/libyara/re_grammar.h
index 3974664..b9574b0 100644
--- a/libyara/re_grammar.h
+++ b/libyara/re_grammar.h
@@ -68,7 +68,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 64 "re_grammar.y"
+#line 57 "re_grammar.y"
{
int integer;
uint32_t range;
diff --git a/libyara/re_grammar.y b/libyara/re_grammar.y
index 6d1cc19..61855ea 100644
--- a/libyara/re_grammar.y
+++ b/libyara/re_grammar.y
@@ -28,13 +28,6 @@ limitations under the License.
#define YYERROR_VERBOSE
-
-#define YYDEBUG 0
-
-#if YYDEBUG
-yydebug = 1;
-#endif
-
#define ERROR_IF(x, error) \
if (x) \
{ \
--
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