diff options
author | simonmar <unknown> | 1999-12-01 17:01:36 +0000 |
---|---|---|
committer | simonmar <unknown> | 1999-12-01 17:01:36 +0000 |
commit | 97e199971b9e0eeaa980a0ab59fab5ec589c09ff (patch) | |
tree | ca5f1344d84d062a79de6737123c9cc5367b414e | |
parent | 8eceeddbc565fa41ba880710deddaac2728fec33 (diff) | |
download | haskell-97e199971b9e0eeaa980a0ab59fab5ec589c09ff.tar.gz |
[project @ 1999-12-01 17:01:36 by simonmar]
disallow case expressions with no alternatives.
-rw-r--r-- | ghc/compiler/parser/Parser.y | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index 811607ac8b..87f6458f79 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.17 1999/11/30 16:10:11 lewie Exp $ +$Id: Parser.y,v 1.18 1999/12/01 17:01:36 simonmar Exp $ Haskell grammar. @@ -743,12 +743,14 @@ altslist :: { [RdrNameMatch] } : '{' alts '}' { reverse $2 } | layout_on alts close { reverse $2 } +alts :: { [RdrNameMatch] } + : alts1 { $1 } + | ';' alts { $2 } -alts :: { [RdrNameMatch] } - : alts ';' alt { $3 : $1 } - | alts ';' { $1 } +alts1 :: { [RdrNameMatch] } + : alts1 ';' alt { $3 : $1 } + | alts1 ';' { $1 } | alt { [$1] } - | {- empty -} { [] } alt :: { RdrNameMatch } : infixexp opt_sig ralt wherebinds |