[cfe-dev] exporting ASTs for Java
jahanian
fjahanian at apple.com
Fri Feb 4 09:56:53 PST 2011
We have -fobjc-rewrite which takes AST representation of objective-c program and translates into c++ code. Look at RewriteObjC.cpp file.
- Fariborz
On Feb 4, 2011, at 7:15 AM, Stephen Siegel wrote:
> I am writing a Java program. I want it to read in and manipulate a Clang-generated AST. I am new to Clang, but from what I have learned so far, the best approach might be to have Clang export the AST in XML format (clang -cc1 -ast-print-xml foo.c) and have the Java program read in this XML. This will also require re-implementing many of the Clang AST classes in Java. I was wondering if some of you experienced Clangsters can give me some advice...
>
> Does this seem like a reasonable approach?
>
> Where can I find some documentation on the XML representation of the AST?
>
> Is there an XML schema for the Clang AST XML representation?
>
> Where should I start looking to learn more about Clang's AST classes in general?
>
> Thanks,
>
> Steve
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list