[r6rs-discuss] backslash-linefeed indentation

r6rsguy at free-comp-shop.com r6rsguy at free-comp-shop.com
Mon Jul 9 23:52:27 EDT 2007


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



More information about the r6rs-discuss mailing list