Path: utzoo!utgpu!water!watmath!clyde!att-cb!osu-cis!tut.cis.ohio-state.edu!mailrus!rutgers!bellcore!faline!thumper!ulysses!andante!lcuxlm!ilan From: ilan@lcuxlm.UUCP Newsgroups: comp.lang.lisp Subject: Re: Common Lisp Macro Expander Wanted Summary: Problems with local macros in a macro preprocessor Message-ID: <1683@lcuxlm.UUCP> Date: 16 Apr 88 23:21:56 GMT References: <49@spar.SPAR.SLB.COM> <23539@ucbvax.BERKELEY.EDU> <46438@ti-csl.CSNET> Organization: AT&T Bell Laboratories, Liberty Corner Lines: 26 Posted: Sat Apr 16 19:21:56 1988 In article <46438@ti-csl.CSNET>, gateley@mips.csc.ti.com (John Gateley) writes: > > Almost works, but you have to check special forms to make sure that > they are macro expanded only in the proper places, and then there is > always lambda to deal with. (Hint: Dont macro expand the argument list > for lambdas, and the same is true for the variables in a let). I cant find > anything in CLtL which verifies this, but I think this is correct. I think it turns out that a fully-fledged macroexpanding preprocessor looks very much like the first pass of a compiler - and among things you end up having to treat each special-form specially (that's why they're special). Do you have any ides of how to handle local macros (defined by MACROLET)? We ended up just ignoring them - essentially because (1) MACRO-FUNCTION only knows about global macros (because it's a top-level function and (2) to be useful MACROEXPAND would need the correct &ENVIRONMENT arg set up. All in all a hassle... but maybe I'm missing something... like a screw... --ilan caron ..!ucbvax!vax135!lcuxlj!ilan -- --Ilan Caron 201-580-5664 ..!allegra!lcuxlj!ilan #