aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2003-10-10 19:06:03 +0000
committerherbelin2003-10-10 19:06:03 +0000
commit2fd44905ab9eb1991dee9bcc0f3e4720135ab143 (patch)
tree76bd2651a3b9cc8352ef34f0fe4f47a751d4fe8d
parent32f2652a4355ccbc3cb4082ef3e401cc5ca1c7e0 (diff)
Delimiters N devient 'nat'
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4579 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--parsing/g_cases.ml43
-rw-r--r--parsing/g_constr.ml47
-rwxr-xr-xtheories/Init/Datatypes.v2
3 files changed, 8 insertions, 4 deletions
diff --git a/parsing/g_cases.ml4 b/parsing/g_cases.ml4
index f1f6e47a46..2c5640d181 100644
--- a/parsing/g_cases.ml4
+++ b/parsing/g_cases.ml4
@@ -28,7 +28,8 @@ GEXTEND Gram
| IDENT "_" -> CPatAtom (loc,None)
(* Hack to parse syntax "(n)" as a natural number *)
| "("; G_constr.test_int_rparen; n = bigint; ")" ->
- CPatDelimiters (loc,"N",CPatNumeral (loc,n))
+ (* Delimiter "N" moved to "nat" in V7 *)
+ CPatDelimiters (loc,"nat",CPatNumeral (loc,n))
| "("; p = compound_pattern; ")" -> p
| n = bigint -> CPatNumeral (loc,n)
| "'"; G_constr.test_ident_colon; key = IDENT; ":"; c = pattern; "'" ->
diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4
index cde0a59b55..94ccde29fc 100644
--- a/parsing/g_constr.ml4
+++ b/parsing/g_constr.ml4
@@ -205,7 +205,8 @@ GEXTEND Gram
| bll = binders; c = constr -> abstract_constr loc c bll
(* Hack to parse syntax "(n)" as a natural number *)
| "("; test_int_rparen; n = bigint; ")" ->
- CDelimiters (loc,"N",CNumeral (loc,n))
+ (* Delimiter "N" moved to "nat" in V7 *)
+ CDelimiters (loc,"nat",CNumeral (loc,n))
| "("; lc1 = lconstr; ":"; c = constr; (bl,body) = product_tail ->
let id = coerce_to_name lc1 in
CProdN (loc, ([id], c)::bl, body)
@@ -239,7 +240,9 @@ GEXTEND Gram
| n = bigint -> CNumeral (loc,n)
| "!"; f = global -> CAppExpl (loc,(None,f),[])
| "'"; test_ident_colon; key = IDENT; ":"; c = constr; "'" ->
- CDelimiters (loc,key,c) ] ]
+ (* Delimiter "N" implicitly moved to "nat" in V7 *)
+ let key = if key = "N" then "nat" else key in
+ CDelimiters (loc,key,c) ] ]
;
constr91:
[ [ test_int_bang; n = INT; "!"; c = operconstr LEVEL "9" ->
diff --git a/theories/Init/Datatypes.v b/theories/Init/Datatypes.v
index 65d0722c3c..2d35928c54 100755
--- a/theories/Init/Datatypes.v
+++ b/theories/Init/Datatypes.v
@@ -30,7 +30,7 @@ Add Printing If bool.
Inductive nat : Set := O : nat
| S : nat->nat.
-Delimits Scope nat_scope with N.
+Delimits Scope nat_scope with nat.
Bind Scope nat_scope with nat.
Arguments Scope S [ nat_scope ].