aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2003-12-22 23:58:41 +0000
committerherbelin2003-12-22 23:58:41 +0000
commit8b9b401324a1f4ee5b3e932c4789ff1582dc578c (patch)
tree671f7e9e18fe2c41832ba959eb9003d1c98d2892
parentc96ac99c54ae034e331f0420969f127fd27b5478 (diff)
Mise en valeur intropattern de paires et acceptation dans le 'as' de induction/inversion
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5128 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--parsing/g_tacticnew.ml41
-rw-r--r--translate/pptacticnew.ml11
2 files changed, 8 insertions, 4 deletions
diff --git a/parsing/g_tacticnew.ml4 b/parsing/g_tacticnew.ml4
index 8b5f9139de..4975aed3cd 100644
--- a/parsing/g_tacticnew.ml4
+++ b/parsing/g_tacticnew.ml4
@@ -295,6 +295,7 @@ GEXTEND Gram
;
with_names:
[ [ "as"; "["; ids = LIST1 (LIST0 simple_intropattern) SEP "|"; "]" -> ids
+ | "as"; "("; ids = LIST1 simple_intropattern SEP ","; ")" -> [ids]
| -> [] ] ]
;
simple_tactic:
diff --git a/translate/pptacticnew.ml b/translate/pptacticnew.ml
index 0501319a87..b37a190dbb 100644
--- a/translate/pptacticnew.ml
+++ b/translate/pptacticnew.ml
@@ -212,10 +212,13 @@ let rec pr_intro_pattern = function
| IntroWildcard -> str "_"
| IntroIdentifier id -> pr_id id
-and pr_case_intro_pattern pll =
- str "[" ++
- hv 0 (prlist_with_sep pr_bar (prlist_with_sep spc pr_intro_pattern) pll)
- ++ str "]"
+and pr_case_intro_pattern = function
+ | [pl] ->
+ str "(" ++ hv 0 (prlist_with_sep pr_coma pr_intro_pattern pl) ++ str ")"
+ | pll ->
+ str "[" ++
+ hv 0 (prlist_with_sep pr_bar (prlist_with_sep spc pr_intro_pattern) pll)
+ ++ str "]"
let pr_with_names = function
| [] -> mt ()