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.
Similar content being viewed by others
References
Madsen, O.L., Kristensen, B.B.: LR-Parsing of Extended Context Free Grammars. Acta Informat. 7, 61–73 (1976)
Wirth, N.: The programming language Pascal. Acta Informat. 1, 35–63 (1971)
Wirth, N.: Systematic programming: an introduction. Englewood Cliffs, New Jersey: Prentice-Hall 1973
Heilbrunner, S.: On the definition of ELR(k) and ELL(k) grammars. Acta Informat. 11, 169–176 (1979)
La Londe, W.R.: Constructing LR parsers for regular right part grammars. Acta Informat. 11, 177–193 (1979)
La Londe, W.R.: Regular right part grammars and their parsers. Comm. ACM 20, 731–741 (1977)
Knuth, D.E.: On the translation of languages from left to right, Information and Control 8, 607–639 (1965)
Earley, J.: An efficient context-free parsing algorithtm, Comm. ACM 13, 94–102 (1970)
De Remer, F.L.: Practical translators for LR(k) languages. Ph. D. Thesis, Massachusetts Institute of Technology 1969
Pager, D.: The lange-tracing algorithm for constructing LR(k) parsers and ways of enhancing its efficiency. Information Sci. 12, 19–42 (1977)
Aho, A.V., Ullman, J.D.: A technique for speeding up LR(k) parsers. SIAM J. Comput. 2, 106–127 (1973)
Pager, D.: Eliminating unit productions from LR parsers. Acta Informat. 9, 31–59 (1977)
Purdom, P.: The size of LALR(l) parsers. BIT 14, 326–337 (1974)
Author information
Authors and Affiliations
Rights 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
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF00288959