]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/content_pres/cicNotationParser.ml
nasty change in the lexer/parser:
[helm.git] / helm / software / components / content_pres / cicNotationParser.ml
index 14032d4512994e54c2c72fd404848a1ebee7e72b..695db149e3f0c2bc722629d589b8bfc39f61adb9 100644 (file)
@@ -608,18 +608,21 @@ EXTEND
     [ LPAREN; id = single_arg; SYMBOL ":"; typ = term; RPAREN ->
         id, Some typ
     | arg = single_arg -> arg, None
+    | id = PIDENT -> Ast.Ident (id, None), None
     | SYMBOL "_" -> Ast.Ident ("_", None), None
+    | LPAREN; id = PIDENT; SYMBOL ":"; typ = term; RPAREN ->
+        Ast.Ident (id, None), Some typ
     | LPAREN; SYMBOL "_"; SYMBOL ":"; typ = term; RPAREN ->
         Ast.Ident ("_", None), Some typ
     ]
   ];
   match_pattern: [
-    [ id = IDENT -> Ast.Pattern (id, None, [])
+    [ SYMBOL "_" -> Ast.Wildcard
+    | id = IDENT -> Ast.Pattern (id, None, [])
     | LPAREN; id = IDENT; vars = LIST1 possibly_typed_name; RPAREN ->
        Ast.Pattern (id, None, vars)
     | id = IDENT; vars = LIST1 possibly_typed_name ->
        Ast.Pattern (id, None, vars)
-    | SYMBOL "_" -> Ast.Wildcard
     ]
   ];
   binder: [
@@ -690,9 +693,11 @@ EXTEND
     ]
   ];
   binder_vars: [
-    [ vars = [
-          l = LIST1 single_arg SEP SYMBOL "," -> l
-        | SYMBOL "_" -> [Ast.Ident ("_", None)] ];
+    [ vars = [ l =
+        [ l = LIST1 single_arg SEP SYMBOL "," -> l
+        | l = LIST1 [ PIDENT | SYMBOL "_" ] SEP SYMBOL "," -> 
+            List.map (fun x -> Ast.Ident(x,None)) l
+      ] -> l ];
       typ = OPT [ SYMBOL ":"; t = term -> t ] -> (vars, typ)
     ]
   ];