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
|
| ADD_KW expression "dans" VARIABLE TERMINAL
|
||||||
|
|
||||||
expression: expressionleft // TODO: priorité des op certainement fausse
|
expression: expressionleft // TODO: priorité des op certainement fausse
|
||||||
| gen_op
|
| op
|
||||||
| bool_op
|
|
||||||
| int_op
|
|
||||||
| list_op
|
|
||||||
|
|
||||||
expressionleft: literal
|
expressionleft: literal
|
||||||
| list
|
| list
|
||||||
| range
|
| range
|
||||||
| VARIABLE
|
| VARIABLE
|
||||||
|
|
||||||
gen_op: expressionleft SAME_OP expression
|
op: expressionleft SAME_OP expression
|
||||||
| expressionleft DIFF_OP expression
|
| expressionleft DIFF_OP expression
|
||||||
|
| expressionleft AND_OP expression
|
||||||
bool_op: expressionleft AND_OP expression
|
| expressionleft OR_OP expression
|
||||||
| expressionleft OR_OP expression
|
| NOT_OP expression
|
||||||
| NOT_OP expression
|
| expressionleft LT_OP expression
|
||||||
|
| expressionleft LE_OP expression
|
||||||
int_op: expressionleft LT_OP expression
|
| expressionleft GT_OP expression
|
||||||
| expressionleft LE_OP expression
|
| expressionleft GE_OP expression
|
||||||
| expressionleft GT_OP expression
|
| expressionleft operator expression
|
||||||
| expressionleft GE_OP expression
|
| NEG_OP expression
|
||||||
| expressionleft operator expression
|
| expressionleft CONC_OP expression
|
||||||
| NEG_OP expression
|
| expressionleft ("[" expression "]" | range)
|
||||||
|
| SIZE_OP expression
|
||||||
list_op: expressionleft CONC_OP expression
|
| "(" expression ")"
|
||||||
| expressionleft ("[" expression "]" | range)
|
|
||||||
| SIZE_OP expression
|
|
||||||
|
|
||||||
type: BOOL_TYPE
|
type: BOOL_TYPE
|
||||||
| INT_TYPE
|
| INT_TYPE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user