]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/grafite_parser/grafiteParser.ml
New syntax -H1 .. Hn for clear
[helm.git] / matita / components / grafite_parser / grafiteParser.ml
index 6da952c7d2ada70e80cc973925c747d7d07a25fd..5873d29c7a1ddbfeb2ccc45599c2e376772cf132 100644 (file)
@@ -28,8 +28,6 @@
 module N  = NotationPt
 module G  = GrafiteAst
 
-type ast_statement = G.statement
-
 let exc_located_wrapper f =
   try
     f ()
@@ -220,8 +218,11 @@ EXTEND
         G.NTactic(loc,[G.NCases (loc, what, where)])
     | IDENT "change"; what = pattern_spec; "with"; with_what = tactic_term -> 
         G.NTactic(loc,[G.NChange (loc, what, with_what)])
-    | SYMBOL "@"; num = OPT NUMBER; l = LIST0 tactic_term -> 
-        G.NTactic(loc,[G.NConstructor (loc, (match num with None -> None | Some x -> Some (int_of_string x)),l)])
+    | SYMBOL "-"; ids = LIST1 IDENT ->
+        G.NTactic(loc,[G.NClear (loc, ids)])
+    | (*SYMBOL "^"*)PLACEHOLDER; num = OPT NUMBER; 
+       l = OPT [ SYMBOL "{"; l = LIST1 tactic_term; SYMBOL "}" -> l ] -> 
+        G.NTactic(loc,[G.NConstructor (loc, (match num with None -> None | Some x -> Some (int_of_string x)),match l with None -> [] | Some l -> l)])
     | IDENT "cut"; t = tactic_term -> G.NTactic(loc,[G.NCut (loc, t)])
 (*  | IDENT "discriminate"; t = tactic_term -> G.NDiscriminate (loc, t)
     | IDENT "subst"; t = tactic_term -> G.NSubst (loc, t) *)
@@ -536,9 +537,9 @@ EXTEND
       paramspec = OPT inverter_param_list ; 
       outsort = OPT [ SYMBOL ":" ; outsort = term -> outsort ] -> 
         G.NInverter (loc,name,indty,paramspec,outsort)
-    | NLETCOREC ; defs = let_defs -> 
+    | LETCOREC ; defs = let_defs -> 
         nmk_rec_corec `CoInductive defs loc
-    | NLETREC ; defs = let_defs -> 
+    | LETREC ; defs = let_defs -> 
         nmk_rec_corec `Inductive defs loc
     | IDENT "inductive"; spec = inductive_spec ->
         let (params, ind_types) = spec in
@@ -619,7 +620,7 @@ EXTEND
   statement
 ;;
 
-type db = ast_statement Grammar.Entry.e ;;
+type db = GrafiteAst.statement Grammar.Entry.e ;;
 
 class type g_status =
  object