diff options
author | Florian Westphal <fw@strlen.de> | 2019-02-08 17:02:22 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2019-02-08 21:22:51 +0100 |
commit | 72931553828af0ce85f0562b9ff8ec7f4d28e050 (patch) | |
tree | 6fe42e2a99febc3ff783f63b8219de81215cf0d3 /src/parser_bison.y | |
parent | 2cc91e6198e7ee8b9d0f8727c67a849fec393cd0 (diff) |
src: expr: add expression etype
Temporary kludge to remove all the expr->ops->type == ... patterns.
Followup patch will remove expr->ops, and make expr_ops() lookup
the correct expr_ops struct instead to reduce struct expr size.
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index 02a373cb..0f4d2df8 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1807,7 +1807,7 @@ data_type_atom_expr : type_identifier data_type_expr : data_type_atom_expr | data_type_expr DOT data_type_atom_expr { - if ($1->ops->type != EXPR_CONCAT) { + if ($1->etype != EXPR_CONCAT) { $$ = concat_expr_alloc(&@$); compound_expr_add($$, $1); } else { @@ -2741,7 +2741,7 @@ basic_stmt_expr : inclusive_or_stmt_expr concat_stmt_expr : basic_stmt_expr | concat_stmt_expr DOT primary_stmt_expr { - if ($$->ops->type != EXPR_CONCAT) { + if ($$->etype != EXPR_CONCAT) { $$ = concat_expr_alloc(&@$); compound_expr_add($$, $1); } else { @@ -3252,7 +3252,7 @@ basic_expr : inclusive_or_expr concat_expr : basic_expr | concat_expr DOT basic_expr { - if ($$->ops->type != EXPR_CONCAT) { + if ($$->etype != EXPR_CONCAT) { $$ = concat_expr_alloc(&@$); compound_expr_add($$, $1); } else { @@ -3650,7 +3650,7 @@ basic_rhs_expr : inclusive_or_rhs_expr concat_rhs_expr : basic_rhs_expr | concat_rhs_expr DOT basic_rhs_expr { - if ($$->ops->type != EXPR_CONCAT) { + if ($$->etype != EXPR_CONCAT) { $$ = concat_expr_alloc(&@$); compound_expr_add($$, $1); } else { @@ -4141,7 +4141,7 @@ ct_stmt : CT ct_key SET stmt_expr payload_stmt : payload_expr SET stmt_expr { - if ($1->ops->type == EXPR_EXTHDR) + if ($1->etype == EXPR_EXTHDR) $$ = exthdr_stmt_alloc(&@$, $1, $3); else $$ = payload_stmt_alloc(&@$, $1, $3); |