aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Init
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-10-17 11:16:09 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2002-10-17 11:16:09 +0000
commit133a519c08d9ce525901e8800b021eff6ed72cf0 (patch)
treeb36973068f08b5cfe6a1578cdf0717a8e9679199 /theories/Init
parent1c795ed9386af88b76c4eb591c751aaa1fab7bfd (diff)
Bugs dans la factorisation des règles de parsing de "{ ... } * ..."
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3156 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Init')
-rw-r--r--theories/Init/SpecifSyntax.v17
1 files changed, 9 insertions, 8 deletions
diff --git a/theories/Init/SpecifSyntax.v b/theories/Init/SpecifSyntax.v
index b64278f7d..38e11e8f3 100644
--- a/theories/Init/SpecifSyntax.v
+++ b/theories/Init/SpecifSyntax.v
@@ -15,34 +15,35 @@ Require Specif.
(* To accept {x:A|P}*B without parentheses *)
Grammar constr constr6 :=
- sig [ "{" lconstr($lc) ":" constr($c1) "|" lconstr($c2) "}" "*" constr6($c) ]
+ sigprod [ "{" lconstr($lc) ":" lconstr($c1) "|" lconstr($c2) "}"
+ "*" constr6($c) ]
-> [ (prod (sig $c1 [$lc : $c1]$c2) $c) ]
-| sig2 [ "{" lconstr($lc) ":" lconstr($c1)
+| sig2prod [ "{" lconstr($lc) ":" lconstr($c1)
"|" lconstr($c2) "&" lconstr($c3) "}" "*" constr6($c) ]
-> [ (prod (sig2 $c1 [$lc : $c1]$c2 [$lc : $c1]$c3) $c) ]
-| sigS [ "{" lconstr($lc) ":" lconstr($c1) "&" lconstr($c2) "}"
+| sigSprod [ "{" lconstr($lc) ":" lconstr($c1) "&" lconstr($c2) "}"
"*" constr6($c)]
-> [ (prod (sigS $c1 [$lc : $c1]$c2) $c) ]
-| sigS2 [ "{" lconstr($lc) ":" lconstr($c1)
+| sigS2prod [ "{" lconstr($lc) ":" lconstr($c1)
"&" lconstr($c2) "&" lconstr($c3) "}" "*" constr6($c) ]
-> [ (prod (sigS2 $c1 [$lc : $c1]$c2 [$lc : $c1]$c3) $c) ].
(* To factor with {A}+{B} *)
Grammar constr constr6 :=
- sig [ "{" lconstr($lc) ":" constr($c1) "|" lconstr($c2) "}" ]
+ sig [ "{" lconstr($lc) ":" lconstr($c1) "|" lconstr($c2) "}" ]
-> [ (sig $c1 [$lc : $c1]$c2) ]
-| sig2 [ "{" lconstr($lc) ":" constr($c1)
+| sig2 [ "{" lconstr($lc) ":" lconstr($c1)
"|" lconstr($c2) "&" lconstr($c3) "}" ]
-> [ (sig2 $c1 [$lc : $c1]$c2 [$lc : $c1]$c3) ]
-| sigS [ "{" lconstr($lc) ":" constr($c1) "&" lconstr($c2) "}" ]
+| sigS [ "{" lconstr($lc) ":" lconstr($c1) "&" lconstr($c2) "}" ]
-> [ (sigS $c1 [$lc : $c1]$c2) ]
-| sigS2 [ "{" lconstr($lc) ":" constr($c1)
+| sigS2 [ "{" lconstr($lc) ":" lconstr($c1)
"&" lconstr($c2) "&" lconstr($c3) "}" ]
-> [ (sigS2 $c1 [$lc : $c1]$c2 [$lc : $c1]$c3) ].