]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/grafite_parser/grafiteParser.ml
{pattern} => in pattern;
[helm.git] / matita / components / grafite_parser / grafiteParser.ml
index 37569bea664cae6b8998630bfda48b1dd49eec27..b616a824b2d8c547a80cce9ae440ed9b114be7e3 100644 (file)
@@ -102,9 +102,6 @@ EXTEND
   constructor: [ [ name = IDENT; SYMBOL ":"; typ = term -> (name, typ) ] ];
   tactic_term: [ [ t = term LEVEL "90" -> t ] ];
   ident_list1: [ [ LPAREN; idents = LIST1 IDENT; RPAREN -> idents ] ];
-  tactic_term_list1: [
-    [ tactic_terms = LIST1 tactic_term SEP SYMBOL "," -> tactic_terms ]
-  ];
   nreduction_kind: [
     [ IDENT "normalize" ; delta = OPT [ IDENT "nodelta" -> () ] ->
        let delta = match delta with None -> true | _ -> false in
@@ -131,7 +128,7 @@ EXTEND
   ];
   pattern_spec: [
     [ res = OPT [
-       SYMBOL "{";
+       "in" ;
        wanted_and_sps =
         [ "match" ; wanted = tactic_term ;
           sps = OPT [ "in"; sps = sequent_pattern_spec -> sps ] ->
@@ -139,7 +136,7 @@ EXTEND
         | sps = sequent_pattern_spec ->
            None,Some sps
         ];
-       SYMBOL "}" ->
+       SYMBOL ";" ->
          let wanted,hyp_paths,goal_path =
           match wanted_and_sps with
              wanted,None -> wanted, [], Some N.UserInput
@@ -196,9 +193,6 @@ EXTEND
        | Some (`Univ univ) ->
                 G.NTactic(loc,
             [G.NAuto(loc,(Some univ,["depth",depth]@params))])
-       | Some `EmptyUniv ->
-                G.NTactic(loc,
-            [G.NAuto(loc,(Some [],["depth",depth]@params))])
        | Some `Trace ->
                 G.NMacro(loc,
              G.NAutoInteractive (loc, (None,["depth",depth]@params))))
@@ -256,13 +250,8 @@ EXTEND
    [ IDENT "demod"
    | IDENT "fast_paramod"
    | IDENT "paramod"
-   | IDENT "depth"
    | IDENT "width"
    | IDENT "size"
-   | IDENT "timeout"
-   | IDENT "library"
-   | IDENT "type"
-   | IDENT "all"
    ]
 ];
   auto_params: [
@@ -272,8 +261,7 @@ EXTEND
        | i = auto_fixed_param ; SYMBOL "="; v = [ v = int ->
               string_of_int v | v = IDENT -> v ] -> i,v ]; 
       just = OPT [ IDENT "by"; by = 
-        [ univ = tactic_term_list1 -> `Univ univ
-        | SYMBOL "{"; SYMBOL "}" -> `EmptyUniv
+        [ univ = LIST0 tactic_term SEP SYMBOL "," -> `Univ univ
         | SYMBOL "_" -> `Trace ] -> by ] -> just,params
    ]
 ];
@@ -557,12 +545,12 @@ EXTEND
         G.UnificationHint (loc, t, n)
     | IDENT "coercion"; name = IDENT;
         compose = OPT [ IDENT "nocomposites" -> () ];
-        SYMBOL ":"; ty = term; 
+        spec = OPT [ SYMBOL ":"; ty = term; 
         SYMBOL <:unicode<def>>; t = term; "on"; 
         id = [ IDENT | PIDENT ]; SYMBOL ":"; source = term;
-        "to"; target = term ->
+        "to"; target = term -> t,ty,(id,source),target ] ->
           let compose = compose = None in
-          G.NCoercion(loc,name,compose,t,ty,(id,source),target)     
+          G.NCoercion(loc,name,compose,spec)
     | IDENT "record" ; (params,name,ty,fields) = record_spec ->
         G.NObj (loc, N.Record (params,name,ty,fields))
     | IDENT "copy" ; s = IDENT; IDENT "from"; u = URI; "with";