[antlr-interest] syntactic predicates and exceptions

Prashant Deva prashant.deva at gmail.com
Thu Oct 20 00:32:33 PDT 2005


>If you remove exception handling for back-tracking, there is one risk: the
>readability of the code (and hence the ease of debugging and tracing) will
>be reduced.
With ANTLR Studio available, I dont think debugging the generated code
should not be an issue as you can debug right into the grammar file and take
a look at 'live' parse trees and ASTs etc.
So I think it is quite ok that the code is a little cluttered up if the gain
in speed is large.

PRASHANT


On 10/20/05, Nigel Sheridan-Smith <nbsherid at secsme.org.au> wrote:
>
>
>
>
> > -----Original Message-----
> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of Sohail Somani
> > Sent: Wednesday, 19 October 2005 12:54 PM
> > To: Don Caton
> > Cc: 'ANTLR Interest'
> > Subject: RE: [antlr-interest] syntactic predicates and exceptions
> >
> > I think this is a good point. Especially since the code is generated it
> > doesn't need to be maintained. While developing ~ 1 KLOC grammar, I've
> > had to debug into the generated code about twice. So if I have to see if
> > statements, its not a big deal.
> >
> > Btw, it was great debugging into the generated code. So easy to read!
> >
>
> I don't want to weigh in to this argument too much, but I do want to
> mention
> one point.
>
> If you remove exception handling for back-tracking, there is one risk: the
> readability of the code (and hence the ease of debugging and tracing) will
> be reduced.
>
> If high performance is essential, then removing the exception handling is
> the way to go. However, if readability of the parsers/lexers generated is
> an
> essential requirement, then you should consider what you are losing.
>
> I certainly don't want to give Terence more work than he already has, but
> can a command line switch or ANTLR option be considered here? Do people
> see
> benefits in readability and the ease of debugging?
>
> Nigel
>
> --
> Nigel Sheridan-Smith
> PhD research student
>
> Faculty of Engineering
> University of Technology, Sydney
> Phone: 02 9514 7946
> Fax: 02 9514 2435
>
>
>


--
Prashant Deva
Creator, ANTLR Studio, http://www.antlrstudio.com
Founder, Placid Systems
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20051020/95a5c17e/attachment-0001.html


More information about the antlr-interest mailing list