From e13b5af42f8921146059a74ad4a8c4818d05db0a Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 20 Jun 2002 12:38:07 +0000 Subject: [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. --- src/HsParser.ly | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src') 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 -- cgit v1.2.3