At 11:17 am 5/2/98, Simon Marlow wrote:
>Ok, that sounds like a reasonable fix. I'd be happier if the
>semicolon was constrained to being one that had been inserted by the
>layout system, though.
That just needs you to use different tokens for the two kinds of semicolon
(plus a production for the usual case to stop the grammar exploding).
>> [Note that empty productions might cause problems, and what about
>> other syntactic constructs -- this is why this looked like
>> "tinkering" rather than design to me! There's also the issue
>> of how errors get reported -- the messages might be less
>> useful?]
>
>It sounds like if we allow empty declarations, then we have to fix the
>layout rule. Is that the case?
I think the layout rule is still fine (there are already empty declarations
in some cases, e.g. class). I'd be wary of adding empty expressions (e.g.
case with no alternatives, do with no clauses), though, since you need a value
for them!
Regards,
Kevin
----------
Division of Computer Science, Tel: +44-1334 463241 (Direct)
School of Mathematical Fax: +44-1334 463278
and Computational Sciences, URL:
http://www.dcs.st-and.ac.uk/~kh/kh.html
University of St. Andrews, Fife, KY16 9SS.