[antlr-interest] syntactic predicates and exceptions

Prashant Deva prashant.deva at gmail.com
Thu Oct 20 10:26:36 PDT 2005


I believe we should forget discussing whether to include 'if's or not and
think how to include them in the current code gen, which is what is all
about.

On 10/20/05, Martin Probst <mail at martin-probst.com> wrote:
>
> Hi,
>
> > There seems to be a feeling here that there is a tradeoff between
> > efficient code, and "pretty" or readable code.
>
> Yes. Though I'm not completely sure that is actually true. I mean, most
> of the time it will be something along the lines of:
> > if (!match(FOO))
> > return false;
> instead of
> > match(FOO);
> which is not actually killing me. Indeed, it may be nicer to debug, as
> you clearly see that this match() didn't work while stepping over,
> instead of being thrown to a completely different place in the code at
> once.
>
> > I love Antlr, but the generated code isn't all that readable now.
> > Especially when you use #( ... ) to generate trees, the generated code
> > will make your eyes bleed.
>
> +1 from me, maybe someone could hack something that adds an occasional
> line break in there?
>
> Speaking of bleeding eyes btw, could you guys refrain from writing HTML
> mails to a mailing list?
>
> > Readability is a matter of style and formatting. You can take the
> > simplest piece of code and format it in such as way that it is
> > unreadable.
>
> Except for perl of course...
>
> Martin
>
>


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


More information about the antlr-interest mailing list