Re: Anything better than lex & yacc? Everyone still using those?

iank@idiom.com (Ian L. Kaplan)
1 Jul 2000 11:10:37 -0400

          From comp.compilers

Related articles
Anything better than lex & yacc? Everyone still using those? spamtrap@tic0.net (Tuukka Tikkanen) (2000-06-30)
Re: Anything better than lex & yacc? Everyone still using those? feriozi@my-deja.com (2000-06-30)
Re: Anything better than lex & yacc? Everyone still using those? idbaxter@semdesigns.com (Ira D. Baxter) (2000-06-30)
Re: Anything better than lex & yacc? Everyone still using those? mihai@cs.wisc.edu (Mihai Christodorescu) (2000-06-30)
Re: Anything better than lex & yacc? Everyone still using those? iank@idiom.com (2000-07-01)
Re: Anything better than lex & yacc? Everyone still using those? pedwards@dmapub.dma.org (2000-07-01)
Re: Anything better than lex & yacc? Everyone still using those? isaac@latveria.castledoom.org (2000-07-04)
Re: Anything better than lex & yacc? Everyone still using those? jerry@swsl.co.uk (2000-07-04)
Re: Anything better than lex & yacc? Everyone still using those? Frank.Gerlach@brokat.de (Frank Gerlach) (2000-07-18)
Re: Anything better than lex & yacc? Everyone still using those? chris@cjl1.demon.co.uk (Chris Locke) (2000-07-18)
Re: Anything better than lex & yacc? Everyone still using those? dforcier@allaire.com (Darren Forcier) (2000-07-18)
| List of all articles for this month |

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


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.