How do I print a tree?
Christian Baxmann
klaxi@t-online.de
Sat Apr 8 10:24:00 GMT 2000
Hi there!
I'd like to know how to print a tree (AST), generated by the g++-Front-End.
I don't know if gcc/g++ can do that by themself (via compiler options) or
somehow
have to be inctructed to do so.
There are several print-routines (print_node, print_lang_identifier,
print_lang_type etc.),
but I can't figure out where in gcc/g++ they are used to print a tree (AST).
I searched and
tried to understand the source code, but still can't say where to "activate"
or integrate it.
There has to be a routine that walks through the tree. So, my idea by now is
to use
the print_node-routine (in gcc/print-tree.c) for each node it "walks
trough".
But I guess there is a more simple or allready integrated routine in gcc/g++
that I can't find.
Hopefully yours
Christian Baxmann
More information about the Gcc
mailing list