Commit 5bc0089d authored by Brice Videau's avatar Brice Videau

Change priority of in (#) operator.

parent 4ef72124
......@@ -8,7 +8,6 @@ module CCS
:CCS_GREATER,
:CCS_LESS_OR_EQUAL,
:CCS_GREATER_OR_EQUAL,
:CCS_IN,
:CCS_ADD,
:CCS_SUBSTRACT,
:CCS_MULTIPLY,
......@@ -17,6 +16,7 @@ module CCS
:CCS_POSITIVE,
:CCS_NEGATIVE,
:CCS_NOT,
:CCS_IN,
:CCS_LIST,
:CCS_LITERAL,
:CCS_VARIABLE
......
......@@ -14,7 +14,6 @@ enum ccs_expression_type_e {
CCS_GREATER,
CCS_LESS_OR_EQUAL,
CCS_GREATER_OR_EQUAL,
CCS_IN,
CCS_ADD,
CCS_SUBSTRACT,
CCS_MULTIPLY,
......@@ -23,6 +22,7 @@ enum ccs_expression_type_e {
CCS_POSITIVE,
CCS_NEGATIVE,
CCS_NOT,
CCS_IN,
CCS_LIST,
CCS_LITERAL,
CCS_VARIABLE,
......@@ -38,10 +38,10 @@ typedef enum ccs_expression_type_e ccs_expression_type_t;
// 1 : AND
// 2 : EQUAL, NOT_EQUAL
// 3 : LESS, GREATER, LESS_OR_EQUAL, GREATER_OR_EQUAL
// 4 : IN
// 5 : ADD, SUBSTRACT
// 6 : MULTIPLY, DIVIDE, MODULO
// 7 : POSITIVE, NEGATIVE, NOT
// 4 : ADD, SUBSTRACT
// 5 : MULTIPLY, DIVIDE, MODULO
// 6 : POSITIVE, NEGATIVE, NOT
// 7 : IN
// max - 1: LIST
// max : LITERAL, VARIABLE
......
......@@ -9,10 +9,10 @@ const int ccs_expression_precedence[] = {
1,
2, 2,
3, 3, 3, 3,
4,
5, 5,
4, 4,
5, 5, 5,
6, 6, 6,
7, 7, 7,
7,
8,
9, 9
};
......@@ -22,11 +22,11 @@ const ccs_associativity_type_t ccs_expression_associativity[] = {
CCS_LEFT_TO_RIGHT,
CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT,
CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT,
CCS_LEFT_TO_RIGHT,
CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT,
CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT, CCS_LEFT_TO_RIGHT,
CCS_RIGHT_TO_LEFT, CCS_RIGHT_TO_LEFT, CCS_RIGHT_TO_LEFT,
CCS_LEFT_TO_RIGHT,
CCS_LEFT_TO_RIGHT,
CCS_ASSOCIATIVITY_TYPE_NONE, CCS_ASSOCIATIVITY_TYPE_NONE
};
......@@ -35,10 +35,10 @@ const char *ccs_expression_symbols[] = {
"&&",
"==", "!=",
"<", ">", "<=", ">=",
"#",
"+", "-",
"*", "/", "%",
"+", "-", "!",
"#",
NULL,
NULL, NULL
};
......@@ -48,10 +48,10 @@ const int ccs_expression_arity[] = {
2,
2, 2,
2, 2, 2, 2,
2,
2, 2,
2, 2, 2,
1, 1, 1,
2,
-1,
0, 0
};
......@@ -979,9 +979,6 @@ _ccs_expression_ops_broker(ccs_expression_type_t expression_type) {
case CCS_GREATER_OR_EQUAL:
return &_ccs_expr_greater_or_equal_ops;
break;
case CCS_IN:
return &_ccs_expr_in_ops;
break;
case CCS_ADD:
return &_ccs_expr_add_ops;
break;
......@@ -1006,6 +1003,9 @@ _ccs_expression_ops_broker(ccs_expression_type_t expression_type) {
case CCS_NOT:
return &_ccs_expr_not_ops;
break;
case CCS_IN:
return &_ccs_expr_in_ops;
break;
case CCS_LIST:
return &_ccs_expr_list_ops;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment