[antlr-interest] Code generation advice
Eric
researcher0x00 at gmail.com
Wed Jun 20 11:14:04 PDT 2012
Ok, I'm curious as to what you are trying to do. It sounds like something I
once tinkered with but since I did not understand your exact goal I could
be totally wrong.
The only part that I understood as part of the goal was "generation of Java
interfaces from EBNF-style grammars". Are you trying to generate Java
interfaces from a grammar for other languages or interface languages such
as C++, CORBA, etc.?
Eric
On Wed, Jun 20, 2012 at 12:08 PM, Matt Benson <gudnabrsam at gmail.com> wrote:
> Hi all,
> In the Java ecosystem embedded DSLs have become increasingly popular
> over the past several years. In my opinion the primary drawback to
> these is the painful task of their creation. For this reason I want
> to experiment with the generation of Java interfaces from EBNF-style
> grammars to see what I can accomplish, in true Dr. Terence Parr "why
> program by hand in 5 days..." fashion. I have explored, for example,
> xtext, but the process of going from its meta-grammar to EDSL code is
> non-obvious. I'm open to other suggestions if anyone has any, but in
> the meantime I'm looking at ANTLR 4 and/or 3-based approaches. It
> would seem most appropriate to use the ANTLR 4 meta-grammar, from
> which point I would seem to have the following options:
>
> * Implement a custom code generation target for ANTLR 4
> * Use ANTLRMorph with the ANTLR 3-based ANTLR 4 meta-grammar
>
> It might well be the case that these differ only in the manner in
> which the output stringtemplates are provided. Does anyone have any
> opinions on which approach is to be preferred? Failing that, I am
> willing to entertain aspersions cast on, or less likely, advocations
> in favor of, my sanity in conceiving this endeavor.
>
> Thanks in advance for any input,
> Matt
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
More information about the antlr-interest
mailing list