[antlr-interest] Question

Mark Volkmann r.mark.volkmann at gmail.com
Tue May 27 13:53:24 PDT 2008


On Tue, May 27, 2008 at 3:32 PM, Gavin Lambert <antlr at mirality.co.nz> wrote:
> At 07:37 28/05/2008, Paulo Azevedo wrote:
>>Hi, i am new to antlr, i bought the book and i am getting used to
>>it.
>>My question is, is it possible to use antlr to generate java code
>>to be ran in some point in the future, instead os execute it
>>right a way.
>
> I'm not sure I understand the question, because that's what ANTLR *does* do
> anyway.

I like to think of ANTLR as supporting three specific use cases.
1) Simply validate input.
2) Process input, doing something with it other than outputting code
to be executed later.
3) Translate input into some programming language or bytecode to be
executed later.

I think Paulo wants to do #3. I recommending using the StringTemplate
library along with ANTLR to produce the Java code output.

-- 
R. Mark Volkmann
Object Computing, Inc.


More information about the antlr-interest mailing list