From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jeremias A. Sauceda" To: gcc-help@gcc.gnu.org Subject: AST to XML Date: Sun, 18 Mar 2001 00:04:00 -0000 Message-id: <3AB46C2E.32C65CE0@iastate.edu> X-SW-Source: 2001-03/msg00147.html Hello, I am a research assistant at Iowa State's Software Reengineering Lab. Last semester I created a program to convert Edison Design Group's Intermediate Language files (an Abstract Syntax Tree) into XML. Unfortunately their C/C++ front end does not support many gcc extensions. I would like to use GCC's front end instead, since it obviously support gcc extensions and is open source. I desperately need gcc extensions since I am analyzing the Linux Kernel, which is very biased to gcc. There are two reasons why EDG's front end was chosen. The abstract syntax tree it creates is a complete representation of the source code, no optimizations are done. We received the full source code (after signing an NDA). We need a pristine representation of the source code since we are doing high level analysis of code; for automatic MPI parallelization, slicing, etc. By glancing through tree.h and tree.def I think that most of the information I need is present except for line and column numbers. I need at least the block start and end points, preferably those of statements, optimally of all expression terminals. Is this already in the tree? What do I have to do to add it? Ultimately I would like to create an XML backend to gcc. So instead of an object file I get an XML AST. What do you think? Thanks, Jeremias Sauceda