[cfe-dev] Using clang to translate a program in c++ to C or other languages

Manuel Klimek klimek at google.com
Fri Jan 18 02:00:15 PST 2013


+cfe-dev

On Fri, Jan 18, 2013 at 10:56 AM, Miguel Aguilar <
miguel.aguilar at ice.rwth-aachen.de> wrote:

>  Hi Manuel,
>
> Is it possible to build a new AST while you walk the original AST?
>

Well, technically it is, but I think emitting code in your other language
will be easier and more maintainable...

Cheers,
/Manuel


>
> Thanks,
>
> Miguel
>
>
> On 01/18/2013 08:26 AM, Manuel Klimek wrote:
>
>  On Thu, Jan 17, 2013 at 2:58 PM, Miguel Aguilar <
> miguel.aguilar at ice.rwth-aachen.de> wrote:
>
>> Hi,
>>
>> I would like to know the possible approaches to translate a program in
>> C++ to another language such as C using Clang. Should I walk in the AST and
>> emit the code or should I create a new AST in the other language for
>> example?.
>>
>
>  The general advice I've seen given most often on this list is to walk
> the AST and emit the code.
>
>  Cheers,
> /Manuel
>
>
>>
>> Thanks in advanced,
>>
>> Miguel
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
>
>
> _______________________________________________
> cfe-dev mailing listcfe-dev at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130118/600c59e2/attachment.html>


More information about the cfe-dev mailing list