diff options
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$, |