Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
AST_UNARY_PLUS,
AST_UNARY_MINUS,
AST_UNARY_NOT,
+ AST_UNARY_BIN_NOT,
};
enum ast_link_type {
$$ = make_node(parser_ctx, NODE_UNARY_OP);
$$->u.unary_op.type = AST_UNARY_NOT;
}
+ | NOT_BIN
+ {
+ $$ = make_node(parser_ctx, NODE_UNARY_OP);
+ $$->u.unary_op.type = AST_UNARY_BIN_NOT;
+ }
;
multiplicative_expression
struct ir_op *make_unary_op(struct filter_parser_ctx *ctx,
struct filter_node *node, enum ir_side side)
{
+ const char *op_str = "?";
+
switch (node->u.unary_op.type) {
case AST_UNARY_UNKNOWN:
default:
}
return op;
}
+ case AST_UNARY_BIN_NOT:
+ {
+ op_str = "~";
+ goto error_not_supported;
+ }
}
+
+error_not_supported:
+ fprintf(stderr, "[error] %s: unary operation '%s' not supported\n",
+ __func__, op_str);
+ return NULL;
}
static