From: Neil Booth <neil@daikokuya.demon.co.uk>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: preprocessor macro support (should actually work now)
Date: Fri, 29 Mar 2002 13:27:00 -0000 [thread overview]
Message-ID: <20020329212714.GA8915@daikokuya.demon.co.uk> (raw)
In-Reply-To: <npadsrnkea.fsf@zwingli.cygnus.com>
Jim Blandy wrote:-
> For spectators: libcpp represents the stream of source code it's
> expanding as an array of token structures, not a simple array of
> characters. When it sees some macro named X expand to a sequence that
> includes the identifier token X, it sets a flag on that token
> indicating that it should never be expanded as a macro invocation. As
> the example shows, this flag may need to remain set long after the
> original invocation of the macro named X has been processed. I don't
> see any easy way to get this effect with a string-based expander, like
> the one in my patch.
Yah, it's a mess. Have you looked at the venerable "cccp" that was the
expander for 2.95.x and earlier? It's a right kludge; but it works in
most cases (still a few bugs, and segfaults). It "surrounds" such
tokens with "\r" in its buffer, to indicate the token should not be
expanded.
It worked, but it was a little tasteless IMO 8^)
> I didn't really understand all the logistics that got brought up
> regarding moving libcpp into its own directory in the repository, to
> make it easier to share with gdb. But the sooner that happens, the
> sooner we can replace my macro expander with one that works better.
Best left to Zack. I don't think I'm qualified 8-)
Neil.
prev parent reply other threads:[~2002-03-29 21:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-27 23:05 Jim Blandy
2002-03-28 0:55 ` Eli Zaretskii
2002-03-29 2:01 ` Neil Booth
2002-03-29 13:17 ` Jim Blandy
2002-03-29 13:27 ` Neil Booth [this message]
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=20020329212714.GA8915@daikokuya.demon.co.uk \
--to=neil@daikokuya.demon.co.uk \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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