Correction of unary minus priority
To fix: see test minus_pre.ept: node main() = (o,p:int) let o = ~-1 -> pre o + 1; p = -1 fby p + 1 tel
This commit is contained in:
parent
028c564a31
commit
1ead8a98ea
1 changed files with 2 additions and 3 deletions
|
@ -103,11 +103,10 @@ open Hept_parsetree
|
|||
%left STAR INFIX3
|
||||
%left INFIX4
|
||||
%right NOT
|
||||
%right prec_uminus
|
||||
%right FBY
|
||||
%right PRE
|
||||
%left POWER
|
||||
%right PREFIX
|
||||
%nonassoc PREFIX
|
||||
|
||||
|
||||
|
||||
|
@ -570,7 +569,7 @@ _exp:
|
|||
{ mk_op_call $2 [$1; $3] }
|
||||
| PREFIX exp
|
||||
{ mk_op_call $1 [$2] }
|
||||
| SUBTRACTIVE exp %prec prec_uminus
|
||||
| SUBTRACTIVE exp %prec PREFIX
|
||||
{ mk_op_call ("~"^$1) [$2] }
|
||||
| IF exp THEN exp ELSE exp
|
||||
{ mk_call Eifthenelse [$2; $4; $6] }
|
||||
|
|
Loading…
Reference in a new issue