Jim Powers scripsit:
> Since when is too powerful a bad thing? ;-)
When you wish to prove something about it, so as to enable less general
(and faster/smaller) implementation methods to be used. Fully general
Earley parsing is very powerful, but it is also O(N^3). LALR(1) parsing
is linear with a small constant factor; packrat parsing is also linear,
but with a much larger constant factor. If you limit your input
language to something that can be parsed by a LALR(1) parser, you get
a big performance win.
This tradeoff extends well beyond computers. If you want to be able to
transport an object (of reasonable mass) over any terrain, hire a human
being: neither snow nor rain nor darkness of night, etc. But if you can
count on having some sort of roads, a truck will give you greater speed
*and* greater mass, and the better the roads, the better the results.
--
John Cowan
http://www.ccil.org/~cowan co...@ccil.org
One of the oil men in heaven started a rumor of a gusher down in hell. All
the other oil men left in a hurry for hell. As he gets to thinking about
the rumor he had started he says to himself there might be something in
it after all. So he leaves for hell in a hurry. --Carl Sandburg