[Scheme-reports] Error in comment syntax grammar Malcolm Tredinnick (25 Apr 2011 12:18 UTC)
Re: [Scheme-reports] Error in comment syntax grammar Alex Shinn (25 Apr 2011 13:27 UTC)

Re: [Scheme-reports] Error in comment syntax grammar Alex Shinn 25 Apr 2011 13:26 UTC

Hi Malcom,

On Mon, Apr 25, 2011 at 9:17 PM, Malcolm Tredinnick
<malcolm.tredinnick@gmail.com> wrote:
> Very minor point that popped out when I was implementing a grammar parser
> for fun this evening. On page 49, the grammar for commenting out datums is
> written as
>
> #; <atmosphere> <datum>
>
> However, <atmosphere> contains <whitespace> which contains newlines, so that
> doesn't look correct.
>
> #;
> (foo) <-- commented out by current grammar. Hmm...

This looks odd, but is actually intentional.
In fact, I've seen the idiom along the lines of

#; ; reason for commenting out (foo)...
(foo)

to help editors that don't understand the #; syntax.

--
Alex

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports