-- Programming Language Technology Lab 4 -- "Fun": small untyped functional language Prog. Program ::= [Def] Main ; DMain. Main ::= "main" "=" "print" Exp3 ";" ; DDef. Def ::= Ident [Ident] "=" Exp ; terminator Def ";" ; terminator Ident "" ; EVar. Exp3 ::= Ident ; EInt. Exp3 ::= Integer ; EApp. Exp2 ::= Exp2 Exp3 ; EAdd. Exp1 ::= Exp1 "+" Exp2 ; ESub. Exp1 ::= Exp1 "-" Exp2 ; ELt. Exp1 ::= Exp1 "<" Exp2 ; EIf. Exp ::= "if" Exp "then" Exp "else" Exp ; EAbs. Exp ::= "\\" Ident "->" Exp ; coercions Exp 3 ; comment "--" ; comment "{-" "-}" ;