public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sri Sairam Goli <goli@optonline.net>
To: gcc@gcc.gnu.org
Cc: goli@lucent.com
Subject: using GCC internal TREE representation.
Date: Thu, 06 Dec 2001 06:07:00 -0000	[thread overview]
Message-ID: <3C0F6D19.BCB420B@optonline.net> (raw)

Hi,

In one  of my project I need a tool that parses a c++ file and generates

output which contains all the struct declarations encounetered in the
original c++ file.  If struct contains another struct it needs to be
expanded
there.

Say for example if a have a code like this embedded insode any c++
code.

strcu A {
   int x;
   int y;
};

struct B {
   struct A a;
   int z;
};

I need an output like this for the second struct

struct B {
    struct A {
           int x;
            int y;
     } a;
     int z;
};


I am planning to use the gcc to parse my initial file and later walk
through the
internal TREE to dump the output as I need.

I looked at the GCC  manual (TREEs usage), but I am not quite sure how
can I
get access to the internal TREE from my own program any pointers in this
regard
will be appreciated.

(If there is any better way of doing the same thing instead of using the
gcc TREEs
 please suggest me).

Thanks,
goli



             reply	other threads:[~2001-12-06 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06  6:07 Sri Sairam Goli [this message]
2001-12-06  6:57 using GCC internal tree representation Alexandre E. Kopilovitch

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=3C0F6D19.BCB420B@optonline.net \
    --to=goli@optonline.net \
    --cc=gcc@gcc.gnu.org \
    --cc=goli@lucent.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).