[antlr-interest] using ANTLR for IDL compiling/code generation

Damien Cassou damien.cassou at gmail.com
Wed Jun 24 00:55:42 PDT 2009


Hi Tim,

On Tue, Jun 23, 2009 at 11:11 PM, Tim Black<timblack0 at gmail.com> wrote:
> Can someone point me in the right direction?

we are doing something very similar in my research group. We have a
lightweight ADL (https://diaspec.bordeaux.inria.fr/) from which we
generate a dedicated framework in Java.

Source-code is available in
https://gforge.inria.fr/plugins/scmsvn/viewcvs.php/diagen/branches/v2/?root=diagen
(see projects DiaSpec-Parser and DiaSpec-Generator).

Basically, we have a grammar file DiaSpec.g which generates an AST
with specific node classes (Program, Device, TypeRef...). Then,
DiaSpec_SEM_1.g verifies different things on the AST, this is the
semantic pass. Finally, I use a visitor on the AST and StringTemplate
to generate java files (in DiaSpec-Generator).

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry


More information about the antlr-interest mailing list