]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_disambiguation/cicTextualParser2.ml
support for _ in binders, and a more coplex pattern that should help if
[helm.git] / helm / ocaml / cic_disambiguation / cicTextualParser2.ml
index 9443a35d14231026a95cdbf611b65f95d7a73bd0..1b67821c1ec8630a3d24dd71c7ae4c3e3e2042da 100644 (file)
@@ -229,10 +229,12 @@ EXTEND
     ]];
   constructor: [ [ name = IDENT; SYMBOL ":"; typ = term -> (name, typ) ] ];
   binder_vars: [
-      [ vars = LIST1 IDENT SEP SYMBOL ",";
+      [ vars = [ l = LIST1 IDENT SEP SYMBOL "," -> l | SYMBOL "_" -> ["_"]];
         typ = OPT [ SYMBOL ":"; t = term -> t ] -> (vars, typ)
-      | PAREN "("; vars = LIST1 IDENT SEP SYMBOL ",";
-        typ = OPT [ SYMBOL ":"; t = term -> t ]; PAREN ")" -> (vars, typ)
+      | PAREN "("; 
+          vars = [ l =  LIST1 IDENT SEP SYMBOL "," -> l | SYMBOL "_" -> ["_"]];
+          typ = OPT [ SYMBOL ":"; t = term -> t ]; 
+        PAREN ")" -> (vars, typ)
       ]
   ];
   term0: [ [ t = term; EOI -> return_term loc t ] ];