unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Precedence for reader extensions
@ 2013-02-18 21:05 Mikael Djurfeldt
  2013-02-18 21:07 ` Mikael Djurfeldt
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Mikael Djurfeldt @ 2013-02-18 21:05 UTC (permalink / raw)
  To: guile-devel

I'm working on an mit-scheme compatibility module (compat mit-scheme)
enabling Guile to read a (so far) subset of mit-scheme code.

Now I have the problem that mit-scheme has the two constants
#!optional and #!rest (mit-scheme extensions to the scheme standard).

I thought that I could support this using %read-hash-procedures but
discovered that there are three "precedence levels":

1. Most predefine hash syntax like #(, #! etc.
2. %read-hash-procedures
3. #|

This means that I can't add new syntax for #!.

I propose to simplify this to only two levels:

1. %read-hash-procedures
2. predefined syntax

This would be conceptually simpler and more flexible.  It could also
be used to support mit-scheme read syntax.

If we do not implement this change, I need to use Ludovic's (nice)
guile-reader.  But that package contains C code meaning that (compat
mit-scheme) can't be distributed using guilehall.  In any case, I
think it would be good to be able to support other Scheme's read
syntax using the standard reader.

If anyone is afraid about the effect this would have on reader
performance, it is possible to compile %read-hash-procedures to a
table of flags indicating exceptions.

Opinions?

Best regards,
Mikael



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-02-22 15:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 21:05 Precedence for reader extensions Mikael Djurfeldt
2013-02-18 21:07 ` Mikael Djurfeldt
2013-02-18 21:26 ` Mikael Djurfeldt
2013-02-18 21:42   ` Mikael Djurfeldt
2013-02-18 23:33 ` Mark H Weaver
2013-02-19 10:14   ` Mikael Djurfeldt
2013-02-19 15:41     ` Mark H Weaver
2013-02-19 16:42       ` Mikael Djurfeldt
2013-02-19 16:58         ` Mikael Djurfeldt
2013-02-20 14:21           ` Ludovic Courtès
2013-02-22  2:52           ` Mark H Weaver
2013-02-22  9:36             ` Mikael Djurfeldt
2013-02-22 15:45               ` Ludovic Courtès
2013-02-22 15:54             ` Ludovic Courtès
2013-02-19 23:51         ` Mikael Djurfeldt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).