+1
That would be awesome. You could even make the runtime for the
individual language read the intermediate representation and not require
generated code at all.
Cheers,
Phil
Bryan Duxbury wrote:
To the idea of using multiple language generators instead of C++, I've
been thinking that if the compiler itself generated to some common
intermediate language like JSON, it would be really easy to write a
generator. JSON (or XML or YAML or something like it) probably already
has a parser in most languages, so you'd just treat it like an AST and
generate code however you want. It could be hooked up via
stdin/stdout. Then, I could generate my Ruby classes with a Ruby
script :).