[Larceny-users] Char - Printed Representation
Ray Racine
ray.racine at comcast.net
Wed Oct 17 18:24:58 EDT 2007
Yes, I just glanced at R6RS 4.2.1 and see '@' is only an allowed
subsequent and not an initial.
Though it is not immediately apparent why that is the case as I don't
see how it offers ambiguity for a number in lexing. Even the <complex>
<read>@<real> seems not to be a problem. In other words I see why '-'
and '+' are not allowed to be initial chars.
<sigh> The gods of Scheme are the most fickle of all deities.
So I see why the following is happening.
> #!r6rs
(symbol? 'a)
#t
> #!r6rs
(symbol? '@)
Error: get-datum: Lexical Error: Illegal symbol syntax: @) #<INPUT PORT
*console-input*>
The unfortunate side-effect here is an entire Scheme XML library suite
is based on SXML syntax with '@' as the (no longer valid) standard
symbol for an XML attribute S-EXP.
Since I'm moving over SSAX, SXML et al on to Larceny, I need a new
symbol.
Maybe ...
> #!r6rs
(symbol? '*)
#t
On Wed, 2007-10-17 at 17:52 -0400, William D Clinger wrote:
> Ray Racine asked:
> > Why am I not seeing
> >
> > .;call
> >
> > instead of
> >
> > \x23;call
>
> Although Larceny accepts .call as a symbol in some
> reader modes, e.g. #!larceny mode, that is not a
> legal external representation of a symbol according
> to the R6RS and must therefore be rejected in #!r6rs
> mode. Larceny's write and put-datum procedures try
> to output portable representations when possible, as
> here, even if they're uglier than a non-portable
> external representation.
>
> Similarly, @ is not a legal R6RS symbol, but \40;
> is.
>
> Will
More information about the Larceny-users
mailing list