aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorglondu2007-07-06 14:00:59 +0000
committerglondu2007-07-06 14:00:59 +0000
commit627affed266840b4888e7896c2e7fc286a2aab6f (patch)
tree54cadfb7d1e79b14fba2a10a80db87e2eb4f211c /parsing
parent414ee07d82b093cec353fd67642818b75d0e23c5 (diff)
New intro pattern "@A", which generates a fresh name based on A.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9950 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_tactic.ml41
-rw-r--r--parsing/q_coqast.ml41
2 files changed, 2 insertions, 0 deletions
diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4
index a15a6c12df..9f783771b7 100644
--- a/parsing/g_tactic.ml4
+++ b/parsing/g_tactic.ml4
@@ -186,6 +186,7 @@ GEXTEND Gram
| t::q -> IntroOrAndPattern [[t;pairify q]]
in pairify tc
| "_" -> IntroWildcard
+ | "@"; prefix = ident -> IntroFresh prefix
| "?" -> IntroAnonymous
| id = ident -> IntroIdentifier id
] ]
diff --git a/parsing/q_coqast.ml4 b/parsing/q_coqast.ml4
index a8c975eb1f..331fbdd989 100644
--- a/parsing/q_coqast.ml4
+++ b/parsing/q_coqast.ml4
@@ -63,6 +63,7 @@ let mlexpr_of_intro_pattern = function
| Genarg.IntroOrAndPattern _ -> failwith "mlexpr_of_intro_pattern: TODO"
| Genarg.IntroWildcard -> <:expr< Genarg.IntroWildcard >>
| Genarg.IntroAnonymous -> <:expr< Genarg.IntroAnonymous >>
+ | Genarg.IntroFresh id -> <:expr< Genarg.IntroFresh (mlexpr_of_ident $dloc$ id) >>
| Genarg.IntroIdentifier id ->
<:expr< Genarg.IntroIdentifier (mlexpr_of_ident $dloc$ id) >>