public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: dje@transmeta.com
Cc: hans-peter.nilsson@axis.com, cgen@sources.redhat.com
Subject: Re: Recursive expansion of pmacros (was: Re: Typo: .substr in pmacros.texi is .substring in pmacros.scm)
Date: Tue, 19 Mar 2002 13:20:00 -0000	[thread overview]
Message-ID: <200203192120.WAA13772@ignucius.axis.se> (raw)
In-Reply-To: <15511.40580.309279.960325@casey.transmeta.com> (message from Doug Evans on Tue, 19 Mar 2002 12:24:36 -0800 (PST))

> From: Doug Evans <dje@transmeta.com>
> Date: Tue, 19 Mar 2002 12:24:36 -0800 (PST)
> Cc: cgen@sources.redhat.com

> Hans-Peter Nilsson writes:
>  > As I wrote, I had already startet to depend upon it in a port in
>  > progress.  I greatly simplified things (or made it hard in the
>  > absence, I should say).
> 
> Note that there are otherways to do this, besides the implicit re-lookup.

I'm totally blank (what "this"?)  I generally want to map a
pmacro on a list defined as a pmacro, generating calls to other
pmacros.  How can I do that without re-lookup?

(define-pmacro x (a b c))
(define-pmacro (do-a y) (+ y 1))
(define-pmacro (do-b y) (- y 1))
(define-pmacro '(do-c y) (* y 2))
(pmacro-expand '(.map (.pmacro (z) ((.sym code- z) ((.sym do- z) w))) x))
=> ((code-a (+ w 1)) (code-b (- w 1)) (code-c (* w 2)))

Hmm, maybe that didn't come out clear.  Tell me if you feel you
need something better.

brgds, H-P

  reply	other threads:[~2002-03-19 21:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-28 10:57 Typo: .substr in pmacros.texi is .substring in pmacros.scm Hans-Peter Nilsson
2002-01-28 11:05 ` Frank Ch. Eigler
2002-03-19  7:00   ` Hans-Peter Nilsson
2002-03-19  8:03     ` Frank Ch. Eigler
2002-03-19  8:14     ` Doug Evans
2002-03-19 12:19       ` Recursive expansion of pmacros (was: Re: Typo: .substr in pmacros.texi is .substring in pmacros.scm) Hans-Peter Nilsson
2002-03-19 12:24         ` Doug Evans
2002-03-19 13:20           ` Hans-Peter Nilsson [this message]
2002-03-19 13:24             ` Doug Evans
2002-03-19 13:53               ` Hans-Peter Nilsson
2002-03-19 14:47                 ` Doug Evans
2002-03-20 11:15                   ` Hans-Peter Nilsson
2002-03-22  9:11                     ` Doug Evans
2002-03-19  8:15     ` Typo: .substr in pmacros.texi is .substring in pmacros.scm Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200203192120.WAA13772@ignucius.axis.se \
    --to=hans-peter.nilsson@axis.com \
    --cc=cgen@sources.redhat.com \
    --cc=dje@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).