[antlr-interest] A postmortem of my use of antler

Richard Clark rdclark at gmail.com
Tue Mar 11 11:25:35 PDT 2008


On Tue, Mar 11, 2008 at 10:42 AM, Andy Tripp <antlr at jazillian.com> wrote:

>  I don't think that getting a 10-line ANTLR grammar working should be
>  much more difficult than getting a 10-line Java/C/whatever program working.

To disagree with you (gently), someone who cut their teeth on LISP
will probably have a hard time with their first 10-line
Java/C/Ruby/etc. program (and vice versa). There's a whole different
way of thinking involved.

>  How many times do we see people ask "why isn't this 10-line grammar
>  working?" or "how do I print out an AST nicely?"

These kinds of questions are parts of the learning process, not
necessarily de facto evidence of a problem with ANTLR. Where we can
help is identifying common misperceptions about ANTLR and describing
those parts in the correct way (e.g. how to think about structuring
your lexer definitions) and defining key ideas in a way that people
can become more self-sufficient with the documentation.

I would not, as has been suggested, try to lay a simpler face on
ANTLR. The tool is designed very cleanly and simply; there's a clear
connection between when you write in the grammar and what you get from
ANTLR (assuming your mental model of the app is correct.) Putting a
"simplifying" layer on top can introduce assumptions that actually
make the result harder to understand and work with.

The hardest part of writing good conceptual documentation is to make
sure it's absolutely correct. I'm happy to draft it, if I can get
reviewers who really know ANTLR all the way through (Kay, Ter, etc.)

...Richard


More information about the antlr-interest mailing list