11#define OP_TKN_START PS_TOKEN_EQ
12#define OP_TKN_END PS_TOKEN_BIT_XOR
13#define OP_TKN_RANGE (OP_TKN_END - OP_TKN_START + 1)
20 .is_left_associative =
true,
26 .is_left_associative =
false,
32 .is_left_associative =
false,
38 .is_left_associative =
true,
44 .is_left_associative =
false,
51 .is_left_associative =
true,
58 .is_left_associative =
false,
64 .is_left_associative =
false,
70 .is_left_associative =
false,
76 .is_left_associative =
true,
82 .is_left_associative =
false,
88 .is_left_associative =
true,
94 .is_left_associative =
true,
100 .is_left_associative =
true,
106 .is_left_associative =
true,
112 .is_left_associative =
true,
118 .is_left_associative =
false,
124 .is_left_associative =
false,
130 .is_left_associative =
false,
136 .is_left_associative =
false,
142 .is_left_associative =
true,
148 .is_left_associative =
true,
154 .is_left_associative =
true,
160 .is_left_associative =
true,
166 .is_left_associative =
true,
172 .is_left_associative =
true,
178 .is_left_associative =
false,
184 .is_left_associative =
true,
190 .is_left_associative =
true,
196 .is_left_associative =
false,
202 .is_left_associative =
true,
210 return type >= PS_TOKEN_EQ && type <= PS_TOKEN_BIT_XOR;
Defines assertion and abortion functionality.
#define ps_assert(cond, msg)
Asserts the given condition cond, aborting via ps_abort with the given msg otherwise.
bool ps_token_type_is_op(enum ps_token_type type)
Whether type represents an operator token.
const struct ps_operator * ps_token_type_get_op(enum ps_token_type type)
Returns: the operator information associated with the given operator token.
struct ps_operator operators[OP_TKN_RANGE]
Operator precedence and associativity info.
bool is_binary
Enables processing this operator as a binary operator.
ps_token_type
The type of a token.