[antlr-interest] Must all grammar rules be implemented for tree parsers?

Martin Probst mail at martin-probst.com
Tue Dec 6 04:57:12 PST 2005


Hi,

> > 2) Is there a reference of optimizations that are listed on some web
> > site (or in the ANTLR docs that I somehow haven't found)? The only
> > ones I've thought of are numeric or string constants being used in an
> > expression.
> 
> Tony Hoare: "Premature optimisation is the root of all evil in programming".

I think he was referring to code-rewriting rules? As for those they are
very different with respect to the domain & type of the language -
functional, imperative, object oriented, declarative languages all have
different patterns. E.g. tail call optimisation is essential in
functional languages, and more or less irrelevant in others.

I don't know of a good collection, but if anyone does, please go
ahead :-)

Martin



More information about the antlr-interest mailing list