]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_parser/grafiteParser.ml
some corrections ...
[helm.git] / helm / software / components / grafite_parser / grafiteParser.ml
index d7aae9ee8c1bc9021686b619ae096943a3d4c4a0..b1362b0f648c97bb131cae47537f4c848718d4be 100644 (file)
@@ -155,6 +155,7 @@ EXTEND
     | id = IDENT -> Some id ]
     ];
   ident_list0: [ [ LPAREN; idents = LIST0 new_name; RPAREN -> idents ] ];
+  ident_list1: [ [ LPAREN; idents = LIST1 IDENT; RPAREN -> idents ] ];
   tactic_term_list1: [
     [ tactic_terms = LIST1 tactic_term SEP SYMBOL "," -> tactic_terms ]
   ];
@@ -289,7 +290,10 @@ EXTEND
     | IDENT "ncut"; t = tactic_term -> G.NTactic(loc,[G.NCut (loc, t)])
 (*  | IDENT "ndiscriminate"; t = tactic_term -> G.NDiscriminate (loc, t)
     | IDENT "nsubst"; t = tactic_term -> G.NSubst (loc, t) *)
-    | IDENT "ndestruct" -> G.NTactic(loc,[G.NDestruct loc])
+    | IDENT "ndestruct"; just = OPT [ dom = ident_list1 -> dom ];
+      exclude = OPT [ IDENT "skip"; skip = ident_list1 -> skip ]
+        -> let exclude' = match exclude with None -> [] | Some l -> l in
+           G.NTactic(loc,[G.NDestruct (loc,just,exclude')])
     | IDENT "nelim"; what = tactic_term ; where = pattern_spec ->
         G.NTactic(loc,[G.NElim (loc, what, where)])
     | IDENT "ngeneralize"; p=pattern_spec ->
@@ -1054,13 +1058,13 @@ let exc_located_wrapper f =
   try
     f ()
   with
-  | Stdpp.Exc_located (_, End_of_file) -> raise End_of_file
-  | Stdpp.Exc_located (floc, Stream.Error msg) ->
+  | Ploc.Exc (_, End_of_file) -> raise End_of_file
+  | Ploc.Exc (floc, Stream.Error msg) ->
       raise (HExtlib.Localized (floc,CicNotationParser.Parse_error msg))
-  | Stdpp.Exc_located (floc, HExtlib.Localized(_,exn)) ->
+  | Ploc.Exc (floc, HExtlib.Localized(_,exn)) ->
       raise
        (HExtlib.Localized (floc,CicNotationParser.Parse_error (Printexc.to_string exn)))
-  | Stdpp.Exc_located (floc, exn) ->
+  | Ploc.Exc (floc, exn) ->
       raise
        (HExtlib.Localized (floc,CicNotationParser.Parse_error (Printexc.to_string exn)))