[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: [antlr-interest] Re: antlr vs. sableCC comparison


I think someone needs to fire one back at the ANTLR crowd!



----- Forwarded message from lgcraymer <lgc@mail1.jpl.nasa.gov> -----
    Date: Sat, 24 May 2003 05:47:42 -0000
    From: lgcraymer <lgc@mail1.jpl.nasa.gov>
Reply-To: antlr-interest@yahoogroups.com
 Subject: [antlr-interest] Re: antlr vs. sableCC comparison
      To: antlr-interest@yahoogroups.com


My reaction to SableCC has always been, "Why?", and the answer 
always seems to be "it was a good excuse for Gagnon to have fun 
writing a master's thesis".  It has less functionality than either 
ANTLR or JavaCC and was introduced after both were available.  The 
basic features of SableCC are
1.)  DFA lexing
2.)  LALR(1) parsing
3.)  Visitor-based tree walkers.
and the package made no real additions to the state-of-the-art, as 
far as I can tell.

ANTLR can do more powerful lexing than a DFA, but the DFA will win 
on performance against the current ANTLR 2--that's mainly due to the 
fact that there has never been a concentrated effort to generate 
more speed-efficient lexer code.

Predicated LL(k) (ANTLR) parsing can handle any context-free 
grammar, but LALR does not and modern versions of yacc support GLR 
parsing to get past the LALR limitation.  More to the point, actions 
execute where they are placed in ANTLR; that's not quite true in an 
LR parser.

ANTLR's tree grammar approach is more powerful than the visitor 
approach.  In fact, a visitor can be expressed as a special ANTLR 
tree (I've not tested this code, but it should work):

    ( visit )+

    (      .
    |      #( .  ( visit )+ )


--- In antlr-interest@yahoogroups.com, "uprightness_of_character" 
<andrei@m...> wrote:
> Perhaps this has been hashed to death in this group, but Yahoo 
> search capabilities are not that good. 
> So anyway, what are the pros and cons of the two parser 
generators? I 
> worked with antlr some now, but I don't have much experience with 
> sableCC.
> Thanks!
> Andrei


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

----- End forwarded message -----

This mail sent through IMP: http://horde.org/imp/