[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] Sample code for acessing the ast
|
Do you know about the "DOM AST View" that's part of the CDT testing plugin?
It's an optional feature in the full update site.
The PLDT analysis features do alot of work with the CDT's AST.
There are some examples here: http://www.eclipsecon.org/2008/?page=sub/&id=373
http://www.eclipsecon.org/2007/index.php?page=sub/&id=3903
The more complex features referred to in the first talk concentrate on C, not C++.
However the basic analysis in PLDT utilizes some of the APIs for C++ - there's a Cpp visitor in there too.
In the org.eclipse.ptp.pldt.mpi.core project, see the org.eclipse.ptp.pldt.mpi.core.analysis.MpiCPPASTVisitor class
I don't think we do any node insertion or deletion, but hopefully this helps.
...Beth
Beth Tibbitts
Eclipse Parallel Tools Platform http://eclipse.org/ptp
IBM STG Communications Protocols and Tools
Mailing Address: IBM Corp., Coldstream Research Campus, 745 West New Circle Road, Lexington, KY 40511
Wolfgang Kaifler ---03/18/2010 05:30:35 PM---Hallo, i want do do a little bit code analysis in c++. Therefore i use the
From: |
Wolfgang Kaifler <kaiflerw@xxxxxx> |
To: |
cdt-dev@xxxxxxxxxxx |
Date: |
03/18/2010 05:30 PM |
Subject: |
[cdt-dev] Sample code for acessing the ast |
Sent by: |
cdt-dev-bounces@xxxxxxxxxxx |
Hallo,
i want do do a little bit code analysis in c++. Therefore i use the
eclipse cdt parser which works fine for me :-) I wrote a few visitor
patterns, so i am able to find some nodes on the AST.
Now i want to to delete or insert new Nodes.
This ist not for a PlugIn, I only want to transform the AST.
Is there any sample Code to do this? Or is there any site to start with?
Thanks
Wolfgang
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev