chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] Add support for R7RS named characters and


From: Alex Shinn
Subject: Re: [Chicken-hackers] [PATCH] Add support for R7RS named characters and string escapes (except hex escapes)
Date: Tue, 28 May 2013 09:33:14 +0900

On Mon, May 27, 2013 at 6:09 AM, Peter Bex <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]