diff options
author | barras <barras@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-09-26 11:18:22 +0000 |
---|---|---|
committer | barras <barras@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-09-26 11:18:22 +0000 |
commit | 351a500eada776832ac9b09657e42f5d6cd7210f (patch) | |
tree | af45a745540e1154eab8955c17e03cbbe2e6b878 /parsing | |
parent | 5155de9ee4bd01127a57c36cebbd01c5d903d048 (diff) |
mise a jour du nouveau ring et ajout du nouveau field, avant renommages
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9178 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/q_util.ml4 | 12 | ||||
-rw-r--r-- | parsing/tacextend.ml4 | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/parsing/q_util.ml4 b/parsing/q_util.ml4 index ac1f3f050..bc8cd40ec 100644 --- a/parsing/q_util.ml4 +++ b/parsing/q_util.ml4 @@ -71,6 +71,15 @@ open Vernacexpr open Pcoq open Genarg +let modifiers e = +<:expr< Gramext.srules + [([], Gramext.action(fun _loc -> [])); + ([Gramext.Stoken ("", "("); + Gramext.Slist1sep ($e$, Gramext.Stoken ("", ",")); + Gramext.Stoken ("", ")")], + Gramext.action (fun _ l _ _loc -> l))] + >> + let rec interp_entry_name loc s = let l = String.length s in if l > 8 & String.sub s 0 3 = "ne_" & String.sub s (l-5) 5 = "_list" then @@ -82,6 +91,9 @@ let rec interp_entry_name loc s = else if l > 4 & String.sub s (l-4) 4 = "_opt" then let t, g = interp_entry_name loc (String.sub s 0 (l-4)) in OptArgType t, <:expr< Gramext.Sopt $g$ >> + else if l > 5 & String.sub s (l-5) 5 = "_mods" then + let t, g = interp_entry_name loc (String.sub s 0 (l-1)) in + List0ArgType t, modifiers g else let s = if s = "hyp" then "var" else s in let t, se, lev = diff --git a/parsing/tacextend.ml4 b/parsing/tacextend.ml4 index 20cf99b1b..f62aaf202 100644 --- a/parsing/tacextend.ml4 +++ b/parsing/tacextend.ml4 @@ -165,7 +165,7 @@ let declare_tactic loc s cl = open Pcoq; declare $list:hidden$ end; try - let _=Refiner.add_tactic $se$ (fun [ $list:make_clauses s cl$ ]) in + let _=Tacinterp.add_tactic $se$ (fun [ $list:make_clauses s cl$ ]) in List.iter (fun s -> Tacinterp.add_primitive_tactic s (Tacexpr.TacAtom($default_loc$, |