james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Draeger ...@joachim-draeger.de>
Subject RE: ANTLR
Date Tue, 12 Dec 2006 11:08:55 GMT
Hi Steve,

Am Montag, den 11.12.2006, 19:32 +0000 schrieb Steve Brewin:

> You might want to look at the jSieve code to see how something similar to
> your objectives is achieved using JavaCC rather than ANTLR. This is a
> different, not necessarily better, approach.

Okay, I looked at the jSieve code, googled and read a bit docs.
ANTLR was my first experience with parsers and use of ABNF like
notations apart from a few exercises at university.

>>From a first look its syntax seems to be comparable. Some notations are
very similar. The steep learning curve for non compiler builders might
be the same. :-)

> It would be interesting to compare and contrast the pro's and con's of each
> approach. My hazy memory says I looked at both approaches and plumped for
> JavaCC's as being easier to work with (to me).

Well, for an objective judgment I would have to spend another day with
JavaCC, for sure. :-) I'm not going to do that now, but maybe I get some
more insight to JavaCC when I'm more familiar with ANTLR.
But yes, it could be quite interesting to discuss the differences we

With a lot of IMOs and AFAIKs, pros for ANTLR:

  - well suited for unit tests because parsing could start at
    any rule
  - full control over tree-structure (which should be a node? Which
    should be a List of arguments?) without writing java code
  - presentation logic for testing/debugging like a text or a gui
  - more (probably not better) documentation
  - wider use in similar projects (?)
  - inheritance for lexer and parser 

> Of course the JSieve code is parsing Sieve commands rather than IMAP's.

This could maybe make a difference for the way ANTLR and JavaCC build


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message