[Python-Dev] Re: CML2 compiler slowness

Paul Prescod paulp@ActiveState.com
Mon, 12 Mar 2001 19:01:14 -0800


John Aycock wrote:
> 
> ...
> 
> For any unambiguous
> grammar, the worst case drops to O(n^2), and for a set of grammars 
> which loosely coincides with the LR(k) grammars, the complexity drops 
> to O(n).

I'd say: "it's linear for optimal grammars for most programming
languages." But it doesn't warn you when you are making a "bad grammar"
(not LR(k)) so things just slow down as you add rules...

Is there a tutorial about how to make fast Spark grammars or should I go
back and re-read my compiler construction books?

-- 
Python:
    Programming the way
    Guido
    indented it.
       - (originated with Skip Montanaro?)