Abstract

Derivational complexity of context-free grammars is studied. Minimal grammar-dependent upper bounds are determined both on the derivational time complexity, that is, the number of derivation steps needed to derive a sentence of given length, and on the derivational space complexity, that is, the length of the longest sentential form needed in the derivation. In addition to general context-free grammars, these upper bounds are also determined specifically for ɛ -free grammars, non-left-recursive and non-right-recursive grammars, and for LL( k ) grammars. The results might prove useful in parser optimization, because the complexity of a parser is closely related to the derivational complexity of the underlying context-free grammar.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call