Re: Code Generator module?



actually, I hope it's more like a class constructor.
for example, I give class name, method definition and its
corresponding code body. the module can generate .cpp and .h files.
the output code should be C++.

a better example:
my $cg = TheModule->new("ClassName");
my $m = $cg->AddMethod("virtual","int","F1", "int&");
$m->AddBody('printf("hello\n");');

$cg->GenerateHeader();
$cg->GenerateCode();

I have one of my own. But I am hoping there is a better one out there.

Thanks.

On Aug 13, 10:31 am, "b.e." <bryant.ea...@xxxxxxxxx> wrote:
On Aug 12, 3:08 pm, doufunao <gaoshan2...@xxxxxxxxx> wrote:

Hi,

I'm looking for a module to generate C++ code (.cpp and .h files) with
some sort of input. Is there such a module?
thanks.

You want to generate C++ code (not compile mind you) from what *kind*
of input? Are people writing something in C? C++? Java? Haskell?
English? Spanish? to start and you want to .. do what with it?

Thanks,
Bryant

.