]> matita.cs.unibo.it Git - helm.git/commitdiff
Changed parenthesis to optional around letin ident (and type)
authordenes <??>
Thu, 18 Jun 2009 11:01:08 +0000 (11:01 +0000)
committerdenes <??>
Thu, 18 Jun 2009 11:01:08 +0000 (11:01 +0000)
helm/software/components/content_pres/cicNotationParser.ml

index 117f0926e68a1913be2b75410af406f8ae007ccd..7317f6139b0bf96e8ec4d8595b51e72d6d1ced6e 100644 (file)
@@ -712,7 +712,13 @@ EXTEND
   ];
   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";