... | ... |
@@ -569,14 +569,8 @@ int yr_execute_code( |
569 | 569 |
string = UINT64_TO_PTR(YR_STRING*, r2); |
570 | 570 |
#if REAL_YARA |
571 | 571 |
match = string->matches[tidx].head; |
572 |
-#else |
|
573 |
- //TBD: find clamav matches |
|
574 |
- match = NULL; //TEMP |
|
575 |
-#endif |
|
576 |
- |
|
577 | 572 |
found = 0; |
578 | 573 |
|
579 |
-#if REAL_YARA |
|
580 | 574 |
while (match != NULL) |
581 | 575 |
{ |
582 | 576 |
if (r1 == match->base + match->offset) |
... | ... |
@@ -592,6 +586,7 @@ int yr_execute_code( |
592 | 592 |
match = match->next; |
593 | 593 |
} |
594 | 594 |
#else |
595 |
+ found = 0; |
|
595 | 596 |
ls_matches = acdata->lsig_matches[aclsig->id]; |
596 | 597 |
if (ls_matches != NULL) { |
597 | 598 |
ss_matches = ls_matches->matches[string->subsig_id]; |
... | ... |
@@ -603,6 +598,8 @@ int yr_execute_code( |
603 | 603 |
found = 1; |
604 | 604 |
break; |
605 | 605 |
} |
606 |
+ if (r1 < offs[i]) |
|
607 |
+ break; |
|
606 | 608 |
} |
607 | 609 |
} |
608 | 610 |
} |
... | ... |
@@ -626,10 +623,6 @@ int yr_execute_code( |
626 | 626 |
string = UINT64_TO_PTR(YR_STRING*, r3); |
627 | 627 |
#if REAL_YARA |
628 | 628 |
match = string->matches[tidx].head; |
629 |
-#else |
|
630 |
- //TBD: find clamav matches |
|
631 |
- match = NULL; //TEMP |
|
632 |
-#endif |
|
633 | 629 |
found = FALSE; |
634 | 630 |
|
635 | 631 |
while (match != NULL && !found) |
... | ... |
@@ -646,6 +639,26 @@ int yr_execute_code( |
646 | 646 |
|
647 | 647 |
match = match->next; |
648 | 648 |
} |
649 |
+#else |
|
650 |
+ found = FALSE; |
|
651 |
+ ls_matches = acdata->lsig_matches[aclsig->id]; |
|
652 |
+ if (ls_matches != NULL) { |
|
653 |
+ ss_matches = ls_matches->matches[string->subsig_id]; |
|
654 |
+ if (ss_matches != NULL) { |
|
655 |
+ offs = ss_matches->offsets; |
|
656 |
+ for (i = 0; i < ss_matches->next; i++) { |
|
657 |
+ if (offs[i] >= r1 && |
|
658 |
+ offs[i] <= r2) { |
|
659 |
+ push(1); |
|
660 |
+ found = TRUE; |
|
661 |
+ break; |
|
662 |
+ } |
|
663 |
+ if (r2 < offs[i]) |
|
664 |
+ break; |
|
665 |
+ } |
|
666 |
+ } |
|
667 |
+ } |
|
668 |
+#endif |
|
649 | 669 |
|
650 | 670 |
if (!found) |
651 | 671 |
push(0); |
... | ... |
@@ -659,13 +659,13 @@ static const yytype_uint16 yyrline[] = |
659 | 659 |
373, 390, 429, 430, 435, 451, 464, 477, 494, 495, |
660 | 660 |
500, 514, 513, 530, 547, 548, 553, 554, 555, 556, |
661 | 661 |
561, 646, 696, 719, 759, 762, 784, 817, 864, 882, |
662 |
- 891, 900, 915, 929, 942, 959, 973, 1007, 972, 1118, |
|
663 |
- 1117, 1193, 1199, 1205, 1211, 1219, 1228, 1237, 1246, 1255, |
|
664 |
- 1282, 1309, 1336, 1340, 1348, 1349, 1354, 1376, 1388, 1404, |
|
665 |
- 1403, 1409, 1421, 1422, 1427, 1432, 1441, 1442, 1449, 1460, |
|
666 |
- 1464, 1473, 1488, 1499, 1510, 1521, 1532, 1543, 1554, 1563, |
|
667 |
- 1588, 1601, 1614, 1634, 1669, 1678, 1687, 1696, 1705, 1714, |
|
668 |
- 1723, 1732, 1741, 1749, 1758, 1767 |
|
662 |
+ 891, 900, 915, 929, 942, 959, 975, 1009, 974, 1120, |
|
663 |
+ 1119, 1195, 1201, 1207, 1213, 1221, 1230, 1239, 1248, 1257, |
|
664 |
+ 1284, 1311, 1338, 1342, 1350, 1351, 1356, 1378, 1390, 1406, |
|
665 |
+ 1405, 1411, 1423, 1424, 1429, 1434, 1443, 1444, 1451, 1462, |
|
666 |
+ 1466, 1475, 1490, 1501, 1512, 1523, 1534, 1545, 1556, 1565, |
|
667 |
+ 1590, 1603, 1616, 1636, 1671, 1680, 1689, 1698, 1707, 1716, |
|
668 |
+ 1725, 1734, 1743, 1751, 1760, 1769 |
|
669 | 669 |
}; |
670 | 670 |
#endif |
671 | 671 |
|
... | ... |
@@ -2771,6 +2771,8 @@ yyreduce: |
2771 | 2771 |
/* Line 1806 of yacc.c */ |
2772 | 2772 |
#line 960 "yara_grammar.y" |
2773 | 2773 |
{ |
2774 |
+ compiler->current_rule_clflags |= RULE_OFFSETS; |
|
2775 |
+ |
|
2774 | 2776 |
compiler->last_result = yr_parser_reduce_string_identifier( |
2775 | 2777 |
yyscanner, |
2776 | 2778 |
(yyvsp[(1) - (3)].c_string), |
... | ... |
@@ -2787,7 +2789,7 @@ yyreduce: |
2787 | 2787 |
case 56: |
2788 | 2788 |
|
2789 | 2789 |
/* Line 1806 of yacc.c */ |
2790 |
-#line 973 "yara_grammar.y" |
|
2790 |
+#line 975 "yara_grammar.y" |
|
2791 | 2791 |
{ |
2792 | 2792 |
int var_index; |
2793 | 2793 |
|
... | ... |
@@ -2826,7 +2828,7 @@ yyreduce: |
2826 | 2826 |
case 57: |
2827 | 2827 |
|
2828 | 2828 |
/* Line 1806 of yacc.c */ |
2829 |
-#line 1007 "yara_grammar.y" |
|
2829 |
+#line 1009 "yara_grammar.y" |
|
2830 | 2830 |
{ |
2831 | 2831 |
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth; |
2832 | 2832 |
|
... | ... |
@@ -2866,7 +2868,7 @@ yyreduce: |
2866 | 2866 |
case 58: |
2867 | 2867 |
|
2868 | 2868 |
/* Line 1806 of yacc.c */ |
2869 |
-#line 1042 "yara_grammar.y" |
|
2869 |
+#line 1044 "yara_grammar.y" |
|
2870 | 2870 |
{ |
2871 | 2871 |
int mem_offset; |
2872 | 2872 |
|
... | ... |
@@ -2947,7 +2949,7 @@ yyreduce: |
2947 | 2947 |
case 59: |
2948 | 2948 |
|
2949 | 2949 |
/* Line 1806 of yacc.c */ |
2950 |
-#line 1118 "yara_grammar.y" |
|
2950 |
+#line 1120 "yara_grammar.y" |
|
2951 | 2951 |
{ |
2952 | 2952 |
int mem_offset = LOOP_LOCAL_VARS * compiler->loop_depth; |
2953 | 2953 |
int8_t* addr; |
... | ... |
@@ -2982,7 +2984,7 @@ yyreduce: |
2982 | 2982 |
case 60: |
2983 | 2983 |
|
2984 | 2984 |
/* Line 1806 of yacc.c */ |
2985 |
-#line 1148 "yara_grammar.y" |
|
2985 |
+#line 1150 "yara_grammar.y" |
|
2986 | 2986 |
{ |
2987 | 2987 |
int mem_offset; |
2988 | 2988 |
|
... | ... |
@@ -3033,7 +3035,7 @@ yyreduce: |
3033 | 3033 |
case 61: |
3034 | 3034 |
|
3035 | 3035 |
/* Line 1806 of yacc.c */ |
3036 |
-#line 1194 "yara_grammar.y" |
|
3036 |
+#line 1196 "yara_grammar.y" |
|
3037 | 3037 |
{ |
3038 | 3038 |
yr_parser_emit(yyscanner, OP_OF, NULL); |
3039 | 3039 |
|
... | ... |
@@ -3044,7 +3046,7 @@ yyreduce: |
3044 | 3044 |
case 62: |
3045 | 3045 |
|
3046 | 3046 |
/* Line 1806 of yacc.c */ |
3047 |
-#line 1200 "yara_grammar.y" |
|
3047 |
+#line 1202 "yara_grammar.y" |
|
3048 | 3048 |
{ |
3049 | 3049 |
yr_parser_emit(yyscanner, OP_NOT, NULL); |
3050 | 3050 |
|
... | ... |
@@ -3055,7 +3057,7 @@ yyreduce: |
3055 | 3055 |
case 63: |
3056 | 3056 |
|
3057 | 3057 |
/* Line 1806 of yacc.c */ |
3058 |
-#line 1206 "yara_grammar.y" |
|
3058 |
+#line 1208 "yara_grammar.y" |
|
3059 | 3059 |
{ |
3060 | 3060 |
yr_parser_emit(yyscanner, OP_AND, NULL); |
3061 | 3061 |
|
... | ... |
@@ -3066,7 +3068,7 @@ yyreduce: |
3066 | 3066 |
case 64: |
3067 | 3067 |
|
3068 | 3068 |
/* Line 1806 of yacc.c */ |
3069 |
-#line 1212 "yara_grammar.y" |
|
3069 |
+#line 1214 "yara_grammar.y" |
|
3070 | 3070 |
{ |
3071 | 3071 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_BOOLEAN, "or"); |
3072 | 3072 |
|
... | ... |
@@ -3079,7 +3081,7 @@ yyreduce: |
3079 | 3079 |
case 65: |
3080 | 3080 |
|
3081 | 3081 |
/* Line 1806 of yacc.c */ |
3082 |
-#line 1220 "yara_grammar.y" |
|
3082 |
+#line 1222 "yara_grammar.y" |
|
3083 | 3083 |
{ |
3084 | 3084 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "<"); |
3085 | 3085 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "<"); |
... | ... |
@@ -3093,7 +3095,7 @@ yyreduce: |
3093 | 3093 |
case 66: |
3094 | 3094 |
|
3095 | 3095 |
/* Line 1806 of yacc.c */ |
3096 |
-#line 1229 "yara_grammar.y" |
|
3096 |
+#line 1231 "yara_grammar.y" |
|
3097 | 3097 |
{ |
3098 | 3098 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, ">"); |
3099 | 3099 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, ">"); |
... | ... |
@@ -3107,7 +3109,7 @@ yyreduce: |
3107 | 3107 |
case 67: |
3108 | 3108 |
|
3109 | 3109 |
/* Line 1806 of yacc.c */ |
3110 |
-#line 1238 "yara_grammar.y" |
|
3110 |
+#line 1240 "yara_grammar.y" |
|
3111 | 3111 |
{ |
3112 | 3112 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "<="); |
3113 | 3113 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "<="); |
... | ... |
@@ -3121,7 +3123,7 @@ yyreduce: |
3121 | 3121 |
case 68: |
3122 | 3122 |
|
3123 | 3123 |
/* Line 1806 of yacc.c */ |
3124 |
-#line 1247 "yara_grammar.y" |
|
3124 |
+#line 1249 "yara_grammar.y" |
|
3125 | 3125 |
{ |
3126 | 3126 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, ">="); |
3127 | 3127 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, ">="); |
... | ... |
@@ -3135,7 +3137,7 @@ yyreduce: |
3135 | 3135 |
case 69: |
3136 | 3136 |
|
3137 | 3137 |
/* Line 1806 of yacc.c */ |
3138 |
-#line 1256 "yara_grammar.y" |
|
3138 |
+#line 1258 "yara_grammar.y" |
|
3139 | 3139 |
{ |
3140 | 3140 |
if ((yyvsp[(1) - (3)].expression_type) != (yyvsp[(3) - (3)].expression_type)) |
3141 | 3141 |
{ |
... | ... |
@@ -3167,7 +3169,7 @@ yyreduce: |
3167 | 3167 |
case 70: |
3168 | 3168 |
|
3169 | 3169 |
/* Line 1806 of yacc.c */ |
3170 |
-#line 1283 "yara_grammar.y" |
|
3170 |
+#line 1285 "yara_grammar.y" |
|
3171 | 3171 |
{ |
3172 | 3172 |
if ((yyvsp[(1) - (3)].expression_type) != (yyvsp[(3) - (3)].expression_type)) |
3173 | 3173 |
{ |
... | ... |
@@ -3199,7 +3201,7 @@ yyreduce: |
3199 | 3199 |
case 71: |
3200 | 3200 |
|
3201 | 3201 |
/* Line 1806 of yacc.c */ |
3202 |
-#line 1310 "yara_grammar.y" |
|
3202 |
+#line 1312 "yara_grammar.y" |
|
3203 | 3203 |
{ |
3204 | 3204 |
if ((yyvsp[(1) - (3)].expression_type) != (yyvsp[(3) - (3)].expression_type)) |
3205 | 3205 |
{ |
... | ... |
@@ -3231,7 +3233,7 @@ yyreduce: |
3231 | 3231 |
case 72: |
3232 | 3232 |
|
3233 | 3233 |
/* Line 1806 of yacc.c */ |
3234 |
-#line 1337 "yara_grammar.y" |
|
3234 |
+#line 1339 "yara_grammar.y" |
|
3235 | 3235 |
{ |
3236 | 3236 |
(yyval.expression_type) = (yyvsp[(1) - (1)].expression_type); |
3237 | 3237 |
} |
... | ... |
@@ -3240,7 +3242,7 @@ yyreduce: |
3240 | 3240 |
case 73: |
3241 | 3241 |
|
3242 | 3242 |
/* Line 1806 of yacc.c */ |
3243 |
-#line 1341 "yara_grammar.y" |
|
3243 |
+#line 1343 "yara_grammar.y" |
|
3244 | 3244 |
{ |
3245 | 3245 |
(yyval.expression_type) = (yyvsp[(2) - (3)].expression_type); |
3246 | 3246 |
} |
... | ... |
@@ -3249,21 +3251,21 @@ yyreduce: |
3249 | 3249 |
case 74: |
3250 | 3250 |
|
3251 | 3251 |
/* Line 1806 of yacc.c */ |
3252 |
-#line 1348 "yara_grammar.y" |
|
3252 |
+#line 1350 "yara_grammar.y" |
|
3253 | 3253 |
{ (yyval.integer) = INTEGER_SET_ENUMERATION; } |
3254 | 3254 |
break; |
3255 | 3255 |
|
3256 | 3256 |
case 75: |
3257 | 3257 |
|
3258 | 3258 |
/* Line 1806 of yacc.c */ |
3259 |
-#line 1349 "yara_grammar.y" |
|
3259 |
+#line 1351 "yara_grammar.y" |
|
3260 | 3260 |
{ (yyval.integer) = INTEGER_SET_RANGE; } |
3261 | 3261 |
break; |
3262 | 3262 |
|
3263 | 3263 |
case 76: |
3264 | 3264 |
|
3265 | 3265 |
/* Line 1806 of yacc.c */ |
3266 |
-#line 1355 "yara_grammar.y" |
|
3266 |
+#line 1357 "yara_grammar.y" |
|
3267 | 3267 |
{ |
3268 | 3268 |
if ((yyvsp[(2) - (6)].expression_type) != EXPRESSION_TYPE_INTEGER) |
3269 | 3269 |
{ |
... | ... |
@@ -3286,7 +3288,7 @@ yyreduce: |
3286 | 3286 |
case 77: |
3287 | 3287 |
|
3288 | 3288 |
/* Line 1806 of yacc.c */ |
3289 |
-#line 1377 "yara_grammar.y" |
|
3289 |
+#line 1379 "yara_grammar.y" |
|
3290 | 3290 |
{ |
3291 | 3291 |
if ((yyvsp[(1) - (1)].expression_type) != EXPRESSION_TYPE_INTEGER) |
3292 | 3292 |
{ |
... | ... |
@@ -3303,7 +3305,7 @@ yyreduce: |
3303 | 3303 |
case 78: |
3304 | 3304 |
|
3305 | 3305 |
/* Line 1806 of yacc.c */ |
3306 |
-#line 1389 "yara_grammar.y" |
|
3306 |
+#line 1391 "yara_grammar.y" |
|
3307 | 3307 |
{ |
3308 | 3308 |
if ((yyvsp[(3) - (3)].expression_type) != EXPRESSION_TYPE_INTEGER) |
3309 | 3309 |
{ |
... | ... |
@@ -3319,7 +3321,7 @@ yyreduce: |
3319 | 3319 |
case 79: |
3320 | 3320 |
|
3321 | 3321 |
/* Line 1806 of yacc.c */ |
3322 |
-#line 1404 "yara_grammar.y" |
|
3322 |
+#line 1406 "yara_grammar.y" |
|
3323 | 3323 |
{ |
3324 | 3324 |
// Push end-of-list marker |
3325 | 3325 |
yr_parser_emit_with_arg(yyscanner, OP_PUSH, UNDEFINED, NULL); |
... | ... |
@@ -3329,7 +3331,7 @@ yyreduce: |
3329 | 3329 |
case 81: |
3330 | 3330 |
|
3331 | 3331 |
/* Line 1806 of yacc.c */ |
3332 |
-#line 1410 "yara_grammar.y" |
|
3332 |
+#line 1412 "yara_grammar.y" |
|
3333 | 3333 |
{ |
3334 | 3334 |
yr_parser_emit_with_arg(yyscanner, OP_PUSH, UNDEFINED, NULL); |
3335 | 3335 |
yr_parser_emit_pushes_for_strings(yyscanner, "$*"); |
... | ... |
@@ -3342,7 +3344,7 @@ yyreduce: |
3342 | 3342 |
case 84: |
3343 | 3343 |
|
3344 | 3344 |
/* Line 1806 of yacc.c */ |
3345 |
-#line 1428 "yara_grammar.y" |
|
3345 |
+#line 1430 "yara_grammar.y" |
|
3346 | 3346 |
{ |
3347 | 3347 |
yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[(1) - (1)].c_string)); |
3348 | 3348 |
yr_free((yyvsp[(1) - (1)].c_string)); |
... | ... |
@@ -3352,7 +3354,7 @@ yyreduce: |
3352 | 3352 |
case 85: |
3353 | 3353 |
|
3354 | 3354 |
/* Line 1806 of yacc.c */ |
3355 |
-#line 1433 "yara_grammar.y" |
|
3355 |
+#line 1435 "yara_grammar.y" |
|
3356 | 3356 |
{ |
3357 | 3357 |
yr_parser_emit_pushes_for_strings(yyscanner, (yyvsp[(1) - (1)].c_string)); |
3358 | 3358 |
yr_free((yyvsp[(1) - (1)].c_string)); |
... | ... |
@@ -3362,7 +3364,7 @@ yyreduce: |
3362 | 3362 |
case 87: |
3363 | 3363 |
|
3364 | 3364 |
/* Line 1806 of yacc.c */ |
3365 |
-#line 1443 "yara_grammar.y" |
|
3365 |
+#line 1445 "yara_grammar.y" |
|
3366 | 3366 |
{ |
3367 | 3367 |
yr_parser_emit_with_arg(yyscanner, OP_PUSH, UNDEFINED, NULL); |
3368 | 3368 |
#ifdef YARA_PROTO |
... | ... |
@@ -3374,7 +3376,7 @@ yyreduce: |
3374 | 3374 |
case 88: |
3375 | 3375 |
|
3376 | 3376 |
/* Line 1806 of yacc.c */ |
3377 |
-#line 1450 "yara_grammar.y" |
|
3377 |
+#line 1452 "yara_grammar.y" |
|
3378 | 3378 |
{ |
3379 | 3379 |
yr_parser_emit_with_arg(yyscanner, OP_PUSH, 1, NULL); |
3380 | 3380 |
#ifdef YARA_PROTO |
... | ... |
@@ -3386,7 +3388,7 @@ yyreduce: |
3386 | 3386 |
case 89: |
3387 | 3387 |
|
3388 | 3388 |
/* Line 1806 of yacc.c */ |
3389 |
-#line 1461 "yara_grammar.y" |
|
3389 |
+#line 1463 "yara_grammar.y" |
|
3390 | 3390 |
{ |
3391 | 3391 |
(yyval.expression_type) = (yyvsp[(2) - (3)].expression_type); |
3392 | 3392 |
} |
... | ... |
@@ -3395,7 +3397,7 @@ yyreduce: |
3395 | 3395 |
case 90: |
3396 | 3396 |
|
3397 | 3397 |
/* Line 1806 of yacc.c */ |
3398 |
-#line 1465 "yara_grammar.y" |
|
3398 |
+#line 1467 "yara_grammar.y" |
|
3399 | 3399 |
{ |
3400 | 3400 |
compiler->last_result = yr_parser_emit( |
3401 | 3401 |
yyscanner, OP_FILESIZE, NULL); |
... | ... |
@@ -3409,7 +3411,7 @@ yyreduce: |
3409 | 3409 |
case 91: |
3410 | 3410 |
|
3411 | 3411 |
/* Line 1806 of yacc.c */ |
3412 |
-#line 1474 "yara_grammar.y" |
|
3412 |
+#line 1476 "yara_grammar.y" |
|
3413 | 3413 |
{ |
3414 | 3414 |
#ifndef YARA_PROTO |
3415 | 3415 |
yywarning(yyscanner, |
... | ... |
@@ -3429,7 +3431,7 @@ yyreduce: |
3429 | 3429 |
case 92: |
3430 | 3430 |
|
3431 | 3431 |
/* Line 1806 of yacc.c */ |
3432 |
-#line 1489 "yara_grammar.y" |
|
3432 |
+#line 1491 "yara_grammar.y" |
|
3433 | 3433 |
{ |
3434 | 3434 |
CHECK_TYPE((yyvsp[(3) - (4)].expression_type), EXPRESSION_TYPE_INTEGER, "int8"); |
3435 | 3435 |
|
... | ... |
@@ -3445,7 +3447,7 @@ yyreduce: |
3445 | 3445 |
case 93: |
3446 | 3446 |
|
3447 | 3447 |
/* Line 1806 of yacc.c */ |
3448 |
-#line 1500 "yara_grammar.y" |
|
3448 |
+#line 1502 "yara_grammar.y" |
|
3449 | 3449 |
{ |
3450 | 3450 |
CHECK_TYPE((yyvsp[(3) - (4)].expression_type), EXPRESSION_TYPE_INTEGER, "int16"); |
3451 | 3451 |
|
... | ... |
@@ -3461,7 +3463,7 @@ yyreduce: |
3461 | 3461 |
case 94: |
3462 | 3462 |
|
3463 | 3463 |
/* Line 1806 of yacc.c */ |
3464 |
-#line 1511 "yara_grammar.y" |
|
3464 |
+#line 1513 "yara_grammar.y" |
|
3465 | 3465 |
{ |
3466 | 3466 |
CHECK_TYPE((yyvsp[(3) - (4)].expression_type), EXPRESSION_TYPE_INTEGER, "int32"); |
3467 | 3467 |
|
... | ... |
@@ -3477,7 +3479,7 @@ yyreduce: |
3477 | 3477 |
case 95: |
3478 | 3478 |
|
3479 | 3479 |
/* Line 1806 of yacc.c */ |
3480 |
-#line 1522 "yara_grammar.y" |
|
3480 |
+#line 1524 "yara_grammar.y" |
|
3481 | 3481 |
{ |
3482 | 3482 |
CHECK_TYPE((yyvsp[(3) - (4)].expression_type), EXPRESSION_TYPE_INTEGER, "uint8"); |
3483 | 3483 |
|
... | ... |
@@ -3493,7 +3495,7 @@ yyreduce: |
3493 | 3493 |
case 96: |
3494 | 3494 |
|
3495 | 3495 |
/* Line 1806 of yacc.c */ |
3496 |
-#line 1533 "yara_grammar.y" |
|
3496 |
+#line 1535 "yara_grammar.y" |
|
3497 | 3497 |
{ |
3498 | 3498 |
CHECK_TYPE((yyvsp[(3) - (4)].expression_type), EXPRESSION_TYPE_INTEGER, "uint16"); |
3499 | 3499 |
|
... | ... |
@@ -3509,7 +3511,7 @@ yyreduce: |
3509 | 3509 |
case 97: |
3510 | 3510 |
|
3511 | 3511 |
/* Line 1806 of yacc.c */ |
3512 |
-#line 1544 "yara_grammar.y" |
|
3512 |
+#line 1546 "yara_grammar.y" |
|
3513 | 3513 |
{ |
3514 | 3514 |
CHECK_TYPE((yyvsp[(3) - (4)].expression_type), EXPRESSION_TYPE_INTEGER, "uint32"); |
3515 | 3515 |
|
... | ... |
@@ -3525,7 +3527,7 @@ yyreduce: |
3525 | 3525 |
case 98: |
3526 | 3526 |
|
3527 | 3527 |
/* Line 1806 of yacc.c */ |
3528 |
-#line 1555 "yara_grammar.y" |
|
3528 |
+#line 1557 "yara_grammar.y" |
|
3529 | 3529 |
{ |
3530 | 3530 |
compiler->last_result = yr_parser_emit_with_arg( |
3531 | 3531 |
yyscanner, OP_PUSH, (yyvsp[(1) - (1)].integer), NULL); |
... | ... |
@@ -3539,7 +3541,7 @@ yyreduce: |
3539 | 3539 |
case 99: |
3540 | 3540 |
|
3541 | 3541 |
/* Line 1806 of yacc.c */ |
3542 |
-#line 1564 "yara_grammar.y" |
|
3542 |
+#line 1566 "yara_grammar.y" |
|
3543 | 3543 |
{ |
3544 | 3544 |
SIZED_STRING* sized_string = (yyvsp[(1) - (1)].sized_string); |
3545 | 3545 |
char* string; |
... | ... |
@@ -3569,7 +3571,7 @@ yyreduce: |
3569 | 3569 |
case 100: |
3570 | 3570 |
|
3571 | 3571 |
/* Line 1806 of yacc.c */ |
3572 |
-#line 1589 "yara_grammar.y" |
|
3572 |
+#line 1591 "yara_grammar.y" |
|
3573 | 3573 |
{ |
3574 | 3574 |
compiler->last_result = yr_parser_reduce_string_identifier( |
3575 | 3575 |
yyscanner, |
... | ... |
@@ -3587,7 +3589,7 @@ yyreduce: |
3587 | 3587 |
case 101: |
3588 | 3588 |
|
3589 | 3589 |
/* Line 1806 of yacc.c */ |
3590 |
-#line 1602 "yara_grammar.y" |
|
3590 |
+#line 1604 "yara_grammar.y" |
|
3591 | 3591 |
{ |
3592 | 3592 |
compiler->last_result = yr_parser_reduce_string_identifier( |
3593 | 3593 |
yyscanner, |
... | ... |
@@ -3605,7 +3607,7 @@ yyreduce: |
3605 | 3605 |
case 102: |
3606 | 3606 |
|
3607 | 3607 |
/* Line 1806 of yacc.c */ |
3608 |
-#line 1615 "yara_grammar.y" |
|
3608 |
+#line 1617 "yara_grammar.y" |
|
3609 | 3609 |
{ |
3610 | 3610 |
compiler->last_result = yr_parser_emit_with_arg( |
3611 | 3611 |
yyscanner, |
... | ... |
@@ -3630,7 +3632,7 @@ yyreduce: |
3630 | 3630 |
case 103: |
3631 | 3631 |
|
3632 | 3632 |
/* Line 1806 of yacc.c */ |
3633 |
-#line 1635 "yara_grammar.y" |
|
3633 |
+#line 1637 "yara_grammar.y" |
|
3634 | 3634 |
{ |
3635 | 3635 |
if ((yyvsp[(1) - (1)].object) == (YR_OBJECT*) -1) // loop identifier |
3636 | 3636 |
{ |
... | ... |
@@ -3670,7 +3672,7 @@ yyreduce: |
3670 | 3670 |
case 104: |
3671 | 3671 |
|
3672 | 3672 |
/* Line 1806 of yacc.c */ |
3673 |
-#line 1670 "yara_grammar.y" |
|
3673 |
+#line 1672 "yara_grammar.y" |
|
3674 | 3674 |
{ |
3675 | 3675 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "+"); |
3676 | 3676 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "+"); |
... | ... |
@@ -3684,7 +3686,7 @@ yyreduce: |
3684 | 3684 |
case 105: |
3685 | 3685 |
|
3686 | 3686 |
/* Line 1806 of yacc.c */ |
3687 |
-#line 1679 "yara_grammar.y" |
|
3687 |
+#line 1681 "yara_grammar.y" |
|
3688 | 3688 |
{ |
3689 | 3689 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "-"); |
3690 | 3690 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "-"); |
... | ... |
@@ -3698,7 +3700,7 @@ yyreduce: |
3698 | 3698 |
case 106: |
3699 | 3699 |
|
3700 | 3700 |
/* Line 1806 of yacc.c */ |
3701 |
-#line 1688 "yara_grammar.y" |
|
3701 |
+#line 1690 "yara_grammar.y" |
|
3702 | 3702 |
{ |
3703 | 3703 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "*"); |
3704 | 3704 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "*"); |
... | ... |
@@ -3712,7 +3714,7 @@ yyreduce: |
3712 | 3712 |
case 107: |
3713 | 3713 |
|
3714 | 3714 |
/* Line 1806 of yacc.c */ |
3715 |
-#line 1697 "yara_grammar.y" |
|
3715 |
+#line 1699 "yara_grammar.y" |
|
3716 | 3716 |
{ |
3717 | 3717 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "\\"); |
3718 | 3718 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "\\"); |
... | ... |
@@ -3726,7 +3728,7 @@ yyreduce: |
3726 | 3726 |
case 108: |
3727 | 3727 |
|
3728 | 3728 |
/* Line 1806 of yacc.c */ |
3729 |
-#line 1706 "yara_grammar.y" |
|
3729 |
+#line 1708 "yara_grammar.y" |
|
3730 | 3730 |
{ |
3731 | 3731 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "%"); |
3732 | 3732 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "%"); |
... | ... |
@@ -3740,7 +3742,7 @@ yyreduce: |
3740 | 3740 |
case 109: |
3741 | 3741 |
|
3742 | 3742 |
/* Line 1806 of yacc.c */ |
3743 |
-#line 1715 "yara_grammar.y" |
|
3743 |
+#line 1717 "yara_grammar.y" |
|
3744 | 3744 |
{ |
3745 | 3745 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "^"); |
3746 | 3746 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "^"); |
... | ... |
@@ -3754,7 +3756,7 @@ yyreduce: |
3754 | 3754 |
case 110: |
3755 | 3755 |
|
3756 | 3756 |
/* Line 1806 of yacc.c */ |
3757 |
-#line 1724 "yara_grammar.y" |
|
3757 |
+#line 1726 "yara_grammar.y" |
|
3758 | 3758 |
{ |
3759 | 3759 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "^"); |
3760 | 3760 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "^"); |
... | ... |
@@ -3768,7 +3770,7 @@ yyreduce: |
3768 | 3768 |
case 111: |
3769 | 3769 |
|
3770 | 3770 |
/* Line 1806 of yacc.c */ |
3771 |
-#line 1733 "yara_grammar.y" |
|
3771 |
+#line 1735 "yara_grammar.y" |
|
3772 | 3772 |
{ |
3773 | 3773 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "|"); |
3774 | 3774 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "|"); |
... | ... |
@@ -3782,7 +3784,7 @@ yyreduce: |
3782 | 3782 |
case 112: |
3783 | 3783 |
|
3784 | 3784 |
/* Line 1806 of yacc.c */ |
3785 |
-#line 1742 "yara_grammar.y" |
|
3785 |
+#line 1744 "yara_grammar.y" |
|
3786 | 3786 |
{ |
3787 | 3787 |
CHECK_TYPE((yyvsp[(2) - (2)].expression_type), EXPRESSION_TYPE_INTEGER, "~"); |
3788 | 3788 |
|
... | ... |
@@ -3795,7 +3797,7 @@ yyreduce: |
3795 | 3795 |
case 113: |
3796 | 3796 |
|
3797 | 3797 |
/* Line 1806 of yacc.c */ |
3798 |
-#line 1750 "yara_grammar.y" |
|
3798 |
+#line 1752 "yara_grammar.y" |
|
3799 | 3799 |
{ |
3800 | 3800 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "<<"); |
3801 | 3801 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, "<<"); |
... | ... |
@@ -3809,7 +3811,7 @@ yyreduce: |
3809 | 3809 |
case 114: |
3810 | 3810 |
|
3811 | 3811 |
/* Line 1806 of yacc.c */ |
3812 |
-#line 1759 "yara_grammar.y" |
|
3812 |
+#line 1761 "yara_grammar.y" |
|
3813 | 3813 |
{ |
3814 | 3814 |
CHECK_TYPE((yyvsp[(1) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, ">>"); |
3815 | 3815 |
CHECK_TYPE((yyvsp[(3) - (3)].expression_type), EXPRESSION_TYPE_INTEGER, ">>"); |
... | ... |
@@ -3823,7 +3825,7 @@ yyreduce: |
3823 | 3823 |
case 115: |
3824 | 3824 |
|
3825 | 3825 |
/* Line 1806 of yacc.c */ |
3826 |
-#line 1768 "yara_grammar.y" |
|
3826 |
+#line 1770 "yara_grammar.y" |
|
3827 | 3827 |
{ |
3828 | 3828 |
(yyval.expression_type) = (yyvsp[(1) - (1)].expression_type); |
3829 | 3829 |
} |
... | ... |
@@ -3832,7 +3834,7 @@ yyreduce: |
3832 | 3832 |
|
3833 | 3833 |
|
3834 | 3834 |
/* Line 1806 of yacc.c */ |
3835 |
-#line 3836 "yara_grammar.c" |
|
3835 |
+#line 3838 "yara_grammar.c" |
|
3836 | 3836 |
default: break; |
3837 | 3837 |
} |
3838 | 3838 |
/* User semantic actions sometimes alter yychar, and that requires |
... | ... |
@@ -4063,6 +4065,6 @@ yyreturn: |
4063 | 4063 |
|
4064 | 4064 |
|
4065 | 4065 |
/* Line 2067 of yacc.c */ |
4066 |
-#line 1773 "yara_grammar.y" |
|
4066 |
+#line 1775 "yara_grammar.y" |
|
4067 | 4067 |
|
4068 | 4068 |
|