[Forensics-changes] [yara] 205/415: Fix compiler warnings
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository yara.
commit 02faf4671f65b0b8bf0527f41431ba77c42da38f
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Tue Oct 29 18:03:07 2013 +0000
Fix compiler warnings
---
libyara/atoms.c | 2 +-
libyara/grammar.c | 141 +++++++++++++++++++++++++---------------------------
libyara/grammar.y | 7 ---
libyara/hex_lexer.c | 33 ++++++------
libyara/hex_lexer.l | 1 +
libyara/re.h | 4 ++
libyara/re_lexer.c | 73 +++++++++++++--------------
libyara/re_lexer.l | 1 +
8 files changed, 128 insertions(+), 134 deletions(-)
diff --git a/libyara/atoms.c b/libyara/atoms.c
index 9c737b7..81e891f 100644
--- a/libyara/atoms.c
+++ b/libyara/atoms.c
@@ -42,7 +42,7 @@ The strings "abc", "ed" and "fgh" are atoms.
#endif
#ifndef max
-define max(x, y) ((x > y) ? (x) : (y))
+#define max(x, y) ((x > y) ? (x) : (y))
#endif
diff --git a/libyara/grammar.c b/libyara/grammar.c
index 8dcdcc2..1950ea2 100644
--- a/libyara/grammar.c
+++ b/libyara/grammar.c
@@ -618,13 +618,13 @@ static const yytype_uint16 yyrline[] =
218, 246, 250, 251, 255, 256, 260, 261, 276, 286,
320, 321, 325, 341, 354, 367, 383, 384, 388, 401,
414, 430, 431, 435, 436, 437, 438, 442, 443, 447,
- 451, 482, 515, 519, 530, 541, 545, 556, 562, 599,
- 561, 698, 697, 767, 771, 774, 778, 782, 786, 790,
- 794, 798, 802, 806, 810, 817, 836, 850, 851, 855,
- 859, 860, 864, 863, 868, 875, 876, 879, 884, 891,
- 892, 896, 903, 904, 908, 912, 916, 920, 924, 928,
- 932, 936, 940, 951, 962, 976, 1004, 1008, 1012, 1016,
- 1020, 1024, 1028, 1032, 1036, 1040, 1044, 1050, 1051, 1052
+ 451, 481, 510, 514, 525, 536, 540, 551, 557, 594,
+ 556, 693, 692, 761, 765, 768, 772, 776, 780, 784,
+ 788, 792, 796, 800, 804, 811, 830, 844, 845, 849,
+ 853, 854, 858, 857, 862, 869, 870, 873, 878, 885,
+ 886, 890, 897, 898, 902, 906, 910, 914, 918, 922,
+ 926, 930, 934, 945, 956, 970, 997, 1001, 1005, 1009,
+ 1013, 1017, 1021, 1025, 1029, 1033, 1037, 1043, 1044, 1045
};
#endif
@@ -2128,7 +2128,6 @@ yyreduce:
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
RULE* rule;
- EXTERNAL_VARIABLE* external;
rule = (RULE*) yr_hash_table_lookup(
compiler->rules_table,
@@ -2158,15 +2157,11 @@ yyreduce:
break;
case 41:
-#line 483 "grammar.y"
+#line 482 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
SIZED_STRING* sized_string = (yyvsp[(3) - (3)].sized_string);
RE* re;
-
- char* string;
- int error_offset;
- int result;
compiler->last_result = yr_parse_re_string(
sized_string->c_string, &re);
@@ -2194,14 +2189,14 @@ yyreduce:
break;
case 42:
-#line 516 "grammar.y"
+#line 511 "grammar.y"
{
yr_parser_emit(yyscanner, CONTAINS, NULL);
}
break;
case 43:
-#line 520 "grammar.y"
+#line 515 "grammar.y"
{
int result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2215,7 +2210,7 @@ yyreduce:
break;
case 44:
-#line 531 "grammar.y"
+#line 526 "grammar.y"
{
int result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2229,14 +2224,14 @@ yyreduce:
break;
case 45:
-#line 542 "grammar.y"
+#line 537 "grammar.y"
{
yr_free((yyvsp[(1) - (4)].c_string));
}
break;
case 46:
-#line 546 "grammar.y"
+#line 541 "grammar.y"
{
int result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2250,7 +2245,7 @@ yyreduce:
break;
case 47:
-#line 557 "grammar.y"
+#line 552 "grammar.y"
{
yr_free((yyvsp[(1) - (6)].c_string));
yr_free((yyvsp[(5) - (6)].sized_string));
@@ -2258,7 +2253,7 @@ yyreduce:
break;
case 48:
-#line 562 "grammar.y"
+#line 557 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
int result = ERROR_SUCCESS;
@@ -2298,7 +2293,7 @@ yyreduce:
break;
case 49:
-#line 599 "grammar.y"
+#line 594 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth;
@@ -2335,7 +2330,7 @@ yyreduce:
break;
case 50:
-#line 633 "grammar.y"
+#line 628 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
int mem_offset;
@@ -2403,11 +2398,10 @@ yyreduce:
break;
case 51:
-#line 698 "grammar.y"
+#line 693 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth;
- int result = ERROR_SUCCESS;
int8_t* addr;
if (compiler->loop_depth == MAX_LOOP_NESTING)
@@ -2432,7 +2426,7 @@ yyreduce:
break;
case 52:
-#line 724 "grammar.y"
+#line 718 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
int mem_offset;
@@ -2479,90 +2473,90 @@ yyreduce:
break;
case 53:
-#line 768 "grammar.y"
+#line 762 "grammar.y"
{
yr_parser_emit(yyscanner, OF, NULL);
}
break;
case 54:
-#line 772 "grammar.y"
+#line 766 "grammar.y"
{
}
break;
case 55:
-#line 775 "grammar.y"
+#line 769 "grammar.y"
{
yr_parser_emit(yyscanner, NOT, NULL);
}
break;
case 56:
-#line 779 "grammar.y"
+#line 773 "grammar.y"
{
yr_parser_emit(yyscanner, AND, NULL);
}
break;
case 57:
-#line 783 "grammar.y"
+#line 777 "grammar.y"
{
yr_parser_emit(yyscanner, OR, NULL);
}
break;
case 58:
-#line 787 "grammar.y"
+#line 781 "grammar.y"
{
yr_parser_emit(yyscanner, LT, NULL);
}
break;
case 59:
-#line 791 "grammar.y"
+#line 785 "grammar.y"
{
yr_parser_emit(yyscanner, GT, NULL);
}
break;
case 60:
-#line 795 "grammar.y"
+#line 789 "grammar.y"
{
yr_parser_emit(yyscanner, LE, NULL);
}
break;
case 61:
-#line 799 "grammar.y"
+#line 793 "grammar.y"
{
yr_parser_emit(yyscanner, GE, NULL);
}
break;
case 62:
-#line 803 "grammar.y"
+#line 797 "grammar.y"
{
yr_parser_emit(yyscanner, EQ, NULL);
}
break;
case 63:
-#line 807 "grammar.y"
+#line 801 "grammar.y"
{
yr_parser_emit(yyscanner, EQ, NULL);
}
break;
case 64:
-#line 811 "grammar.y"
+#line 805 "grammar.y"
{
yr_parser_emit(yyscanner, NEQ, NULL);
}
break;
case 65:
-#line 818 "grammar.y"
+#line 812 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
SIZED_STRING* sized_string = (yyvsp[(1) - (1)].sized_string);
@@ -2584,7 +2578,7 @@ yyreduce:
break;
case 66:
-#line 837 "grammar.y"
+#line 831 "grammar.y"
{
int result = yr_parser_reduce_external(
yyscanner,
@@ -2598,24 +2592,24 @@ yyreduce:
break;
case 67:
-#line 850 "grammar.y"
+#line 844 "grammar.y"
{ (yyval.integer) = INTEGER_SET_ENUMERATION; }
break;
case 68:
-#line 851 "grammar.y"
+#line 845 "grammar.y"
{ (yyval.integer) = INTEGER_SET_RANGE; }
break;
case 72:
-#line 864 "grammar.y"
+#line 858 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, PUSH, UNDEFINED, NULL);
}
break;
case 74:
-#line 869 "grammar.y"
+#line 863 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, PUSH, UNDEFINED, NULL);
yr_parser_emit_pushes_for_strings(yyscanner, "$*");
@@ -2623,7 +2617,7 @@ yyreduce:
break;
case 77:
-#line 880 "grammar.y"
+#line 874 "grammar.y"
{
yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[(1) - (1)].c_string));
yr_free((yyvsp[(1) - (1)].c_string));
@@ -2631,7 +2625,7 @@ yyreduce:
break;
case 78:
-#line 885 "grammar.y"
+#line 879 "grammar.y"
{
yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[(1) - (1)].c_string));
yr_free((yyvsp[(1) - (1)].c_string));
@@ -2639,84 +2633,84 @@ yyreduce:
break;
case 80:
-#line 893 "grammar.y"
+#line 887 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, PUSH, UNDEFINED, NULL);
}
break;
case 81:
-#line 897 "grammar.y"
+#line 891 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, PUSH, 1, NULL);
}
break;
case 83:
-#line 905 "grammar.y"
+#line 899 "grammar.y"
{
yr_parser_emit(yyscanner, SIZE, NULL);
}
break;
case 84:
-#line 909 "grammar.y"
+#line 903 "grammar.y"
{
yr_parser_emit(yyscanner, ENTRYPOINT, NULL);
}
break;
case 85:
-#line 913 "grammar.y"
+#line 907 "grammar.y"
{
yr_parser_emit(yyscanner, INT8, NULL);
}
break;
case 86:
-#line 917 "grammar.y"
+#line 911 "grammar.y"
{
yr_parser_emit(yyscanner, INT16, NULL);
}
break;
case 87:
-#line 921 "grammar.y"
+#line 915 "grammar.y"
{
yr_parser_emit(yyscanner, INT32, NULL);
}
break;
case 88:
-#line 925 "grammar.y"
+#line 919 "grammar.y"
{
yr_parser_emit(yyscanner, UINT8, NULL);
}
break;
case 89:
-#line 929 "grammar.y"
+#line 923 "grammar.y"
{
yr_parser_emit(yyscanner, UINT16, NULL);
}
break;
case 90:
-#line 933 "grammar.y"
+#line 927 "grammar.y"
{
yr_parser_emit(yyscanner, UINT32, NULL);
}
break;
case 91:
-#line 937 "grammar.y"
+#line 931 "grammar.y"
{
yr_parser_emit_with_arg(yyscanner, PUSH, (yyvsp[(1) - (1)].integer), NULL);
}
break;
case 92:
-#line 941 "grammar.y"
+#line 935 "grammar.y"
{
int result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2730,7 +2724,7 @@ yyreduce:
break;
case 93:
-#line 952 "grammar.y"
+#line 946 "grammar.y"
{
int result = yr_parser_reduce_string_identifier(
yyscanner,
@@ -2744,7 +2738,7 @@ yyreduce:
break;
case 94:
-#line 963 "grammar.y"
+#line 957 "grammar.y"
{
int result = yr_parser_emit_with_arg(yyscanner, PUSH, 1, NULL);
@@ -2761,10 +2755,9 @@ yyreduce:
break;
case 95:
-#line 977 "grammar.y"
+#line 971 "grammar.y"
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
- EXTERNAL_VARIABLE* external;
int var_index;
var_index = yr_parser_lookup_loop_variable(yyscanner, (yyvsp[(1) - (1)].c_string));
@@ -2792,77 +2785,77 @@ yyreduce:
break;
case 96:
-#line 1005 "grammar.y"
+#line 998 "grammar.y"
{
yr_parser_emit(yyscanner, ADD, NULL);
}
break;
case 97:
-#line 1009 "grammar.y"
+#line 1002 "grammar.y"
{
yr_parser_emit(yyscanner, SUB, NULL);
}
break;
case 98:
-#line 1013 "grammar.y"
+#line 1006 "grammar.y"
{
yr_parser_emit(yyscanner, MUL, NULL);
}
break;
case 99:
-#line 1017 "grammar.y"
+#line 1010 "grammar.y"
{
yr_parser_emit(yyscanner, DIV, NULL);
}
break;
case 100:
-#line 1021 "grammar.y"
+#line 1014 "grammar.y"
{
yr_parser_emit(yyscanner, MOD, NULL);
}
break;
case 101:
-#line 1025 "grammar.y"
+#line 1018 "grammar.y"
{
yr_parser_emit(yyscanner, XOR, NULL);
}
break;
case 102:
-#line 1029 "grammar.y"
+#line 1022 "grammar.y"
{
yr_parser_emit(yyscanner, AND, NULL);
}
break;
case 103:
-#line 1033 "grammar.y"
+#line 1026 "grammar.y"
{
yr_parser_emit(yyscanner, OR, NULL);
}
break;
case 104:
-#line 1037 "grammar.y"
+#line 1030 "grammar.y"
{
yr_parser_emit(yyscanner, NEG, NULL);
}
break;
case 105:
-#line 1041 "grammar.y"
+#line 1034 "grammar.y"
{
yr_parser_emit(yyscanner, SHL, NULL);
}
break;
case 106:
-#line 1045 "grammar.y"
+#line 1038 "grammar.y"
{
yr_parser_emit(yyscanner, SHR, NULL);
}
@@ -2870,7 +2863,7 @@ yyreduce:
/* Line 1267 of yacc.c. */
-#line 2874 "grammar.c"
+#line 2867 "grammar.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -3084,7 +3077,7 @@ yyreturn:
}
-#line 1055 "grammar.y"
+#line 1048 "grammar.y"
diff --git a/libyara/grammar.y b/libyara/grammar.y
index 3579ba1..d0f3261 100644
--- a/libyara/grammar.y
+++ b/libyara/grammar.y
@@ -452,7 +452,6 @@ boolean_expression : '(' boolean_expression ')'
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
RULE* rule;
- EXTERNAL_VARIABLE* external;
rule = (RULE*) yr_hash_table_lookup(
compiler->rules_table,
@@ -484,10 +483,6 @@ boolean_expression : '(' boolean_expression ')'
YARA_COMPILER* compiler = yyget_extra(yyscanner);
SIZED_STRING* sized_string = $3;
RE* re;
-
- char* string;
- int error_offset;
- int result;
compiler->last_result = yr_parse_re_string(
sized_string->c_string, &re);
@@ -698,7 +693,6 @@ boolean_expression : '(' boolean_expression ')'
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth;
- int result = ERROR_SUCCESS;
int8_t* addr;
if (compiler->loop_depth == MAX_LOOP_NESTING)
@@ -976,7 +970,6 @@ expression : '(' expression ')'
| _IDENTIFIER_
{
YARA_COMPILER* compiler = yyget_extra(yyscanner);
- EXTERNAL_VARIABLE* external;
int var_index;
var_index = yr_parser_lookup_loop_variable(yyscanner, $1);
diff --git a/libyara/hex_lexer.c b/libyara/hex_lexer.c
index 9aca314..891aabf 100644
--- a/libyara/hex_lexer.c
+++ b/libyara/hex_lexer.c
@@ -481,6 +481,7 @@ limitations under the License.
#include "re.h"
#include "hex_grammar.h"
#include "hex_lexer.h"
+#include "utils.h"
#ifdef WIN32
@@ -489,7 +490,7 @@ limitations under the License.
#define YY_NO_UNISTD_H 1
-#line 493 "hex_lexer.c"
+#line 494 "hex_lexer.c"
#define INITIAL 0
#define range 1
@@ -723,11 +724,11 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 51 "hex_lexer.l"
+#line 52 "hex_lexer.l"
-#line 731 "hex_lexer.c"
+#line 732 "hex_lexer.c"
yylval = yylval_param;
@@ -826,7 +827,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 54 "hex_lexer.l"
+#line 55 "hex_lexer.l"
{
yylval->integer = xtoi(yytext);
@@ -835,7 +836,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 60 "hex_lexer.l"
+#line 61 "hex_lexer.l"
{
yytext[1] = '0'; // replace ? by 0
@@ -845,7 +846,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 67 "hex_lexer.l"
+#line 68 "hex_lexer.l"
{
yytext[0] = '0'; // replace ? by 0
@@ -855,7 +856,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 74 "hex_lexer.l"
+#line 75 "hex_lexer.l"
{
yylval->integer = 0x0000;
@@ -864,7 +865,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 80 "hex_lexer.l"
+#line 81 "hex_lexer.l"
{
BEGIN(range);
@@ -873,14 +874,14 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 86 "hex_lexer.l"
+#line 87 "hex_lexer.l"
{
return yytext[0];
}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 90 "hex_lexer.l"
+#line 91 "hex_lexer.l"
{
yylval->integer = atoi(yytext);
@@ -889,7 +890,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 96 "hex_lexer.l"
+#line 97 "hex_lexer.l"
{
BEGIN(INITIAL);
@@ -899,12 +900,12 @@ YY_RULE_SETUP
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 103 "hex_lexer.l"
+#line 104 "hex_lexer.l"
// skip whitespace
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 106 "hex_lexer.l"
+#line 107 "hex_lexer.l"
{
if (yytext[0] >= 32 && yytext[0] < 127)
@@ -920,10 +921,10 @@ YY_RULE_SETUP
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 119 "hex_lexer.l"
+#line 120 "hex_lexer.l"
ECHO;
YY_BREAK
-#line 927 "hex_lexer.c"
+#line 928 "hex_lexer.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(range):
yyterminate();
@@ -2101,7 +2102,7 @@ void hex_yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 119 "hex_lexer.l"
+#line 120 "hex_lexer.l"
diff --git a/libyara/hex_lexer.l b/libyara/hex_lexer.l
index 67a74ee..916935b 100644
--- a/libyara/hex_lexer.l
+++ b/libyara/hex_lexer.l
@@ -23,6 +23,7 @@ limitations under the License.
#include "re.h"
#include "hex_grammar.h"
#include "hex_lexer.h"
+#include "utils.h"
#ifdef WIN32
diff --git a/libyara/re.h b/libyara/re.h
index 79d1217..e03aa51 100644
--- a/libyara/re.h
+++ b/libyara/re.h
@@ -121,6 +121,10 @@ typedef void RE_MATCH_CALLBACK_FUNC(
void* args);
+int yr_re_create(
+ RE** re);
+
+
RE_NODE* yr_re_node_create(
int type,
RE_NODE* left,
diff --git a/libyara/re_lexer.c b/libyara/re_lexer.c
index 8874d8d..161c671 100644
--- a/libyara/re_lexer.c
+++ b/libyara/re_lexer.c
@@ -503,6 +503,7 @@ limitations under the License.
#include "re.h"
#include "re_grammar.h"
#include "re_lexer.h"
+#include "utils.h"
#ifdef WIN32
@@ -520,7 +521,7 @@ uint8_t read_escaped_char(yyscan_t yyscanner);
#define YY_NO_UNISTD_H 1
-#line 524 "re_lexer.c"
+#line 525 "re_lexer.c"
#define INITIAL 0
#define char_class 1
@@ -757,10 +758,10 @@ YY_DECL
register int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-#line 60 "re_lexer.l"
+#line 61 "re_lexer.l"
-#line 764 "re_lexer.c"
+#line 765 "re_lexer.c"
yylval = yylval_param;
@@ -860,7 +861,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 62 "re_lexer.l"
+#line 63 "re_lexer.l"
{
// If ^ was found just at the beginning of the regexp
@@ -872,7 +873,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 72 "re_lexer.l"
+#line 73 "re_lexer.l"
{
// In a perfect world we would be able to detect a trailing $
@@ -887,7 +888,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 85 "re_lexer.l"
+#line 86 "re_lexer.l"
{
// Examples: {3,8} {0,5} {,5} {7,}
@@ -923,7 +924,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 119 "re_lexer.l"
+#line 120 "re_lexer.l"
{
// Example: {10}
@@ -943,7 +944,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 137 "re_lexer.l"
+#line 138 "re_lexer.l"
{
// Start of a negated character class. Example: [^abcd]
@@ -955,7 +956,7 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 146 "re_lexer.l"
+#line 147 "re_lexer.l"
{
// Start of character negated class containing a ].
@@ -970,7 +971,7 @@ YY_RULE_SETUP
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 159 "re_lexer.l"
+#line 160 "re_lexer.l"
{
// Start of character class containing a ].
@@ -985,7 +986,7 @@ YY_RULE_SETUP
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 172 "re_lexer.l"
+#line 173 "re_lexer.l"
{
// Start of character class. Example: [abcd]
@@ -998,7 +999,7 @@ YY_RULE_SETUP
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
-#line 182 "re_lexer.l"
+#line 183 "re_lexer.l"
{
// Any non-special character is passed as a CHAR token to the scanner.
@@ -1009,49 +1010,49 @@ YY_RULE_SETUP
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 191 "re_lexer.l"
+#line 192 "re_lexer.l"
{
return _WORD_CHAR_;
}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 196 "re_lexer.l"
+#line 197 "re_lexer.l"
{
return _NON_WORD_CHAR_;
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 201 "re_lexer.l"
+#line 202 "re_lexer.l"
{
return _SPACE_;
}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 206 "re_lexer.l"
+#line 207 "re_lexer.l"
{
return _NON_SPACE_;
}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 211 "re_lexer.l"
+#line 212 "re_lexer.l"
{
return _DIGIT_;
}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 216 "re_lexer.l"
+#line 217 "re_lexer.l"
{
return _NON_DIGIT_;
}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 221 "re_lexer.l"
+#line 222 "re_lexer.l"
{
yylval->integer = read_escaped_char(yyscanner);
return _CHAR_;
@@ -1059,7 +1060,7 @@ YY_RULE_SETUP
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 227 "re_lexer.l"
+#line 228 "re_lexer.l"
{
// End of character class.
@@ -1082,7 +1083,7 @@ YY_RULE_SETUP
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
-#line 247 "re_lexer.l"
+#line 248 "re_lexer.l"
{
// A range inside a character class.
@@ -1111,7 +1112,7 @@ YY_RULE_SETUP
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 274 "re_lexer.l"
+#line 275 "re_lexer.l"
{
LEX_ENV->class_vector[']' / 8] |= 1 << ']' % 8;
@@ -1119,7 +1120,7 @@ YY_RULE_SETUP
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 280 "re_lexer.l"
+#line 281 "re_lexer.l"
{
int i;
@@ -1134,7 +1135,7 @@ YY_RULE_SETUP
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 293 "re_lexer.l"
+#line 294 "re_lexer.l"
{
int i;
@@ -1149,7 +1150,7 @@ YY_RULE_SETUP
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 306 "re_lexer.l"
+#line 307 "re_lexer.l"
{
LEX_ENV->class_vector[' ' / 8] |= 1 << ' ' % 8;
@@ -1158,7 +1159,7 @@ YY_RULE_SETUP
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 313 "re_lexer.l"
+#line 314 "re_lexer.l"
{
int i;
@@ -1172,7 +1173,7 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 325 "re_lexer.l"
+#line 326 "re_lexer.l"
{
char c;
@@ -1183,7 +1184,7 @@ YY_RULE_SETUP
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 334 "re_lexer.l"
+#line 335 "re_lexer.l"
{
int i;
@@ -1198,7 +1199,7 @@ YY_RULE_SETUP
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 347 "re_lexer.l"
+#line 348 "re_lexer.l"
{
uint8_t c = read_escaped_char(yyscanner);
@@ -1208,7 +1209,7 @@ YY_RULE_SETUP
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
-#line 354 "re_lexer.l"
+#line 355 "re_lexer.l"
{
// A character class (i.e: [0-9a-f]) is represented by a 256-bits vector,
@@ -1218,7 +1219,7 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(char_class):
-#line 363 "re_lexer.l"
+#line 364 "re_lexer.l"
{
// End of regexp reached while scanning a character class.
@@ -1229,7 +1230,7 @@ case YY_STATE_EOF(char_class):
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 372 "re_lexer.l"
+#line 373 "re_lexer.l"
{
if (yytext[0] >= 32 && yytext[0] < 127)
@@ -1244,7 +1245,7 @@ YY_RULE_SETUP
}
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 386 "re_lexer.l"
+#line 387 "re_lexer.l"
{
// If $ was found just before the end of the regexp
@@ -1261,10 +1262,10 @@ case YY_STATE_EOF(INITIAL):
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 400 "re_lexer.l"
+#line 401 "re_lexer.l"
ECHO;
YY_BREAK
-#line 1268 "re_lexer.c"
+#line 1269 "re_lexer.c"
case YY_END_OF_BUFFER:
{
@@ -2441,7 +2442,7 @@ void re_yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 400 "re_lexer.l"
+#line 401 "re_lexer.l"
diff --git a/libyara/re_lexer.l b/libyara/re_lexer.l
index 0366d3e..66b7ab0 100644
--- a/libyara/re_lexer.l
+++ b/libyara/re_lexer.l
@@ -24,6 +24,7 @@ limitations under the License.
#include "re.h"
#include "re_grammar.h"
#include "re_lexer.h"
+#include "utils.h"
#ifdef WIN32
--
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