[antlr-interest] Using the results

Nikolas Everett nik9000 at gmail.com
Tue Mar 16 16:26:18 PDT 2010


Its been a long time since I last used antlr and I'm now getting the chance
to use it again.  I happened on a rather conspicuous gap in my knowledge: I
have no idea what the right way take actions based on parsed results.

Should I parse my input to an AST and then walk the AST?  This seems like
it'd be a pain to maintain.
Should I call actions directly from antlr?  This simpler but in practice is
really cumbersome and makes using antlrworks much more difficult.

Both of these are going to leave me with gobs of code translating from the
AST representation to my domain objects.

What is the best practice for doing this?

Nik


More information about the antlr-interest mailing list