You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
511 B

(*
*)
ast = term
| "\", {ident, [":", tagged type], ","}, ident, [":", tagged type], ".", ast ;
term = ident
| constant
| "(", ast, ")"
| term, term ;
constant = nat | float | bool ;
tagged type = type tag, ident
| type tag, ident, "=>", tagged type
| type ;
type tag = "Num" | "Any" ;
type = basic type | arrow type ;
basic type = "Nat" | "Float" | "Bool" | ident ;
arrow type = "(", type, ")", "->", type
| basic type, "->", type ;