From 3a5ad4a99fd7f312424200a9241ea1a4ce7fcd29 Mon Sep 17 00:00:00 2001 From: Andrea Asperti Date: Fri, 10 Dec 2010 11:24:14 +0000 Subject: [PATCH] New syntax -H1 .. Hn for clear --- matita/components/grafite/grafiteAst.ml | 1 + matita/components/grafite/grafiteAstPp.ml | 1 + matita/components/grafite_engine/grafiteEngine.ml | 1 + matita/components/grafite_parser/grafiteParser.ml | 2 ++ 4 files changed, 5 insertions(+) diff --git a/matita/components/grafite/grafiteAst.ml b/matita/components/grafite/grafiteAst.ml index e251ae557..32a29c215 100644 --- a/matita/components/grafite/grafiteAst.ml +++ b/matita/components/grafite/grafiteAst.ml @@ -41,6 +41,7 @@ type ntactic = | NCases of loc * NotationPt.term * npattern | NCase1 of loc * string | NChange of loc * npattern * NotationPt.term + | NClear of loc * string list | NConstructor of loc * int option * NotationPt.term list | NCut of loc * NotationPt.term (* | NDiscriminate of loc * NotationPt.term diff --git a/matita/components/grafite/grafiteAstPp.ml b/matita/components/grafite/grafiteAstPp.ml index bd846248b..c20a5d8c3 100644 --- a/matita/components/grafite/grafiteAstPp.ml +++ b/matita/components/grafite/grafiteAstPp.ml @@ -75,6 +75,7 @@ let rec pp_ntactic ~map_unicode_to_tex = | NCut (_,t) -> "ncut " ^ NotationPp.pp_term t (*| NDiscriminate (_,t) -> "ndiscriminate " ^ NotationPp.pp_term t | NSubst (_,t) -> "nsubst " ^ NotationPp.pp_term t *) + | NClear (_,l) -> "nclear " ^ String.concat " " l | NDestruct (_,dom,skip) -> "ndestruct ..." | NElim (_,what,where) -> "nelim " ^ NotationPp.pp_term what ^ "...to be implemented..." ^ " " ^ "...to be implemented..." diff --git a/matita/components/grafite_engine/grafiteEngine.ml b/matita/components/grafite_engine/grafiteEngine.ml index a9a46e743..79391193d 100644 --- a/matita/components/grafite_engine/grafiteEngine.ml +++ b/matita/components/grafite_engine/grafiteEngine.ml @@ -343,6 +343,7 @@ let eval_ng_tac tac = | GrafiteAst.NCut (_loc, t) -> NTactics.cut_tac (text,prefix_len,t) (*| GrafiteAst.NDiscriminate (_,what) -> NDestructTac.discriminate_tac ~what:(text,prefix_len,what) | GrafiteAst.NSubst (_,what) -> NDestructTac.subst_tac ~what:(text,prefix_len,what)*) + | GrafiteAst.NClear (_loc, l) -> NTactics.clear_tac l | GrafiteAst.NDestruct (_,dom,skip) -> NDestructTac.destruct_tac dom skip | GrafiteAst.NDot _ -> NTactics.dot_tac | GrafiteAst.NElim (_loc, what, where) -> diff --git a/matita/components/grafite_parser/grafiteParser.ml b/matita/components/grafite_parser/grafiteParser.ml index bdd65f34d..5873d29c7 100644 --- a/matita/components/grafite_parser/grafiteParser.ml +++ b/matita/components/grafite_parser/grafiteParser.ml @@ -218,6 +218,8 @@ 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 "-"; 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)]) -- 2.39.2