[Top][All Lists]

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


From: Stefan Israelsson Tampe
Subject: guile-syntax-parse
Date: Sun, 27 Nov 2011 16:23:22 +0100

Oh, let me refrace the previous mail and sebnd it to guuile devel also!

---------- Forwarded message ----------
From: Stefan Israelsson Tampe <address@hidden>
Date: Sun, Nov 27, 2011 at 4:03 PM
Subject: Re: guile-syntax-parse
To: Andy Wingo <address@hidden>

On syntax parse,

Syntax parse depends heavally on syntax parameters. I did not find that support in guile
so I would probably try to port syntax-parse to guile if there was similar features in guile.

Also it looks like syntax-parse is heavally used in racket for macrology and the more
complex one will be dounting to port without this feature (think about contracts)

So my erffort in the near future might be.

1. find how to implement/use a similar feature as syntax-parameters
2. port syntax-parse
3. port contracts

Of cause this is simplistic view of the problem space, but it is a nessesary chain.

Is there a similar feature in guile that can match syntax-parameters?

And can anyone explain the sematics

Let me have a try for that!

(with-syntax-parameter ((name expr)) code ...)

Assuming an expander with something like

(define (expand x)
   (if (procedure-stx? x)
       (stx-precedure-call x expand)
       (if (macro-form? x)
           (expand (macro-expand x))
           (if (atom? x)
               (atom-expand x)
               (map expand x))))

then the with-syntax-parameter code could expand to something like
(let ((res expr))
  (make-stx (lambda (f) (with (name expr) (f res))))

where 'with' works very much like a fluid and where the macro expansion code does an
implicit fluid-ref to get to the transformer if the macro is a syntax-parameter.

On Wed, Nov 23, 2011 at 10:47 PM, Andy Wingo <address@hidden> wrote:
On Mon 09 May 2011 14:11, Stefan Israelsson Tampe <address@hidden> writes:

> Hi, check out guile-syntax-parse at

How is this going?  Are you still using it?

You didn't get any responses, but I'm still curious to see it working.
Syntax-parse sounds like a useful facility.  I'm offline at the moment,
but I would be interested in hearing about your experiences with this.



reply via email to

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