9 * Copyright 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * SPDX-License-Identifier: LGPL-2.1-only
15 #include "filter-ast.h"
17 enum ir_op_signedness
{
21 IR_SIGN_DYN
, /* signedness determined dynamically */
27 IR_DATA_NUMERIC
, /* numeric and boolean */
30 IR_DATA_GET_CONTEXT_REF
,
43 /* left or right child */
50 enum ir_load_string_type
{
51 /* Plain, no globbing at all: `hello world`. */
52 IR_LOAD_STRING_TYPE_PLAIN
= 0,
54 /* Star at the end only: `hello *`. */
55 IR_LOAD_STRING_TYPE_GLOB_STAR_END
,
57 /* At least one star, anywhere, but not at the end only: `he*wor*`. */
58 IR_LOAD_STRING_TYPE_GLOB_STAR
,
65 enum ir_load_expression_type
{
66 IR_LOAD_EXPRESSION_GET_CONTEXT_ROOT
,
67 IR_LOAD_EXPRESSION_GET_APP_CONTEXT_ROOT
,
68 IR_LOAD_EXPRESSION_GET_PAYLOAD_ROOT
,
69 IR_LOAD_EXPRESSION_GET_SYMBOL
,
70 IR_LOAD_EXPRESSION_GET_INDEX
,
71 IR_LOAD_EXPRESSION_LOAD_FIELD
,
74 struct ir_load_expression_op
{
75 struct ir_load_expression_op
*next
;
76 enum ir_load_expression_type type
;
83 struct ir_load_expression
{
84 struct ir_load_expression_op
*child
;
90 enum ir_load_string_type type
;
96 struct ir_load_expression
*expression
;
101 enum unary_op_type type
;
105 struct ir_op_binary
{
111 struct ir_op_logical
{
118 /* common to all ops */
120 enum ir_data_type data_type
;
121 enum ir_op_signedness signedness
;
125 struct ir_op_root root
;
126 struct ir_op_load load
;
127 struct ir_op_unary unary
;
128 struct ir_op_binary binary
;
129 struct ir_op_logical logical
;
133 #endif /* _FILTER_IR_H */