[Top][All Lists]

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

Re: [Gcl-devel] Re: SYMBOL-MACROLET problem

From: Camm Maguire
Subject: Re: [Gcl-devel] Re: SYMBOL-MACROLET problem
Date: 01 Nov 2002 00:04:14 -0500

Greetings!  Thank you Paul for this clear explanation.  I'll try to
look into this soon.

Take care,

"Paul F. Dietz" <address@hidden> writes:

> Camm Maguire wrote:
>    GCL currently does macroexpansion in C.  Can you
>    elaborate a little on your suggestion below to implement this "at the
>    same place" as ordinary macroexpansion?  Is there some sort of subtle
>    interplay between symbol-macrolet and macroexpand?  From your note,
>    and what I read in the spec, my current understanding is that what
>    this should do is simply go through the code as a list, make all
>    substitutions not shadowed by an internal let, and then pass the
>    result out for normal evaluation.  I must confess that my grasp on
>    lisp evaluation is still rather primitive, however.
> Symbol macroexpansion should be done at the same time as ordinary
> macroexpansion.
> There should be a routine in gcl's guts that implements macroexpansion
> at a form.  It dispatches off the car of a list, doing an expansion
> if that car is a symbol that has a macro binding in the current environment
> (which means basically it was defined with defmacro or an enclosing
> macrolet).
> What we need to do is augment this function so that if the form is
> a symbol, it checks if that symbol has a symbol-macro binding in the
> current environment.  If so, it substitutes the expansion form associated
> with that symbol.  (Actually, that's not quite right; there can be
> interaction with the macroexpand hook; see section of the spec.)
> The data structure for environments needs to be augmented
> so that it has a symbol macro information.
> What we *can't* do is walk the term separately (either before or
> after macro expansion) doing symbol macro substitution.
>      Paul
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

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