On Mon, May 27, 2013 at 6:09 AM, Peter Bex <peter....@xs4all.nl> wrote:

>
> For the backslash escapes inside strings, we already had everything
> that R7RS dictates, except for two things: hex escapes and
> \<intraline whitespace>*<newline><intraline whitespace>* syntax.
> I think the former is useful, but it's rather tricky so I want to
> take my time implementing it.  The latter is silly and rather pointless,
> but I've implemented it for completeness.
>
> Note that Chibi's behavior seems to be incorrect wrt to the spec.
> The string: "\
>
>
> x" should be read like "\n\nx", I think.  Chibi drops all the
> whitespace and newlines, instead of just the whitespace surrounding
> the *first* newline.  I've made Chicken follow what I think is what
> the spec says.
>

Yes, the spec is correct here, thanks.  I'll fix Chibi and add an R7RS
test case.  [Agreed about it being silly and pointless.]

There's also escaped strings without newlines like "\    foo".
> It's unspecified what an implementation should do with that, like
> any other escaped character (like, for example, "\p").
>

This is intentionally unspecified - you can do what you like here.
A pedantic impl would signal an error.

-- 
Alex
_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to