Skip to content

Commit

Permalink
Fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Jul 30, 2015
1 parent c3fe059 commit 89d44ff
Showing 1 changed file with 80 additions and 80 deletions.
160 changes: 80 additions & 80 deletions libyara/re_grammar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,219 +1497,219 @@ int yynerrs;
case 9:
#line 140 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_STAR, (yyvsp[(1) - (2)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_STAR, (yyvsp[(1) - (2)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 10:
#line 150 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_STAR, (yyvsp[(1) - (3)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_STAR, (yyvsp[(1) - (3)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->greedy = FALSE;
(yyval.re_node)->greedy = FALSE;
}
break;

case 11:
#line 162 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_PLUS, (yyvsp[(1) - (2)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_PLUS, (yyvsp[(1) - (2)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 12:
#line 172 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_PLUS, (yyvsp[(1) - (3)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_PLUS, (yyvsp[(1) - (3)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->greedy = FALSE;
(yyval.re_node)->greedy = FALSE;
}
break;

case 13:
#line 184 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (2)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (2)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->start = 0;
(yyval.re_node)->end = 1;
(yyval.re_node)->start = 0;
(yyval.re_node)->end = 1;
}
break;

case 14:
#line 197 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (3)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (3)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->start = 0;
(yyval.re_node)->end = 1;
(yyval.re_node)->greedy = FALSE;
(yyval.re_node)->start = 0;
(yyval.re_node)->end = 1;
(yyval.re_node)->greedy = FALSE;
}
break;

case 15:
#line 211 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_GREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (2)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (2)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (2)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->start = (yyvsp[(2) - (2)].range) & 0xFFFF;;
(yyval.re_node)->end = (yyvsp[(2) - (2)].range) >> 16;;
(yyval.re_node)->start = (yyvsp[(2) - (2)].range) & 0xFFFF;;
(yyval.re_node)->end = (yyvsp[(2) - (2)].range) >> 16;;
}
break;

case 16:
#line 224 "re_grammar.y"
{
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;
RE* re = yyget_extra(yyscanner);
re->flags |= RE_FLAGS_UNGREEDY;

(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (3)].re_node), NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_RANGE, (yyvsp[(1) - (3)].re_node), NULL);

DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
DESTROY_NODE_IF((yyval.re_node) == NULL, (yyvsp[(1) - (3)].re_node));
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->start = (yyvsp[(2) - (3)].range) & 0xFFFF;;
(yyval.re_node)->end = (yyvsp[(2) - (3)].range) >> 16;;
(yyval.re_node)->greedy = FALSE;
(yyval.re_node)->start = (yyvsp[(2) - (3)].range) & 0xFFFF;;
(yyval.re_node)->end = (yyvsp[(2) - (3)].range) >> 16;;
(yyval.re_node)->greedy = FALSE;
}
break;

case 17:
#line 238 "re_grammar.y"
{
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
(yyval.re_node) = (yyvsp[(1) - (1)].re_node);
}
break;

case 18:
#line 242 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_WORD_BOUNDARY, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_WORD_BOUNDARY, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 19:
#line 248 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_WORD_BOUNDARY, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_WORD_BOUNDARY, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 20:
#line 254 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ANCHOR_START, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_ANCHOR_START, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 21:
#line 260 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ANCHOR_END, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_ANCHOR_END, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 22:
#line 269 "re_grammar.y"
{
(yyval.re_node) = (yyvsp[(2) - (3)].re_node);
(yyval.re_node) = (yyvsp[(2) - (3)].re_node);
}
break;

case 23:
#line 273 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_ANY, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_ANY, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 24:
#line 279 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_LITERAL, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_LITERAL, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->value = (yyvsp[(1) - (1)].integer);
(yyval.re_node)->value = (yyvsp[(1) - (1)].integer);
}
break;

case 25:
#line 287 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_WORD_CHAR, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_WORD_CHAR, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 26:
#line 293 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_WORD_CHAR, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_WORD_CHAR, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 27:
#line 299 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_SPACE, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_SPACE, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

Expand All @@ -1725,29 +1725,29 @@ int yynerrs;
case 29:
#line 311 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_DIGIT, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_DIGIT, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 30:
#line 317 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_DIGIT, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_NON_DIGIT, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
}
break;

case 31:
#line 323 "re_grammar.y"
{
(yyval.re_node) = yr_re_node_create(RE_NODE_CLASS, NULL, NULL);
(yyval.re_node) = yr_re_node_create(RE_NODE_CLASS, NULL, NULL);

ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);
ERROR_IF((yyval.re_node) == NULL, ERROR_INSUFICIENT_MEMORY);

(yyval.re_node)->class_vector = (yyvsp[(1) - (1)].class_vector);
(yyval.re_node)->class_vector = (yyvsp[(1) - (1)].class_vector);
}
break;

Expand Down

0 comments on commit 89d44ff

Please sign in to comment.