This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Using of parse tree externally


<<The parser's syntax tree will also be interesting for cross referencing,
if you have a give AST node, in what parser rule was that node created from?
What where the tokens on the stack, or inherited that might be needed.
In the gcc -Dy  dumps, you have the entire source code of the program,
albeit run through the "Fleischwolf" or meatgrinder.
That might be of interest to the two-way reverse engineering tools ala
rose/together and co.,
you can then get then entire token/rule stream associated with a AST, and be
able to reconstruct the original source code from an give dump.
>>

Well most certainly the AST should contain source location information,
generally the AST is precisely a superset of the parser syntax tree.
Clearly for cross-referencing you need visibility analysis to be
performed when you have a block structured language like C, where 
you can have many instances of the same identifier in the same function.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]