[antlr-interest] A postmortem of my use of antler
Andy Tripp
antlr at jazillian.com
Tue Mar 11 10:42:51 PDT 2008
Richard Clark wrote:
> 3. Compiler construction and its cousins Lexing and Parsing are
> *hard*. If you think the ANTLR documentation is challenging, try
> reading Aho, Sethi, and Ullman. There's a balance between setting
> people's expectations and scaring them away. On the other hand, I
> appreciate constructive conversations about helping people get
> started. (I got my start teaching software development courses and I'm
> still partial to the newcomers. :) )
>
Lexing and parsing may be hard in general, but are very often easy for a
specific task.
I agree with Benjamin that the documentation for doing the easy stuff
could be better.
Compiling Java code to byte code is not an easy subject, but simply
*using* a compiler like javac
is completely trivial. Writing your own lexer or parser is often
somewhere in the middle, between
having to understand what LL(*) is and what a semantic predicate is, and
simply writing 20 lines of
code to call an existing lexer and parser.
The mailing list is great, but the messages here should also be sending
up a red flag. 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?"
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. I realize that
ease-of-use-for-newbies is not the direction
that ANTLR is heading, but ANTLR could certainly be made easier without
"dumbing it down".
I like Benjamin's idea of having someone study people who are just
learning parsers and ANTLR,
and making it easier for the newbie. Couldn't hurt.
More information about the antlr-interest
mailing list