guile-devel
[Top][All Lists]
Advanced

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

syntax parse link


From: Stefan Israelsson Tampe
Subject: syntax parse link
Date: Tue, 8 May 2012 17:46:24 +0200

Hi,

I would like to add a link to the syntax-parse repo from guile's home page. I was told to try get
the rights to do this myself. If that doesn't work I will need help from any of the maintainers
to make the linkage.

NEWS: for syntax parse

I have written a fresh module using syntax parse to do racket's for, for/list, etc. interface.
And have also started to work with an implementation of racket's match. It has indeed been
a pleasure to work with the syntax parse framework and these two examples can be studied
to see syntax-parse in action. It has also been a test-bed and I found that racket's syntax parse
is lacking with respect to mutual recursive syntax-classes. Hence I added a sane support for
this feature. E.g.

First prepend the code by declarations e.g.

(define-syntax-class ...)
Here the declaration has to be rich enough to contain all of the interface that is later used for the syntax-class.

(syntax-class-set! ...) (New)
Has the same format as define-syntax-class but modifies the old syntax-class in such a way
that a new parser function is added. To do this the interfaces has to match or else a helpful message
will be supplied.

Ergo the idea follows closely the define/set! method in scheme

The procedure is a little clunky due to the expressiveness of the syntax-class macro but still straightforward
and the code is easy to debug.

Have fun
Stefan

reply via email to

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