]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_parser/grafiteParser.ml
initial implementation of `ncoercion name : type := body on name : pat to pat`
[helm.git] / helm / software / components / grafite_parser / grafiteParser.ml
index cc2bf2cdac6d96cd98feff25951991af05ece7cb..dfef4d237a0ea34c8883b2b23b1e734fb46b8fcd 100644 (file)
@@ -264,7 +264,9 @@ EXTEND
         G.NReduce (loc, kind, p)
     | IDENT "nrewrite"; dir = direction; what = tactic_term ; where = pattern_spec ->  
         G.NRewrite (loc, dir, what, where)
-    | IDENT "ntry"; LPAREN ; tac = SELF ; RPAREN -> G.NTry (loc,tac)
+    | IDENT "ntry"; tac = SELF -> G.NTry (loc,tac)
+    | IDENT "nrepeat"; tac = SELF -> G.NRepeat (loc,tac)
+    | LPAREN; l = LIST1 SELF; RPAREN -> G.NBlock (loc,l)
     | IDENT "nassumption" -> G.NAssumption loc
     | SYMBOL "#"; n=IDENT -> G.NIntro (loc,n)
     | SYMBOL "#"; SYMBOL "_" -> G.NIntro (loc,"_")
@@ -827,6 +829,11 @@ EXTEND
          G.NUnivConstraint (loc, strict,u1,u2)
     | IDENT "unification"; IDENT "hint"; n = int; t = tactic_term ->
         G.UnificationHint (loc, t, n)
+    | IDENT "ncoercion"; name = IDENT; SYMBOL ":"; ty = term; 
+        SYMBOL <:unicode<def>>; t = term; "on"; 
+        id = [ IDENT | PIDENT ]; SYMBOL ":"; source = term;
+        "to"; target = term ->
+          G.NCoercion(loc,name,t,ty,(id,source),target)     
     | IDENT "nrecord" ; (params,name,ty,fields) = record_spec ->
         G.NObj (loc, N.Record (params,name,ty,fields))
   ]];