|
@@ -197,9 +197,14 @@ single_assign_item: identifier '=' identifier_or_const_value {
|
|
$$=node;
|
|
$$=node;
|
|
}
|
|
}
|
|
;
|
|
;
|
|
|
|
+
|
|
where_conditions: where_condition_item {
|
|
where_conditions: where_condition_item {
|
|
$$=$1;
|
|
$$=$1;
|
|
}
|
|
}
|
|
|
|
+ | '(' where_condition_item ')' {
|
|
|
|
+ $$=$2;
|
|
|
|
+ }
|
|
|
|
+
|
|
| where_conditions bin_logical_op where_condition_item {
|
|
| where_conditions bin_logical_op where_condition_item {
|
|
cJSON* node = cJSON_CreateObject();
|
|
cJSON* node = cJSON_CreateObject();
|
|
cJSON_AddStringToObject(node, "type", $2);
|
|
cJSON_AddStringToObject(node, "type", $2);
|
|
@@ -208,12 +213,21 @@ where_conditions: where_condition_item {
|
|
cJSON_AddItemToObject(node, "right", $3);
|
|
cJSON_AddItemToObject(node, "right", $3);
|
|
$$=node;
|
|
$$=node;
|
|
}
|
|
}
|
|
|
|
+ | where_conditions bin_logical_op '(' where_conditions ')' {
|
|
|
|
+ cJSON* node = cJSON_CreateObject();
|
|
|
|
+ cJSON_AddStringToObject(node, "type", $2);
|
|
|
|
+
|
|
|
|
+ cJSON_AddItemToObject(node, "left", $1);
|
|
|
|
+ cJSON_AddItemToObject(node, "right", $4);
|
|
|
|
+ $$=node;
|
|
|
|
+ }
|
|
| unary_compare_op where_condition_item {
|
|
| unary_compare_op where_condition_item {
|
|
cJSON* node = cJSON_CreateObject();
|
|
cJSON* node = cJSON_CreateObject();
|
|
cJSON_AddStringToObject(node, "type", $1);
|
|
cJSON_AddStringToObject(node, "type", $1);
|
|
cJSON_AddItemToObject(node, "right", $2);
|
|
cJSON_AddItemToObject(node, "right", $2);
|
|
$$=node;
|
|
$$=node;
|
|
}
|
|
}
|
|
|
|
+
|
|
;
|
|
;
|
|
|
|
|
|
identifier: IDENTIFIER {
|
|
identifier: IDENTIFIER {
|