Re: ANTLR2 and JavaCC: Detailed comparison?

Terence Parr <parrt@magelang.com>
27 Sep 1997 01:05:52 -0400

          From comp.compilers

Related articles
ANTLR2 and JavaCC: Detailed comparison? dmahler@ozemail.com.au (Daniel Mahler) (1997-09-23)
Re: ANTLR2 and JavaCC: Detailed comparison? parrt@magelang.com (Terence Parr) (1997-09-27)
| List of all articles for this month |
From: Terence Parr <parrt@magelang.com>
Newsgroups: comp.compilers.tools.pccts,comp.compilers
Date: 27 Sep 1997 01:05:52 -0400
Organization: MageLang Institute
References: 97-09-067
Keywords: lex, Java, tools

Daniel Mahler wrote:
>
> Has anyone done a detailed comparison of ANTLR2 and JavaCC.


Sriram (Dr. JavaCC) and I are good friends from many years of
research/fun. In my biased opinion, I think the tools are simply
different styles with similar functionality. For example, his
syntax is more "code"-like, whereas mine is EBNF. I have stolen
ideas from Sriram as he has used PCCTS ideas so you should be shocked
if one tool had a pronounced edge over the other.


JavaCC has a DFA-based lexer that will treat you just like you're
used to ;) whereas ANTLR lexers use predicated-LL(k). Our's is
more powerful from a language recognition standpoint, but theirs
handles UNICODE, is fast and familiar (easier to specify).


So, really, it's style not functionality you should consider. :)


> I am particularly interested in their transformation components
> ie TreeParser and JJTree.


JJTree looks cool. Got a demo from Sriram the other day. A different
style of tree construction from ANTLR with some improvements.


In terms of tree parsing (not building), however, I am not sure if
they have a tree parser/transformer generator at this point. Perhaps
he can comment.


Hope this helps,
Terence
--


Post a followup to this message

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