Abstract
Deterministic parsing techniques are typically used in favor of general parsing algorithms for efficiency 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 deterministic methods even on grammars for commonly-used programming languages.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.
M. A. Alonso, D. Cabrero, and M. Vilares. Construction of Efficient Generalized LR Parsers. Proceedings of the Second International Workshop on Implementing Automata, 1997, pp. 131–140.
D. T. Barnard and J. R. Cordy. SL Parses the LR Languages. Computer Languages 13, 2 (1988), pp. 65–74.
J. R. Bell. Threaded Code. CACM 16, 6 (June 1973), pp. 370–372.
A. Bhamidipaty and T. A. Proebsting. Very Fast YACC-Compatible Parsers (For Very Little Effort). Software: Practice and Experience 28, 2 (February 1998), pp. 181–190.
S. Billot and B. Lang. The Structure of Shared Forests in Ambiguous Parsing. Proceedings of the 27th Annual Meeting of the Association for Computational Linguistics, 1989, pp. 143–151.
M. van den Brand, A. Sellink, and C. Verhoef. Current Parsing Techniques in Software Renovation Considered Harmful. International Workshop on Program Comprehension, 1998, pp. 108–117.
M. Bouckaert, A. Pirotte, and M. Snelling. Efficient Parsing Algorithms for General Context-free Parsers. Information Sciences 8, 1975, pp. 1–26.
J. Earley. An Efficient Context-Free Parsing Algorithm, Ph.D. thesis, Carnegie-Mellon University, 1968.
J. Earley. An Efficient Context-Free Parsing Algorithm. CACM 13, 2 (February 1970), pp. 94–102.
M. A. Ertl and D. Gregg. Hardware Support for Efficient Interpreters: Fast Indirect Branches (Draft). May, 2000.
J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.
D. Grune and C. J. H. Jacobs. Parsing Techniques: A Practical Guide. Ellis Horwood, 1990.
R. N. Horspool and M. Whitney. Even Faster LR Parsing. Software: Practice and Experience 20, 6 (June 1990), pp. 515–535.
S. C. Johnson. Yacc: Yet Another Compiler-Compiler. Unix Programmer’s Manual (7th edition), volume 2B, 1978.
P. Klint. Interpretation Techniques. Software: Practice and Experience 11, 1981, pp. 963–973.
D. E. Knuth. The Art of Computer Programming Volume 3: Sorting and Searching (2nd edition), Addison-Wesley, 1998.
B. Lang. Deterministic Techniques for Efficient Non-Deterministic Parsers. In Automata, Languages, and Programming (LNCS #14), J. Loeckx, ed., Springer-Verlag, 1974.
R. Leermakers. A recursive ascent Earley parser. Information Processing Letters 41, 1992, pp. 87–91.
R. Leermakers. Recursive ascent parsing: from Earley to Marcus. Theoretical Computer Science 104, 1992, pp. 299–312.
R. Leermakers. The Functional Treatment of Parsing. Kluwer Academic, 1993.
P. McLean and R. N. Horspool. A Faster Earley Parser. Proceedings of the International Conference on Compiler Construction, CC’ 96, 1996, pp. 281–293.
T. J. Pennello. Very Fast LR Parsing. Proceedings of the SIGPLAN’ 86 Symposium on Compiler Construction, SIGPLAN 21, 7 (1986), pp. 145–151.
P. Pfahler. Optimizing Directly Executable LR Parsers. Compiler Compilers, Third International Workshop, CC’ 90, 1990, pp. 179–192.
F. W. Schroer. The ACCENT Compiler Compiler, Introduction and Reference. GMD Report 101, German National Research Center for Information Technology, June 2000.
M. Vilares Ferro and B. A. Dion. Efficient Incremental Parsing for Context-Free Languages. Proceedings of the 5th IEEE International Conference on Computer Languages, 1994, pp. 241–252.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Aycock, J., Horspool, N. (2001). Directly-Executable Earley Parsing. In: Wilhelm, R. (eds) Compiler Construction. CC 2001. Lecture Notes in Computer Science, vol 2027. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45306-7_16
Download citation
DOI: https://doi.org/10.1007/3-540-45306-7_16
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41861-0
Online ISBN: 978-3-540-45306-2
eBook Packages: Springer Book Archive