];
term: LEVEL "10"
[
- [ "let"; var = possibly_typed_name; SYMBOL <:unicode<def>> (* ≝ *);
+ [ "let";
+ var =
+ [ LPAREN; id = IDENT; SYMBOL ":"; typ = term; RPAREN ->
+ Ast.Ident(id,None), Some typ
+ | id = IDENT; ty = OPT [ SYMBOL ":"; typ = term -> typ] ->
+ Ast.Ident(id,None), ty ];
+ SYMBOL <:unicode<def>> (* ≝ *);
p1 = term; "in"; p2 = term ->
return_term loc (Ast.LetIn (var, p1, p2))
| LETCOREC; defs = let_defs; "in";
return_term loc (Ast.Ident (id, Some s))
| s = CSYMBOL -> return_term loc (Ast.Symbol (s, 0))
| u = URI -> return_term loc (Ast.Uri (u, None))
+ | r = NREF -> return_term loc (Ast.NRef (NReference.reference_of_string r))
| n = NUMBER -> return_term loc (Ast.Num (n, 0))
| IMPLICIT -> return_term loc (Ast.Implicit)
| PLACEHOLDER -> return_term loc Ast.UserInput