diff options
author | 2005-02-04 16:52:48 +0000 | |
---|---|---|
committer | 2005-02-04 16:52:48 +0000 | |
commit | 26295c8765560d57c16d7e530f81743d0a69b20a (patch) | |
tree | 197e430ef7409debd6b7f654c106d8438057818f | |
parent | a99c0dfe6cc3baabc6f4a61103322e1740b020d9 (diff) |
Ajout constructeur External pour appel outil externe à Coq
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@6678 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | parsing/g_ltacnew.ml4 | 2 | ||||
-rw-r--r-- | parsing/pptactic.ml | 1 | ||||
-rw-r--r-- | proofs/tacexpr.ml | 7 | ||||
-rw-r--r-- | translate/pptacticnew.ml | 3 |
4 files changed, 10 insertions, 3 deletions
diff --git a/parsing/g_ltacnew.ml4 b/parsing/g_ltacnew.ml4 index aee1e7e00..b56b310bd 100644 --- a/parsing/g_ltacnew.ml4 +++ b/parsing/g_ltacnew.ml4 @@ -86,6 +86,8 @@ GEXTEND Gram | IDENT "idtac"; s = [ s = STRING -> s | -> ""] -> TacId s | IDENT "fail"; n = [ n = int_or_var -> n | -> fail_default_value ]; s = [ s = STRING -> s | -> ""] -> TacFail (n,s) + | IDENT "external"; com = STRING; req = STRING; la = LIST1 tactic_arg -> + TacArg (TacExternal (loc,com,req,la)) | st = simple_tactic -> TacAtom (loc,st) | a = may_eval_arg -> TacArg(a) | IDENT "constr"; ":"; c = Constr.constr -> diff --git a/parsing/pptactic.ml b/parsing/pptactic.ml index c1f379069..c6718c8a9 100644 --- a/parsing/pptactic.ml +++ b/parsing/pptactic.ml @@ -706,6 +706,7 @@ and pr_tacarg0 = function | ConstrMayEval c -> pr_may_eval pr_constr pr_cst c | Integer n -> int n | TacFreshId sopt -> str "FreshId" ++ pr_opt qstring sopt + | TacExternal _ -> failwith "Not supported in v7 syntax" | (TacCall _ | Tacexp _) as t -> str "(" ++ pr_tacarg1 t ++ str ")" and pr_tacarg1 = function diff --git a/proofs/tacexpr.ml b/proofs/tacexpr.ml index 9889fcb0b..aab052d7b 100644 --- a/proofs/tacexpr.ml +++ b/proofs/tacexpr.ml @@ -204,7 +204,6 @@ and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr = | TacId of string | TacFail of int or_var * string | TacInfo of ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr - | TacLetRecIn of (identifier located * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_fun_ast) list * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr | TacLetIn of (identifier located * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr option * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg) list * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr | TacMatch of lazy_flag * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr * ('pat,('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_expr) match_rule list @@ -226,6 +225,8 @@ and ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg = | Integer of int | TacCall of loc * 'ref * ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg list + | TacExternal of loc * string * string * + ('constr,'pat,'cst,'ind,'ref,'id,'tac) gen_tactic_arg list | TacFreshId of string option | Tacexp of 'tac @@ -285,8 +286,8 @@ type glob_tactic_arg = constr_pattern, evaluable_global_reference and_short_name or_var, inductive or_var, - ltac_constant located, - identifier located or_var, + ltac_constant located or_var, + identifier located, glob_tactic_expr) gen_tactic_arg type glob_generic_argument = diff --git a/translate/pptacticnew.ml b/translate/pptacticnew.ml index 0dbf05aac..33784c1b1 100644 --- a/translate/pptacticnew.ml +++ b/translate/pptacticnew.ml @@ -818,6 +818,9 @@ and pr_tacarg env = function | ConstrMayEval c -> pr_may_eval (pr_constr env) (pr_lconstr env) (pr_cst env) c | TacFreshId sopt -> str "fresh" ++ pr_opt qsnew sopt + | TacExternal (_,com,req,la) -> + str "external" ++ spc() ++ qsnew com ++ spc() ++ qsnew req ++ spc() ++ + prlist_with_sep spc (pr_tacarg env) la | (TacCall _|Tacexp _|Integer _) as a -> str "ltac:" ++ pr_tac env (latom,E) (TacArg a) |