All on one op
This commit is contained in:
parent
9c17bd6c81
commit
ce99fbb71a
37
spf.lark
37
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user