This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An ask for documentation of trees
- From: Fergus Henderson <fjh at cs dot mu dot OZ dot AU>
- To: "D. Adamian" <dima at pulsepow dot hop dot stu dot neva dot ru>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 22 Oct 2002 01:40:11 +1000
- Subject: Re: An ask for documentation of trees
- References: <AAXT1jzOi4k6@pulsepow.hop.stu.neva.ru>
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.