public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: cgen@sources.redhat.com
Cc: hans-peter.nilsson@axis.com
Subject: Re: Typo: .substr in pmacros.texi is .substring in pmacros.scm
Date: Tue, 19 Mar 2002 07:00:00 -0000	[thread overview]
Message-ID: <200203191459.PAA10399@ignucius.axis.se> (raw)
In-Reply-To: <20020128140529.B7787@redhat.com> (fche@redhat.com)

> Date: Mon, 28 Jan 2002 14:05:29 -0500
> From: "Frank Ch. Eigler" <fche@redhat.com>

> On Mon, Jan 28, 2002 at 07:57:08PM +0100, Hans-Peter Nilsson wrote:
> > It would IMHO be very useful if .sym-built symbols were
> > .pmacro-expanded, as I initially thought.  [...]
> 
> I see this sort of recursive macro-expansion could be useful.
> Does someone have an argument against it?

I didn't see any argument against it, except for the comment in
the code.  This works for my simple command-line examples
including the one in the comment but beware of the scheme/CGEN
newbie.  (Is this an ok way to compose ChangeLog entries for
nested defines?)

Ok to commit?

2002-03-19  Hans-Peter Nilsson  <hp@axis.com>

	* pmacros.scm (-pmacro-expand,scan): If result is a symbol,
	call scan-symbol on it.

Index: pmacros.scm
===================================================================
RCS file: /cvs/src/src/cgen/pmacros.scm,v
retrieving revision 1.1.1.1
diff -c -p -r1.1.1.1 pmacros.scm
*** pmacros.scm	2000/07/28 04:11:52	1.1.1.1
--- pmacros.scm	2002/03/19 14:30:25
***************
*** 229,239 ****
  			((and (list? exp) (not (null? exp))) (scan-list exp))
  			; Not a symbol or expression, return unchanged.
  			(else exp))))
!       ; ??? We use to re-examine `result' to see if it was another pmacro
!       ; invocation.  This allowed doing things like ((.sym a b c) arg1 arg2)
!       ; where `abc' is a pmacro.  Scheme doesn't work this way, so it was
!       ; removed.  It can be put back should it ever be warranted.
!       result))
  
    (if -pmacro-trace?
        (begin
--- 229,239 ----
  			((and (list? exp) (not (null? exp))) (scan-list exp))
  			; Not a symbol or expression, return unchanged.
  			(else exp))))
!       ; Re-examining `result' to see if it is another pmacro invocation
!       ; allows doing things like ((.sym a b c) arg1 arg2)
!       ; where `abc' is a pmacro.  Scheme doesn't work this way, but then
!       ; this is CGEN.
!       (if (symbol? result) (scan-symbol result) result)))
  
    (if -pmacro-trace?
        (begin

brgds, H-P

  reply	other threads:[~2002-03-19 15:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-28 10:57 Hans-Peter Nilsson
2002-01-28 11:05 ` Frank Ch. Eigler
2002-03-19  7:00   ` Hans-Peter Nilsson [this message]
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
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=200203191459.PAA10399@ignucius.axis.se \
    --to=hans-peter.nilsson@axis.com \
    --cc=cgen@sources.redhat.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).