aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_tactic.ml414
1 files changed, 8 insertions, 6 deletions
diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4
index 2e515a9a6..a4e5d4cb8 100644
--- a/parsing/g_tactic.ml4
+++ b/parsing/g_tactic.ml4
@@ -323,19 +323,21 @@ GEXTEND Gram
[ [ id1 = id_or_meta; IDENT "into"; id2 = id_or_meta -> (id1,id2) ] ]
;
rewriter :
- [ [ c = constr_with_bindings -> (Precisely 1, c)
- | "!"; c = constr_with_bindings -> (RepeatPlus,c)
- | "?"; c = constr_with_bindings -> (RepeatStar,c)
- | n = natural; "!"; c = constr_with_bindings -> (Precisely n,c)
- | n = natural; "?"; c = constr_with_bindings -> (UpTo n,c)
+ [ [
(* hack for allowing "rewrite ?t" and "rewrite NN?t" that normally
produce a pattern_ident *)
- | c = pattern_ident ->
+ c = pattern_ident ->
let c = (CRef (Libnames.Ident (loc,c)), NoBindings) in
(RepeatStar, c)
| n = natural; c = pattern_ident ->
let c = (CRef (Libnames.Ident (loc,c)), NoBindings) in
(UpTo n, c)
+ | "!"; c = constr_with_bindings -> (RepeatPlus,c)
+ | "?"; c = constr_with_bindings -> (RepeatStar,c)
+ | n = natural; "!"; c = constr_with_bindings -> (Precisely n,c)
+ | n = natural; "?"; c = constr_with_bindings -> (UpTo n,c)
+ | n = natural; c = constr_with_bindings -> (Precisely n,c)
+ | c = constr_with_bindings -> (Precisely 1, c)
] ]
;
oriented_rewriter :