guile-reader-devel
[Top][All Lists]
Advanced

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

[guile-reader-devel] Re: guile-reader 0.5 curly-brace-sexp


From: Ludovic Courtès
Subject: [guile-reader-devel] Re: guile-reader 0.5 curly-brace-sexp
Date: Mon, 01 Sep 2008 10:06:09 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Hello,

Note: You need to subscribe to the list to be able to post.

> I tried to use the curly-brace-sexp reader of guile-reader 0.5.
> 
> I defined the reader this way:
> 
> (use-modules (system reader library))
> (define my-reader
>   (make-alternate-guile-reader '(curly-brace-sexp)))
> 
> When I try to parse a normal expression it works as expected:
> 
> (with-input-from-string "(func arg)" my-reader)
> => (func arg)
> 
> But when I try a curly expression it works different:
> 
> (with-input-from-string "{func arg}" my-reader)
> => {func
> 
> Is this the intended behavior?

Yes and no.  :-)

Yes, because `alternate-guile-reader-token-readers' (and, consequently,
`make-alternate-guile-reader') doesn't support a `curly-brace-sexp'
option:

  http://www.nongnu.org/guile-reader/doc/guile-reader.html#Reader-Library

There *is* a `curly-brace-sexp' token reader but it's not currently
readily available from `make-alternate-guile-reader'.  I'd be happy to
add it, though (patches welcome!).

And no, because `make-alternate-guile-reader' should have returned an
error when it encountered this unknown option, instead of silently
ignoring it.  I'll fix it ASAP.

Thanks,
Ludo'.




reply via email to

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