9 * Copyright 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License, version 2.1 only,
13 * as published by the Free Software Foundation.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this library; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #include "filter-ast.h"
27 enum ir_op_signedness
{
31 IR_SIGN_DYN
, /* signedness determined dynamically */
37 IR_DATA_NUMERIC
, /* numeric and boolean */
40 IR_DATA_GET_CONTEXT_REF
,
53 /* left or right child */
60 enum ir_load_string_type
{
61 /* Plain, no globbing at all: `hello world`. */
62 IR_LOAD_STRING_TYPE_PLAIN
= 0,
64 /* Star at the end only: `hello *`. */
65 IR_LOAD_STRING_TYPE_GLOB_STAR_END
,
67 /* At least one star, anywhere, but not at the end only: `he*wor*`. */
68 IR_LOAD_STRING_TYPE_GLOB_STAR
,
75 enum ir_load_expression_type
{
76 IR_LOAD_EXPRESSION_GET_CONTEXT_ROOT
,
77 IR_LOAD_EXPRESSION_GET_APP_CONTEXT_ROOT
,
78 IR_LOAD_EXPRESSION_GET_PAYLOAD_ROOT
,
79 IR_LOAD_EXPRESSION_GET_SYMBOL
,
80 IR_LOAD_EXPRESSION_GET_INDEX
,
81 IR_LOAD_EXPRESSION_LOAD_FIELD
,
84 struct ir_load_expression_op
{
85 struct ir_load_expression_op
*next
;
86 enum ir_load_expression_type type
;
93 struct ir_load_expression
{
94 struct ir_load_expression_op
*child
;
100 enum ir_load_string_type type
;
106 struct ir_load_expression
*expression
;
111 enum unary_op_type type
;
115 struct ir_op_binary
{
121 struct ir_op_logical
{
128 /* common to all ops */
130 enum ir_data_type data_type
;
131 enum ir_op_signedness signedness
;
135 struct ir_op_root root
;
136 struct ir_op_load load
;
137 struct ir_op_unary unary
;
138 struct ir_op_binary binary
;
139 struct ir_op_logical logical
;
143 #endif /* _FILTER_IR_H */