X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FgrafiteParser.ml;h=b1362b0f648c97bb131cae47537f4c848718d4be;hb=8bbe582d87984526f40182c4409cbfd43108cb79;hp=d7aae9ee8c1bc9021686b619ae096943a3d4c4a0;hpb=964844c87f7c3d7061dfeb7f2d84b6b8bbcdaf13;p=helm.git diff --git a/helm/software/components/grafite_parser/grafiteParser.ml b/helm/software/components/grafite_parser/grafiteParser.ml index d7aae9ee8..b1362b0f6 100644 --- a/helm/software/components/grafite_parser/grafiteParser.ml +++ b/helm/software/components/grafite_parser/grafiteParser.ml @@ -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)))