Mixing comment styles and strings jtobey@xxxxxx (21 Jul 2002 02:12 UTC)
Re: Mixing comment styles and strings Martin Gasbichler (05 Aug 2002 08:33 UTC)

Re: Mixing comment styles and strings Martin Gasbichler 05 Aug 2002 08:33 UTC

>>>>> "John" == jtobey  <xxxxxx@john-edwin-tobey.org> writes:

John> Is this supposed to be a comment or only the beginning of one?
John>     #| ; |#

John> The lexical production rules say this "|#" is ignored as part of a
John> nested single-line comment, but the implementation regards it as the
John> end of a multi-line comment.

The semicolon does not start a single-line comment because it matches
<comment text>.

John>     #|
John>      "This string |# is unbalanced."
John>     |#

John> My intuition tells me the quoted "|#" does not terminate the comment,
John> but the SRFI and implementation say that it does.  Should it be
John> possible to comment out strings and single-line comments that contain
John> the comment delimiters?

Recognizing strings within comments has a rather non-intuitive
consequences: you could write double quotation marks within a comment
pairwise only.

--
Martin