diff --git a/spf.lark b/spf.lark index 7ddb12e..c6f5b84 100644 --- a/spf.lark +++ b/spf.lark @@ -7,33 +7,28 @@ instruction: type declaration TERMINAL | ADD_KW expression "dans" VARIABLE TERMINAL expression: expressionleft // TODO: priorité des op certainement fausse - | gen_op - | bool_op - | int_op - | list_op + | op expressionleft: literal | list | range | VARIABLE -gen_op: expressionleft SAME_OP expression - | expressionleft DIFF_OP expression - -bool_op: expressionleft AND_OP expression - | expressionleft OR_OP expression - | NOT_OP expression - -int_op: expressionleft LT_OP expression - | expressionleft LE_OP expression - | expressionleft GT_OP expression - | expressionleft GE_OP expression - | expressionleft operator expression - | NEG_OP expression - -list_op: expressionleft CONC_OP expression - | expressionleft ("[" expression "]" | range) - | SIZE_OP expression +op: expressionleft SAME_OP expression + | expressionleft DIFF_OP expression + | expressionleft AND_OP expression + | expressionleft OR_OP expression + | NOT_OP expression + | expressionleft LT_OP expression + | expressionleft LE_OP expression + | expressionleft GT_OP expression + | expressionleft GE_OP expression + | expressionleft operator expression + | NEG_OP expression + | expressionleft CONC_OP expression + | expressionleft ("[" expression "]" | range) + | SIZE_OP expression + | "(" expression ")" type: BOOL_TYPE | INT_TYPE