[r6rs-discuss] S-expression comments not nestable

From: David Van Horn <dvanhorn>
Date: Tue, 26 Jun 2007 18:35:21 -0400 (EDT)

The current specification of S-expression (#;) comments precludes nesting
comments as done in SRFI 62. For example, the following are considered
invalid syntax in R5.95RS:

   (list 'a #; #;'b 'c 'd)
   (list 'a #;(list 'b #;c 'd) 'e)

This is because the production for a #; comment is:

   #; <interlexeme space> <datum>

In both cases, what follows the first #; is not a <datum> since <datum>
does not include #;. This severly diminishes the value of #; comments and
I presume is an oversight of the current draft. The draft could be
modified to follow the SRFI 62 specification more closely, which extends
<datum> with a <commented datum> option to allow these nestings.

David
Received on Tue Jun 26 2007 - 18:35:21 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC