Skip to main content
Log in

Parsing extended LR(k) grammars

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

An extended LR(k) (ELR(k)) grammar is a context free grammar in which the right sides of the productions are regular expressions and which can be parsed from left to right with k symbol look-ahead. We present a practical algorithm for producing small fast parsers directly from certain ELR(k) grammars, and an algorithm for converting the remaining ELR(k) grammars into a form that can be processed by the first algorithm. This method, when combined with previously developed methods for improving the efficiency of LR(k) parsers, usually produces parsers that are significantly smaller and faster than those produced by previous LR(k) and ELR(k) algorithms.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Madsen, O.L., Kristensen, B.B.: LR-Parsing of Extended Context Free Grammars. Acta Informat. 7, 61–73 (1976)

    Google Scholar 

  2. Wirth, N.: The programming language Pascal. Acta Informat. 1, 35–63 (1971)

    Google Scholar 

  3. Wirth, N.: Systematic programming: an introduction. Englewood Cliffs, New Jersey: Prentice-Hall 1973

    Google Scholar 

  4. Heilbrunner, S.: On the definition of ELR(k) and ELL(k) grammars. Acta Informat. 11, 169–176 (1979)

    Google Scholar 

  5. La Londe, W.R.: Constructing LR parsers for regular right part grammars. Acta Informat. 11, 177–193 (1979)

    Google Scholar 

  6. La Londe, W.R.: Regular right part grammars and their parsers. Comm. ACM 20, 731–741 (1977)

    Google Scholar 

  7. Knuth, D.E.: On the translation of languages from left to right, Information and Control 8, 607–639 (1965)

    Google Scholar 

  8. Earley, J.: An efficient context-free parsing algorithtm, Comm. ACM 13, 94–102 (1970)

    Google Scholar 

  9. De Remer, F.L.: Practical translators for LR(k) languages. Ph. D. Thesis, Massachusetts Institute of Technology 1969

  10. Pager, D.: The lange-tracing algorithm for constructing LR(k) parsers and ways of enhancing its efficiency. Information Sci. 12, 19–42 (1977)

    Google Scholar 

  11. Aho, A.V., Ullman, J.D.: A technique for speeding up LR(k) parsers. SIAM J. Comput. 2, 106–127 (1973)

    Google Scholar 

  12. Pager, D.: Eliminating unit productions from LR parsers. Acta Informat. 9, 31–59 (1977)

    Google Scholar 

  13. Purdom, P.: The size of LALR(l) parsers. BIT 14, 326–337 (1974)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Purdom, P.W., Brown, C.A. Parsing extended LR(k) grammars. Acta Informatica 15, 115–127 (1981). https://doi.org/10.1007/BF00288959

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00288959

Keywords

Navigation