[antlr-interest] syntactic predicates and exceptions

Martin Probst mail at martin-probst.com
Thu Oct 20 09:59:18 PDT 2005


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



More information about the antlr-interest mailing list