This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
RE: Macro expansion problem
If it is helpful, this problem occurs in version 1.8. 1.7.90 was able to
correctly process a more complicated macro which this test case is
derived from, but fails with a null pointer exception when presented
with this.
Dan Stanger
Eaton Vance Management
Two International Place
Boston, MA 02110
Mobile: 617 646 9682
Office: 617 672 8261
-----Original Message-----
From: Per Bothner [mailto:per@bothner.com]
Sent: Wednesday, May 20, 2009 3:24 AM
To: Dan Stanger
Cc: kawa@sources.redhat.com
Subject: Re: Macro expansion problem
On 05/19/2009 11:26 AM, Dan Stanger wrote:
> The following test program prints
> Trace1: (symbol->string (quote b))
> upon loading. define-input is not passed into the function,
> test-exprs->proc, but is matched anyway.
The problem appears to be when creating the template
for the 2nd rule in:
>
> (define-syntax
> test-out
> (syntax-rules (test-content-type!
> define-input)
> ((test-out (test-content-type! expr ...))
> (test-content-type! expr ...))
> ((test-out (define-input form))
> (mtrace1 (define-input form)))
> ((test-out expr) (display expr ))
> ))
> (test-out ,@exprs))))
Somehow the define-input in the pattern fails to
match the define-input in the literals list,
so define-input is read as a pattern variable.
I haven't yet had time to figure out whether this would
be an easy or difficult fix - I have to remind myself
how the macro processing works ... (The complication
is how "hygiene" is handled.)
--
--Per Bothner
per@bothner.com http://per.bothner.com/