Skip to main content

Directly-Executable Earley Parsing

  • Conference paper
  • First Online:

Part of the Lecture Notes in Computer Science book series (LNCS,volume 2027)

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.

Keywords

  • Parent Pointer
  • Grammar Rule
  • Terminal Symbol
  • Memory Page
  • Nonterminal Symbol

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

  1. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. D. T. Barnard and J. R. Cordy. SL Parses the LR Languages. Computer Languages 13, 2 (1988), pp. 65–74.

    CrossRef  Google Scholar 

  4. J. R. Bell. Threaded Code. CACM 16, 6 (June 1973), pp. 370–372.

    Google Scholar 

  5. 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.

    CrossRef  Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. M. Bouckaert, A. Pirotte, and M. Snelling. Efficient Parsing Algorithms for General Context-free Parsers. Information Sciences 8, 1975, pp. 1–26.

    Google Scholar 

  9. J. Earley. An Efficient Context-Free Parsing Algorithm, Ph.D. thesis, Carnegie-Mellon University, 1968.

    Google Scholar 

  10. J. Earley. An Efficient Context-Free Parsing Algorithm. CACM 13, 2 (February 1970), pp. 94–102.

    Google Scholar 

  11. M. A. Ertl and D. Gregg. Hardware Support for Efficient Interpreters: Fast Indirect Branches (Draft). May, 2000.

    Google Scholar 

  12. J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.

    Google Scholar 

  13. D. Grune and C. J. H. Jacobs. Parsing Techniques: A Practical Guide. Ellis Horwood, 1990.

    Google Scholar 

  14. R. N. Horspool and M. Whitney. Even Faster LR Parsing. Software: Practice and Experience 20, 6 (June 1990), pp. 515–535.

    CrossRef  Google Scholar 

  15. S. C. Johnson. Yacc: Yet Another Compiler-Compiler. Unix Programmer’s Manual (7th edition), volume 2B, 1978.

    Google Scholar 

  16. P. Klint. Interpretation Techniques. Software: Practice and Experience 11, 1981, pp. 963–973.

    Google Scholar 

  17. D. E. Knuth. The Art of Computer Programming Volume 3: Sorting and Searching (2nd edition), Addison-Wesley, 1998.

    Google Scholar 

  18. B. Lang. Deterministic Techniques for Efficient Non-Deterministic Parsers. In Automata, Languages, and Programming (LNCS #14), J. Loeckx, ed., Springer-Verlag, 1974.

    Google Scholar 

  19. R. Leermakers. A recursive ascent Earley parser. Information Processing Letters 41, 1992, pp. 87–91.

    Google Scholar 

  20. R. Leermakers. Recursive ascent parsing: from Earley to Marcus. Theoretical Computer Science 104, 1992, pp. 299–312.

    Google Scholar 

  21. R. Leermakers. The Functional Treatment of Parsing. Kluwer Academic, 1993.

    Google Scholar 

  22. P. McLean and R. N. Horspool. A Faster Earley Parser. Proceedings of the International Conference on Compiler Construction, CC’ 96, 1996, pp. 281–293.

    Google Scholar 

  23. T. J. Pennello. Very Fast LR Parsing. Proceedings of the SIGPLAN’ 86 Symposium on Compiler Construction, SIGPLAN 21, 7 (1986), pp. 145–151.

    CrossRef  Google Scholar 

  24. P. Pfahler. Optimizing Directly Executable LR Parsers. Compiler Compilers, Third International Workshop, CC’ 90, 1990, pp. 179–192.

    Google Scholar 

  25. F. W. Schroer. The ACCENT Compiler Compiler, Introduction and Reference. GMD Report 101, German National Research Center for Information Technology, June 2000.

    Google Scholar 

  26. 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.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

We’re sorry, something doesn't seem to be working properly.

Please try refreshing the page. If that doesn't work, please contact support so we can address the problem.