From fc515bb7f9484a6fee128462eb63a76ba62a151a Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 15 Jul 2002 16:16:50 +0000 Subject: [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). --- src/HsParser.ly | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/HsParser.ly b/src/HsParser.ly index 9a9435b5..8843713c 100644 --- a/src/HsParser.ly +++ b/src/HsParser.ly @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- -$Id: HsParser.ly,v 1.15 2002/07/15 10:14:31 simonmar Exp $ +$Id: HsParser.ly,v 1.16 2002/07/15 16:16:50 simonmar Exp $ (c) Simon Marlow, Sven Panne 1997-2002 @@ -188,13 +188,15 @@ The Export List > : '(' exportlist ')' { $2 } > exportlist :: { [HsExportSpec] } -> : export ',' exportlist { $1 : $3 } -> | export exp_doc ',' exportlist { $1 : $2 : $4 } +> : export exportlist1 { $1 : $2 } > | exp_doc exportlist { $1 : $2 } -> | ',' exportlist { $2 } -> | export { [$1] } > | {- empty -} { [] } +> exportlist1 :: { [HsExportSpec] } +> : exp_doc exportlist1 { $1 : $2 } +> | ',' exportlist { $2 } +> | {- empty -} { [] } + > exp_doc :: { HsExportSpec } > : docsection { case $1 of { (i,s) -> HsEGroup i s } } > | docnamed { HsEDocNamed (fst $1) } -- cgit v1.2.3