From: | iank@idiom.com (Ian L. Kaplan) |
Newsgroups: | comp.compilers |
Date: | 1 Jul 2000 11:10:37 -0400 |
Organization: | Unknown |
References: | 00-06-112 |
Keywords: | tools, PCCTS |
Tuukka Tikkanen <spamtrap@tic0.net> wrote:
>Are lex and yacc (or flex and bison, if you prefer) still the only
>practical tools to go about making lexers and parsers? After searching
>the net for other resources, all I could come up with was PCCTS, but
>it appears to be - how should I put it - well, not so maintained
>anymore
ANTLR (www.antlr.org) is a second generation PCCTS. ANTLR generates
both Java and C++ parsers. There is a very active user community for
ANTLR and a new ANTLR release (probably 2.7.1) is in the works.
I have used ANTLR for a large project: a Java parser for a Java
front end. As with all parser generators, there is a steep learning
curve.
I looked at a lot of different parser generators. My "Why Use
ANTLR" web page
(http://www.bearcave.com/software/antlr/antlr_expr.html) describes the
alternatives I considered and discusses why I chose ANTLR.
I also wrote up some ANTLR examples for some simple grammars,
including a tiny C
(http://www.bearcave.com/software/antlr/antlr_examples.html)
ANTLR supports direct AST generation from the parser. This is great
for small to medium language processors. As I mentioned in the page
above, I chose to generate my AST via C++ productions. This still
seems the correct course to me.
Ian Kaplan
abuse@bearcave.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.