[cfe-dev] minimal clang for AST use
Olaf Krzikalla
Olaf.Krzikalla at tu-dresden.de
Mon Mar 28 23:48:58 PDT 2011
Hi,
Am 01.12.2010 01:14, schrieb chris nuernberger:
> I am working to build a minimal clang that doesn't include any llvm
> code generation abilities. This is intended to analyze a source code
> base and produce various code generation files based on the clang AST.
>
> I modified various files and such to remove most of llvm (except
> LLVMSupport) from the mix; if anyone is interested I could tell you
> exactly what I did.
I'd be interested too. My application only transformes the AST and
rewrite it.
> One thing that would be neat would be if someone were to build an
> application to enable quick creation of code generators. If we could
> map the AST to a more useable scripting system and thus quickly write
> an action that processed the AST from one or multiple files combined.
> The key would be to map the AST to some generic and easily scriptable
> object model (or map a scripting system to the AST directly).
Regarding the scripting model you might want to check out some papers
(e.g. http://www.springerlink.com/content/v2114255v58xt260/).
Currently I implement my transformations in C++ but I have already
thought about some more declarative AST transformation rules too.
Anything in that direction would be very interesting.
Best regards
Olaf Krzikalla
More information about the cfe-dev
mailing list