Filter: make bitwise and, or, xor higher prio than relational expressions
[lttng-tools.git] / src / lib / lttng-ctl / filter / filter-ast.h
index 73d8d44e6a189bfc72550af99776d84d5711a1dd..c5c73b69e8b9ee18281e33bd1f47ccf05d2dfe95 100644 (file)
@@ -67,13 +67,13 @@ enum op_type {
        AST_OP_MOD,
        AST_OP_PLUS,
        AST_OP_MINUS,
-       AST_OP_RSHIFT,
-       AST_OP_LSHIFT,
+       AST_OP_BIT_RSHIFT,
+       AST_OP_BIT_LSHIFT,
        AST_OP_AND,
        AST_OP_OR,
-       AST_OP_BIN_AND,
-       AST_OP_BIN_OR,
-       AST_OP_BIN_XOR,
+       AST_OP_BIT_AND,
+       AST_OP_BIT_OR,
+       AST_OP_BIT_XOR,
 
        AST_OP_EQ,
        AST_OP_NE,
@@ -88,13 +88,14 @@ enum unary_op_type {
        AST_UNARY_PLUS,
        AST_UNARY_MINUS,
        AST_UNARY_NOT,
-       AST_UNARY_BIN_NOT,
+       AST_UNARY_BIT_NOT,
 };
 
 enum ast_link_type {
        AST_LINK_UNKNOWN = 0,
        AST_LINK_DOT,
        AST_LINK_RARROW,
+       AST_LINK_BRACKET,
 };
 
 struct filter_node {
@@ -133,9 +134,12 @@ struct filter_node {
                                 */
                                struct filter_node *child;
                        } u;
-                       /* linked dot/arrow chain */
+                       /* prev: backward dot/arrow chain (postfix expression) */
                        struct filter_node *prev;
+                       /* next: forward dot/arrow chain, generated by a visitor. */
                        struct filter_node *next;
+                       /* next_bracket: linked bracket chain (prefix expression) */
+                       struct filter_node *next_bracket;
                } expression;
                struct {
                        enum op_type type;
@@ -177,7 +181,6 @@ struct filter_ast *filter_parser_get_ast(struct filter_parser_ctx *parser_ctx)
        return parser_ctx->ast;
 }
 
-int filter_visitor_set_parent(struct filter_parser_ctx *ctx);
 int filter_visitor_print_xml(struct filter_parser_ctx *ctx, FILE *stream,
                        int indent);
 int filter_visitor_ir_generate(struct filter_parser_ctx *ctx);
This page took 0.02541 seconds and 5 git commands to generate.