Using of parse tree externally
Dupont, Michael
michael.dupont@mciworldcom.de
Thu Oct 19 04:33:00 GMT 2000
Gaby, Yes, I aggree.
Mark Mitchell did a great job on showing how the tree is put togeather, and
what macros are used.
My respect also goes out to RMS and all the great minds that have been
working on the compiler over the years.
The inherent complexity of any one parse tree for any one given program is
great,
it is not accidental complexity, but part of the problem of the complexity
of any given program itself.
I have been testing by parsing the tree.c and c-parse.c itself and the
resulting dumped parse-trees have consumed my computers main memory.
We are talking about 60K-100K Tree Nodes in a graph.
Some of Perl's Graph::Base algorithms just take forever with a graph of that
size,
If I do a topological sort to get the dependancies, we are talking about
hours of processing.
That is also because of the slow implementation, and the VCG algorithm coded
in C is much faster, but
I personally can not make sense of such a huge amount of data on the screen.
Now with *JUST* parsing tree_common and the types needed directly by them,
I get around 10-thousand tree nodes created.
Now I am not saying that it is impossible,
but I am pointing out the complexity of the tree structure itself is not a
lacking of documentation or good will,
but the real complexity of the problem.
In the end, I would like to run the entire compiler front end through the
system and
then try and to an transformation on that parse dump into a new C++ Class
structure,
this might need a whole cluster of computers working together to process.
If I have lost the plot and there is a much simpler solution to this
problem, please tell me,
Mike
-----Original Message-----
From: Gabriel Dos Reis [ mailto:gdr@codesourcery.com ]
Sent: 19 October 2000 13:03
To: Dupont, Michael
Cc: 'Gabriel Dos Reis'; Marc Espie; gcc@gcc.gnu.org
Subject: Re: Using of parse tree externally
"Dupont, Michael" <michael.dupont@mciworldcom.de> writes:
[...]
| It is a very difficult to dig through the tree nodes because of the
| complexity of the tree structure and the amount of the
| data involved.
The tree data structure and language is pretty-well documented in
c-tree.texi.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
--
This communication contains information which is confidential and
may also be privileged. It is for the exclusive use of the
intended recipient(s). If you are not the intended recipient(s),
please note that any distribution, copying or use of this
communication or the information in it is strictly prohibited.
If you have received this communication in error, please notify
the sender immediately and then destroy any copies of it.
More information about the Gcc
mailing list