parent
3fc99af58b
commit
bea0783a17
@ -1 +1,2 @@
|
||||
/target
|
||||
grammar.html
|
||||
|
@ -0,0 +1,32 @@
|
||||
(*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
*)
|
||||
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 ;
|
Loading…
Reference in new issue