aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-12-08 18:12:27 +0100
committerPierre-Marie Pédrot2015-12-08 18:12:27 +0100
commite70165079e8defe490a568ece20a7029e4c1626e (patch)
tree7e8ad97cbe6e06251fae9cc2da48acc8ab36d303 /parsing
parent071a458681254716a83b1802d5b6a30edda37892 (diff)
parent19ea51a4b7f7debbe5bdeb2b2689cddadd9876f4 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_tactic.ml417
1 files changed, 16 insertions, 1 deletions
diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4
index b7559a1989..4d42dfe85a 100644
--- a/parsing/g_tactic.ml4
+++ b/parsing/g_tactic.ml4
@@ -44,6 +44,20 @@ let test_lpar_id_coloneq =
| _ -> err ())
| _ -> err ())
+(* Hack to recognize "(x)" *)
+let test_lpar_id_rpar =
+ Gram.Entry.of_parser "lpar_id_coloneq"
+ (fun strm ->
+ match get_tok (stream_nth 0 strm) with
+ | KEYWORD "(" ->
+ (match get_tok (stream_nth 1 strm) with
+ | IDENT _ ->
+ (match get_tok (stream_nth 2 strm) with
+ | KEYWORD ")" -> ()
+ | _ -> err ())
+ | _ -> err ())
+ | _ -> err ())
+
(* idem for (x:=t) and (1:=t) *)
let test_lpar_idnum_coloneq =
Gram.Entry.of_parser "test_lpar_idnum_coloneq"
@@ -224,8 +238,9 @@ GEXTEND Gram
;
induction_arg:
[ [ n = natural -> (None,ElimOnAnonHyp n)
+ | test_lpar_id_rpar; c = constr_with_bindings ->
+ (Some false,induction_arg_of_constr c)
| c = constr_with_bindings -> (None,induction_arg_of_constr c)
- | "!"; c = constr_with_bindings -> (Some false,induction_arg_of_constr c)
] ]
;
constr_with_bindings_arg: