| | |
Summary: Directly-Executable Earley Parsing
John Aycock and Nigel Horspool
Department of Computer Science,
University of Victoria,
Victoria, B. C., Canada V8W 3P6
faycock,nigelhg@csc.uvic.ca
c
Springer-Verlag
Abstract. Deterministic parsing techniques are typically used in favor
of general parsing algorithms for eÆciency reasons. However, general
algorithms such as Earley's method are more powerful and also easier
for developers to use, because no seemingly arbitrary restrictions are
placed on the grammar. We describe how to narrow the performance
gap between general and deterministic parsers, constructing a directly-
executable Earley parser that can reach speeds comparable to deter-
ministic methods even on grammars for commonly-used programming
languages.
1 Introduction
Most parsers in use today are only capable of handling subsets of context-free
grammars: LL, LR, LALR. And with good reason { eÆcient linear-time algo-
|