Newsgroups: comp.lang.lisp
From: Pascal Costanza <p...@p-cos.net>
Date: Fri, 18 Aug 2006 14:58:38 +0200
Local: Fri, Aug 18 2006 8:58 am
Subject: Re: Is there a trick so macrolet can't refer to itself?
howard yeh wrote: No, essentially the outer 'foo must have a different name. You can use a > (let ((foo 'bar)) > (symbol-macrolet ((foo (list foo))) > foo)) > Leads to infinite regression. Is there a trick I can use so the above > (let ((foo 'bar)) workaround, though: (let ((-foo- 'bar)) ;; or some generated name > The reason for this is that I am modifying Henry Baker's parser as Two responses: > described in: http://home.pipeline.com/~hbaker1/Prag-Parse.html > I want to be able to generate the same code, but depending on the > So a fragment like > (and ... > Becomes > (symbol-macrolet ((this (char string index))) > If I want to parse sexp instead, > (symbol-macrolet ((this (car index))) > Do you guys think this is a good use of abstraction? Or do macrolets a) The problem above doesn't seem to occur here. b) It's probably better to model this with functions or even with Pascal -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||