[cfe-dev] create source 2 source compiler with clang libraries

Chi chi.c.chi at campus.tu-berlin.de
Fri Aug 27 07:04:41 PDT 2010


Hi everyone,

I would like to (initially) create a src-to-src compiler to compile some language extension I thought up for parallel programming. What I had in mind was to have to extend the C grammar, and have a compiler produce legal C (gnu/c99) out of it again. So I wanted to ask if Clang could help me do this in a intuitive/easy way? 

I would like to create a simple program that does just a src to src transformation. As a starting point a program, that uses the Clang libraries that simply is able to lex, parse, build AST and typecheck, and generate the legal C/C++ by simply printing the AST nodes, would be great. Can you guys maybe point me in the right direction and maybe indicate the complexity of both creating the starting point and the src-to-src compiler? 

Kind regards,
Chi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100827/18d789bb/attachment.html>


More information about the cfe-dev mailing list