churf/Grammar.cf
2023-02-04 15:11:56 +01:00

19 lines
366 B
CFEngine3

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