[r6rs-discuss] backslash-linefeed indentation

From: r6rsguy at free-comp-shop.com <r6rsguy>
Date: Mon, 9 Jul 2007 23:52:27 -0400

I have long been annoyed that Scheme does not allow
a program to be indented without changing its meaning,
and was working on a comment to fix that, when I noticed
that (I think) it has already been done in formal comment #9.

Am I right in thinking that the intention of the change
described there is that

  (string=? "This is\
            \ a string" "This is \
             a string" "This is a string")

must be true? (The response to comment #9 [1] confuses me.)

Should not (page 13)

  <string element> -> ...
    | \<intraline whitespace> <line ending> <intraline whitespace>
  <intraline whitespace> -> <character tabulation>
    | <any character whose category is Zs>

Have a Kleene star in there somewhere? E.g. either

  <string element> -> ...
    | \<intraline whitespace>* <line ending> <intraline whitespace>*

or

  <intraline whitespace> -> ( <character tabulation>
    | <any character whose category is Zs> )*

otherwise you are requiring exactly one space on each side
of a line break within a string?



[1] Formal comment #9:

> However, there is no problem, since \<space> is useless - I see no
> specification for an escape sequence that might need such a
> terminator.
>
> RESPONSE:
>
> Agreed. The \<space> terminator was meant to work with
> \<linefeed><intraline whitespace> in the case that the continuation
> should start with a whitespace. However, \x escapes can serve that
> purpose equally well.

   -- Keith
Received on Mon Jul 09 2007 - 23:52:27 UTC

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