aboutsummaryrefslogtreecommitdiff
path: root/src/HsParser.ly
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-07-15 16:16:50 +0000
committersimonmar <unknown>2002-07-15 16:16:50 +0000
commitfc515bb7f9484a6fee128462eb63a76ba62a151a (patch)
treea84a6b60489f3f45340115064e59367b5312a631 /src/HsParser.ly
parent8f6dfe3413236f67665872e28acb8cec7cc7f364 (diff)
[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).
Diffstat (limited to 'src/HsParser.ly')
-rw-r--r--src/HsParser.ly12
1 files changed, 7 insertions, 5 deletions
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) }