thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "alessandro rossi (JIRA)" <>
Subject [jira] [Commented] (THRIFT-1173) Using template system (for example: ctemplate) for code generation
Date Fri, 03 Jun 2011 08:00:48 GMT


alessandro rossi commented on THRIFT-1173:

an update:
-I used ctemplate, but this template engine is very poor (no "for"/"if")
-I switched to (modificated) cpptempl (
 -for / if
 -easy parameter passing
 -only two file (cpptempl.cpp,cpptempl.h)
 -MIT license (is really good?)
 -no else/elif
 -no include
-I'm investigating in order to use flex/bison (I used them about 15 years ago :P ) for a new
simple-but-powerful template engine without lib dependancies (thrift already use flex/bison
for its grammar).
the new template engine MUST have:

PS: I'm working to python generator using cpptempl and the code lines now are 2240 (original
2390). It's heavy to pass for embedded-code to template-code.

> Using template system (for example: ctemplate) for code generation
> ------------------------------------------------------------------
>                 Key: THRIFT-1173
>                 URL:
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>    Affects Versions: 0.6.1
>            Reporter: alessandro rossi
>            Priority: Minor
>              Labels: generation, template
> IMHO, the code generation embedded into generator's code is not a good solution.
> With ctemplate (, for example, we can separate
logic with generation code.
> If you want I can implement an example for cpp generator.
> Best Regards,
> Alessandro

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message