This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Raw form of AST
On Sep 24, 2004, at 4:27 PM, Tobias Schlüter wrote:
Kenneth C. Hall wrote:
I am interested in doing some symbolic manipulation of the Abstract
Syntax Tree (AST) that is the result of the gfortran front end.
gfortran has a compiler option that will write the AST to a file, but
it is in a pretty print form. I would like the unadulterated AST. Is
there a relatively simple way to get this from the gfortran compiler,
and if so, is there a specification document for the form of the AST?
I've posed a similar question regarding tools to transform the AST to
an xml representation. I've created a simple parser of the output from
--dump-parse-tree to do this. I plan on putting this on sourceforge
under the GPL. I'm not sure if this is enough, as it doesn't have
statement level information (but I believe there is no problem with
the FSF backend/frontend policy).
If you need something more elaborate, perhaps we could work
together. I could potentially use something more elaborate than
--dump-parse-tree output. But users of my tools must have
access to whatever is created so it must be part of the standard
gfortran distribution, like --dump-parse-tree.
Regards,
Craig