public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* parser modification followup
@ 2002-12-10 10:50 Santiago Margareto
  2002-12-10 13:47 ` Andreas Bauer
  0 siblings, 1 reply; 4+ messages in thread
From: Santiago Margareto @ 2002-12-10 10:50 UTC (permalink / raw)
  To: gcc-help

After some research I have found that it won't be necessary to change the
gcc parser. In some places in the gcc docs it is said that you can interface
with the gcc back-end with the tree (tree.c) or RTL file (rtc.c). I can
generate the RTL file, and the try to parse it. However, is there a way to
generate the 'tree file' - something that I can parse/traverse with the tree
data-structure?

Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: parser modification followup
  2002-12-10 10:50 parser modification followup Santiago Margareto
@ 2002-12-10 13:47 ` Andreas Bauer
  2002-12-11  0:00   ` Santiago Margareto
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Bauer @ 2002-12-10 13:47 UTC (permalink / raw)
  To: Santiago Margareto; +Cc: gcc-help

> After some research I have found that it won't be necessary to change the
> gcc parser. In some places in the gcc docs it is said that you can interface
> with the gcc back-end with the tree (tree.c) or RTL file (rtc.c).

This misconception is resolved in the FAQ, I believe: RTL is not a proper
interface.  Trees, however, are.

HTH,
Andi.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: parser modification followup
  2002-12-10 13:47 ` Andreas Bauer
@ 2002-12-11  0:00   ` Santiago Margareto
  2002-12-13 16:10     ` Andreas Bauer
  0 siblings, 1 reply; 4+ messages in thread
From: Santiago Margareto @ 2002-12-11  0:00 UTC (permalink / raw)
  To: Andreas Bauer; +Cc: gcc-help

I know, I have read it. The issue I have is: how can I get the tree
resulting from compiling? The RTL file is easy, you just add option -da, but
I cannot find the corresponding flag for the parse tree.

----- Original Message -----
From: "Andreas Bauer" <baueran@in.tum.de>
To: "Santiago Margareto" <smargareto@gfi-info.com>
Cc: <gcc-help@gcc.gnu.org>
Sent: Tuesday, December 10, 2002 7:01 PM
Subject: Re: parser modification followup


> > After some research I have found that it won't be necessary to change
the
> > gcc parser. In some places in the gcc docs it is said that you can
interface
> > with the gcc back-end with the tree (tree.c) or RTL file (rtc.c).
>
> This misconception is resolved in the FAQ, I believe: RTL is not a proper
> interface.  Trees, however, are.
>
> HTH,
> Andi.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: parser modification followup
  2002-12-11  0:00   ` Santiago Margareto
@ 2002-12-13 16:10     ` Andreas Bauer
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Bauer @ 2002-12-13 16:10 UTC (permalink / raw)
  To: Santiago Margareto; +Cc: gcc-help

On Wed, Dec 11, 2002 at 08:59:59AM -0300, Santiago Margareto wrote:
> I know, I have read it. The issue I have is: how can I get the tree
> resulting from compiling? The RTL file is easy, you just add option -da, but
> I cannot find the corresponding flag for the parse tree.

Others may have better information for you, but as far as I know, trees
can not be printed out nicely in a similar fashion to RTL.  They are
merely a data structure, but a data structure does not necessarily print
itself, of course.

Read the files tree.* to see which macros you can use to traverse the
data structure (TREE_TYPE, etc.)  Once you get a feeling for it, you will
also find the internals documentation very handy which summarizes those
accessors and the whole structure itself.

Andi.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-14  0:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-10 10:50 parser modification followup Santiago Margareto
2002-12-10 13:47 ` Andreas Bauer
2002-12-11  0:00   ` Santiago Margareto
2002-12-13 16:10     ` Andreas Bauer

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).