aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorherbelin2011-08-10 18:55:49 +0000
committerherbelin2011-08-10 18:55:49 +0000
commit6e73985638377a9279d8d4680f790c1cb475df93 (patch)
treee877432001676654e146b8d74fdcf2b51a03da5b /test-suite
parent95b8610e0671cac9a31dca3fbb238d473c777aa7 (diff)
Partly revert commit r14389 about relaxing the condition for being a keyword
(it does not work) Indeed, if a rule in operconstr at some level starts with an ident, it has to be declared as a keyword because other rules whose leftmost call is a call to operconstr will eventually the top level "200" even thought this leftmost operconstr might be declared at a lower level. This is for instance the reason why "True /\ forall x, x=0" is parsed even though /\ expects arguments at level less than 80 and forall is at level 200. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14399 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/output/Notations.out6
-rw-r--r--test-suite/output/Notations2.out1
2 files changed, 7 insertions, 0 deletions
diff --git a/test-suite/output/Notations.out b/test-suite/output/Notations.out
index 8af9ca82ca..72264d082b 100644
--- a/test-suite/output/Notations.out
+++ b/test-suite/output/Notations.out
@@ -2,8 +2,10 @@ true ? 0; 1
: nat
if true as x return (x ? nat; bool) then 0 else true
: nat
+Defining 'proj1' as keyword
fun e : nat * nat => proj1 e
: nat * nat -> nat
+Defining 'decomp' as keyword
decomp (true, true) as t, u in (t, u)
: bool * bool
!(0 = 0)
@@ -26,14 +28,17 @@ forall n n0 : nat, ###(n = n0)
: list nat
(1; 2, 4)
: nat * nat * nat
+Defining 'ifzero' as keyword
ifzero 3
: bool
+Defining 'pred' as keyword
pred 3
: nat
fun n : nat => pred n
: nat -> nat
fun n : nat => pred n
: nat -> nat
+Defining 'ifn' as keyword
Defining 'is' as keyword
fun x : nat => ifn x is succ n then n else 0
: nat -> nat
@@ -75,6 +80,7 @@ Nil
: forall A : Type, list A
NIL:list nat
: list nat
+Defining 'I' as keyword
(false && I 3)%bool /\ I 6
: Prop
[|1, 2, 3; 4, 5, 6|]
diff --git a/test-suite/output/Notations2.out b/test-suite/output/Notations2.out
index f4eaeb4788..d92f8d6946 100644
--- a/test-suite/output/Notations2.out
+++ b/test-suite/output/Notations2.out
@@ -30,6 +30,7 @@ let d := 2 in ∃ z : nat, let e := 3 in let f := 4 in x + y = z + d
: Type -> Prop
λ A : Type, ∀ n p : A, n = p
: Type -> Prop
+Defining 'let'' as keyword
let' f (x y : nat) (a:=0) (z : nat) (_ : bool) := x + y + z + 1 in f 0 1 2
: bool -> nat
λ (f : nat -> nat) (x : nat), f(x) + S(x)