[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Error in comment syntax grammar



Hi Malcom,

On Mon, Apr 25, 2011 at 9:17 PM, Malcolm Tredinnick
<malcolm.tredinnick@x> 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@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports