]> matita.cs.unibo.it Git - helm.git/blobdiff - components/grafite_parser/grafiteParser.ml
Yet another refinement error localized.
[helm.git] / components / grafite_parser / grafiteParser.ml
index 5f256a1e06864d2e022a126592e7848b324ab843..9373e54b43a1de051f743a2581220677abaf4df8 100644 (file)
@@ -233,6 +233,8 @@ EXTEND
         GrafiteAst.Ring loc
     | IDENT "split" ->
         GrafiteAst.Split loc
+    | IDENT "subst" ->
+        GrafiteAst.Subst loc    
     | IDENT "symmetry" ->
         GrafiteAst.Symmetry loc
     | IDENT "transitivity"; t = tactic_term ->
@@ -325,6 +327,7 @@ EXTEND
       | IDENT "solve";
         SYMBOL "["; tacs = LIST0 SELF SEP SYMBOL "|"; SYMBOL "]"->
           GrafiteAst.Solve (loc, tacs)
+      | IDENT "progress"; tac = SELF -> GrafiteAst.Progress (loc, tac)
       | LPAREN; tac = SELF; RPAREN -> tac
       | tac = tactic -> GrafiteAst.Tactic (loc, tac)
       ]
@@ -383,8 +386,14 @@ EXTEND
      SYMBOL ":"; typ = term; SYMBOL <:unicode<def>>; SYMBOL "{" ; 
      fields = LIST0 [ 
        name = IDENT ; 
-       coercion = [ SYMBOL ":" -> false | SYMBOL ":"; SYMBOL ">" -> true ] ; 
-       ty = term -> (name,ty,coercion) 
+       coercion = [ 
+           SYMBOL ":" -> false,0 
+         | SYMBOL ":"; SYMBOL ">" -> true,0
+         | SYMBOL ":"; arity = int ; SYMBOL ">" -> true,arity
+       ]; 
+       ty = term -> 
+         let b,n = coercion in 
+         (name,ty,b,n) 
      ] SEP SYMBOL ";"; SYMBOL "}" -> 
       let params =
         List.fold_right
@@ -558,8 +567,9 @@ EXTEND
             ind_types
         in
         GrafiteAst.Obj (loc, Ast.Inductive (params, ind_types))
-    | IDENT "coercion" ; suri = URI ->
-        GrafiteAst.Coercion (loc, UriManager.uri_of_string suri, true)
+    | IDENT "coercion" ; suri = URI ; arity = OPT int ->
+        let arity = match arity with None -> 0 | Some x -> x in
+        GrafiteAst.Coercion (loc, UriManager.uri_of_string suri, true, arity)
     | IDENT "record" ; (params,name,ty,fields) = record_spec ->
         GrafiteAst.Obj (loc, Ast.Record (params,name,ty,fields))
     | IDENT "default" ; what = QSTRING ; uris = LIST1 URI ->