aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-06-20 12:38:07 +0000
committersimonmar <unknown>2002-06-20 12:38:07 +0000
commite13b5af42f8921146059a74ad4a8c4818d05db0a (patch)
treeba6f61a18a4571dd673ea25fa0e5e56e47136637 /src
parent504d19c9f70de890aa8b7658878423c0af4bbc12 (diff)
[haddock @ 2002-06-20 12:38:07 by simonmar]
Empty declaration fixes.
Diffstat (limited to 'src')
-rw-r--r--src/HsParser.ly18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/HsParser.ly b/src/HsParser.ly
index 0fae07e4..5ec370b2 100644
--- a/src/HsParser.ly
+++ b/src/HsParser.ly
@@ -1,5 +1,5 @@
-----------------------------------------------------------------------------
-$Id: HsParser.ly,v 1.13 2002/06/03 13:05:58 simonmar Exp $
+$Id: HsParser.ly,v 1.14 2002/06/20 12:38:07 simonmar Exp $
(c) Simon Marlow, Sven Panne 1997-2002
@@ -320,12 +320,10 @@ shift/reduce-conflict, so we don't handle this case here, but in bodyaux.
> | {- empty -} { [] }
> decls :: { [HsDecl] }
-> : decls1 optsemi { reverse $1 }
-> | optsemi { [] }
-
-> decls1 :: { [HsDecl] }
-> : decls1 ';' decl { $3 : $1 }
+> : decls ';' decl { $3 : $1 }
+> | decls ';' { $1 }
> | decl { [$1] }
+> | {- empty -} { [] }
> decl :: { HsDecl }
> : signdecl { $1 }
@@ -560,12 +558,10 @@ Instance declarations
> | {- empty -} { [] }
> valdefs :: { [HsDecl] }
-> : valdefs1 optsemi { $1 }
-> | optsemi { [] }
-
-> valdefs1 :: { [HsDecl] }
-> : valdefs1 ';' valdef { $3 : $1 }
+> : valdefs ';' valdef { $3 : $1 }
+> | valdefs ';' { $1 }
> | valdef { [$1] }
+> | {- empty -} { [] }
-----------------------------------------------------------------------------
Value definitions