Earley parsers are appealing because they can parse all context-free languages, unlike LR parsers and LL parsers, which are more typically used in compilers but which can only handle restricted classes of languages. The Earley parser executes in cubic time in the general case , where n is the length of the parsed string, quadratic time for unambiguous grammars , p.145 and linear time for all deterministic context-free grammars. It performs particularly well when the rules are written left-recursively.
Earley parsers are appealing because they can parse all context-free languages, unlike LR parsers and LL parsers, which are, more typically used in compilers but which can only handle restricted classes of languages. The Earley parser executes in cubic time in the general case , where n is the length of the parsed string quadratic time for unambiguous grammars , p.145 and linear time for all deterministic context-free grammars. It performs particularly well when the rules are written left-recursively.