Added some missing math operators

This commit is contained in:
Samuel Hammersberg 2023-02-04 15:11:56 +01:00
parent 026949ae7e
commit 66fb77c84e
25 changed files with 728 additions and 427 deletions

View file

@ -2,14 +2,17 @@
Program. Program ::= "main" "=" Exp ;
EId. Exp3 ::= Ident ;
EInt. Exp3 ::= Integer ;
EAbs. Exp ::= "\\" Ident "->" Exp ;
EApp. Exp2 ::= Exp2 Exp3 ;
EAdd. Exp1 ::= Exp1 "+" Exp2 ;
ESub. Exp1 ::= Exp1 "-" Exp2 ;
EAbs. Exp ::= "\\" Ident "->" Exp ;
EMul. Exp2 ::= Exp2 "*" Exp3 ;
EDiv. Exp2 ::= Exp2 "/" Exp3 ;
EMod. Exp2 ::= Exp2 "%" Exp3 ;
EId. Exp4 ::= Ident ;
EInt. Exp4 ::= Integer ;
coercions Exp 3 ;
coercions Exp 4 ;
comment "--" ;
comment "{-" "-}" ;