This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: An ask for documentation of trees


On 21-Oct-2002, D. Adamian <dima@pulsepow.hop.stu.neva.ru> wrote:
> I'm currently developing a front-end for a language. I've read in the
> docs that using RTL for interfacing front-end and the bulk of GCC is
> a Bad Thing. And that trees should be used for it.

That's correct.

> So the question is: what should be done in the front-end to use
> trees?

See the "treelang" example.

> The language is not much similar to C, so some new types of
> tree nodes should be defined and implemented. How is this done?

Note that for the Mercury front-end, I didn't define any new tree nodes,
even though Mercury is very different from C.

But if you really do need to or want to define your own tree nodes,
have a look at java/java-tree.def and java/java-tree.h for an example.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]