[antlr-interest] Re: antlr vs. sableCC comparison
lgcraymer
lgc at mail1.jpl.nasa.gov
Fri May 23 22:47:42 PDT 2003
Andrei--
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):
visitor
:
( visit )+
;
visit
:
( .
| #( . ( visit )+ )
)
;
--Loring
--- In antlr-interest at yahoogroups.com, "uprightness_of_character"
<andrei at m...> wrote:
> Perhaps this has been hashed to death in this group, but Yahoo
Groups'
> 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/
More information about the antlr-interest
mailing list