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

Re: SableCC vs. Antlr?

Hi Robert,

--- Robert Feldt <feldt@ce.chalmers.se> wrote: > Hi
> How does SableCC compareto Antlr?

You can find this in the thesis document.

> Features of SableCC that is not in Antlr? 
> Vice versa?
...I would say that all the features found in Antlr
can be found in SableCC in a different way that makes
your life much easier. E.g, you don't have to write
the tree walkers. SableCC generates a bunch of classes
that allow you to manipulate the nodes of a tree.
With SableCc, you don't have to write the scanner,
parser and tree walkers as you do with Antlr. SableCC,
does all the job for you. Hence, faster development
> Benefits of using SableCC?
> Drawbacks?
At the moment the drawbacks are the following:

1)Generation of efficient compilers such as the ones
generated by JavaCC, Antlr or CUP. 
2)The error message generated by the compiler are not
very understandable. (But there is a patch that
generates proper messages)
3)Error recovery is not yet supported. Hence,
everytime the compiler finds an error, it stops and
issues the error message.

From all this drawbacks, 2) and 3) are going to be
improved in the future. There were a lot of
discussions about it some while ago.
As for 1), just leave it as it is. It doesn't do any
harm. I wrote large compiler with it and believe me,
it was faster than javac with code of the same size
running on a Linux machine. So, I don't think it is
that slow.

Anyway, I wish that this clears your doubts.

All the best,

Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!