X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2Ffilter-ast.h;h=fd322df3f93aa578e842363e9c4abea91253fcc8;hb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;hp=067624906d7ad5cd1fa8cc382c095dcd7e1f5387;hpb=661dfdd190c65bad5a044e21c1d5f9ad59144bf8;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/filter/filter-ast.h b/src/lib/lttng-ctl/filter/filter-ast.h index 067624906..fd322df3f 100644 --- a/src/lib/lttng-ctl/filter/filter-ast.h +++ b/src/lib/lttng-ctl/filter/filter-ast.h @@ -6,20 +6,10 @@ * * LTTng filter AST * - * Copyright 2012 - Mathieu Desnoyers + * Copyright 2012 Mathieu Desnoyers * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* @@ -67,13 +57,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,7 +78,7 @@ 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 { @@ -134,10 +124,12 @@ struct filter_node { */ struct filter_node *child; } u; - /* prev: linked dot/arrow chain (postfix expression) */ + /* prev: backward dot/arrow chain (postfix expression) */ struct filter_node *prev; - /* next: linked bracket chain (prefix expression) */ + /* 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; @@ -179,7 +171,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);