X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2Ffilter-parser.y;h=e9c2e6aabe9c1ad25891052f2af76381b2d1202f;hp=2fa41ab405259d9eec1533ff47793a5d54cc3a26;hb=831b702b8e8914a3ca3b4905a55aed93c7d30bbf;hpb=0358f3d86acfd1ccf9dc8d283cb251c56f351730 diff --git a/src/lib/lttng-ctl/filter/filter-parser.y b/src/lib/lttng-ctl/filter/filter-parser.y index 2fa41ab40..e9c2e6aab 100644 --- a/src/lib/lttng-ctl/filter/filter-parser.y +++ b/src/lib/lttng-ctl/filter/filter-parser.y @@ -596,22 +596,49 @@ shift_expression } ; -relational_expression +and_expression : shift_expression { $$ = $1; } - | relational_expression LT_OP shift_expression + | and_expression AND_BIN shift_expression + { + $$ = make_op_node(parser_ctx, AST_OP_BIT_AND, $1, $3); + } + ; + +exclusive_or_expression + : and_expression + { $$ = $1; } + | exclusive_or_expression XOR_BIN and_expression + { + $$ = make_op_node(parser_ctx, AST_OP_BIT_XOR, $1, $3); + } + ; + +inclusive_or_expression + : exclusive_or_expression + { $$ = $1; } + | inclusive_or_expression OR_BIN exclusive_or_expression + { + $$ = make_op_node(parser_ctx, AST_OP_BIT_OR, $1, $3); + } + ; + +relational_expression + : inclusive_or_expression + { $$ = $1; } + | relational_expression LT_OP inclusive_or_expression { $$ = make_op_node(parser_ctx, AST_OP_LT, $1, $3); } - | relational_expression GT_OP shift_expression + | relational_expression GT_OP inclusive_or_expression { $$ = make_op_node(parser_ctx, AST_OP_GT, $1, $3); } - | relational_expression LE_OP shift_expression + | relational_expression LE_OP inclusive_or_expression { $$ = make_op_node(parser_ctx, AST_OP_LE, $1, $3); } - | relational_expression GE_OP shift_expression + | relational_expression GE_OP inclusive_or_expression { $$ = make_op_node(parser_ctx, AST_OP_GE, $1, $3); } @@ -630,37 +657,10 @@ equality_expression } ; -and_expression - : equality_expression - { $$ = $1; } - | and_expression AND_BIN equality_expression - { - $$ = make_op_node(parser_ctx, AST_OP_BIT_AND, $1, $3); - } - ; - -exclusive_or_expression - : and_expression - { $$ = $1; } - | exclusive_or_expression XOR_BIN and_expression - { - $$ = make_op_node(parser_ctx, AST_OP_BIT_XOR, $1, $3); - } - ; - -inclusive_or_expression - : exclusive_or_expression - { $$ = $1; } - | inclusive_or_expression OR_BIN exclusive_or_expression - { - $$ = make_op_node(parser_ctx, AST_OP_BIT_OR, $1, $3); - } - ; - logical_and_expression - : inclusive_or_expression + : equality_expression { $$ = $1; } - | logical_and_expression AND_OP inclusive_or_expression + | logical_and_expression AND_OP equality_expression { $$ = make_op_node(parser_ctx, AST_OP_AND, $1, $3); }