The paper presents in detail the case for k=1 of a practical general method for constructing LR(k) parsers. For k=1 this method is of rival efficiency to the previous general algorithm described by the author in . The method involves combining the states of an LR(k) parser as they are generated, reducing to a fraction, in the process, the number of configurations that need actually be evaluated, or for which space must be assigned — compared to such general methods as those of [1, 11, 12, 17]. The criteria of compatibility introduced for this purpose are such that the parser obtained is in practice identical in size to, or negligibly larger than, that obtained by resolving the inadequacies of an LR(o) parser (as is done for various subsets of the LR(k) grammars in [5, 8, 14, 20]).
This is a preview of subscription content, log in to check access.
Buy single article
Instant access to the full article PDF.
Price includes VAT for USA
Subscribe to journal
Immediate online access to all issues from 2019. Subscription will auto renew annually.
This is the net price. Taxes to be calculated in checkout.
Aho, A. V., Ullman, J. D.: Optimization of LR(k) parsers. J. Computer and System Sciences 6, 573–602 (1972)
Aho, A. V., Ullman, J. D.: A technique for speeding up LR(k) parsers. SIAM J. Computing 2, 106–127 (1973)
Aho, A. V., Ullman, J. D.: The theory of parsing, translation, and compiling. Englewood Cliffs (N.J.): Prentice-Hall 1973
Aho, A. V., Johnson, S. C., Ullman, J. D.: Deterministic parsing of ambiguous grammars. Proc. ACM Symposium on Principles of Programming Languages, Boston, Mass., Oct. 1973
Anderson, T., Eve, J., Horning, J. J.: Efficient LR(1) parsers. Acta Informatica 2, 12–39 (1973)
Booth, T. L.: Sequential machines and automata theory. New York: Wiley 1967
DeRemer, F. L.: Practical translators for LR(k) languages. Mass. Inst. of Tech., Cambridge (Mass.), Project MAC, Tech. Rep. MAC TR-65, Oct. 1969
DeRemer, F. L.: Simple LR(k) grammars. Comm. ACM 14, 453–460 (1971)
Ginsburg, S.: An introduction to mathematical machine theory. Reading (Mass.): Addison-Wesley 1962
Hayashi, K.: On the construction of LR(k) parsers. Proc. ACM 1971 Annual Conf., ACM, New York, pp. 538–553
Joliat, M. L.: On the reduced matrix representation of LR(k) parser tables. Computer Systems Research Group, University of Toronto, Tech. Report CSRG-28, Oct. 1973
Knuth, D. E.: On the translation of languages from left to right. Information and Control 8, 607–639 (1965)
Korenjak, A. J.: A practical method for constructing LR(k) processors. Comm. ACM 12, 613–623 (1969)
LaLonde, W. R.: An efficient LALR parser generator. Computer Systems Research Group, University of Toronto, Tech. Report CSRG-2, 1971
McKeeman, W. M., Horning, J. J., Wortman, D. B.: A compiler generator. Englewood Cliffs (N.J.): Prentice-Hall 1970
Pager, D.: Some ideas for left-to-right parsing. University of Hawaii, Information Sciences Program, Tech. Report No. PE 84, Oct. 1970
Pager, D.: A solution to an open problem by Knuth. Information and Control 17, 462–473 (1970)
Pager, D.: Conditions for the existence of minimal closed covers composed of maximal compatibles. IEEE Trans. Computers C-20, 450–452 (1971)
Pager, D.: Efficient programming techniques for LR(k) parsing. Proc. Seventh Annual Princeton Conf. on Information Sciences and Systems, Princeton University, Princeton, 1973; University of Hawaii, Information Sciences Program, Tech. Report No. PE 236, Jan. 1972
Pager, D.: On the incremental approach to left-to-right parsing. University of Hawaii, Information Sciences Program, Tech. Report No. PE 238, Jan. 1972
Pager, D.: The lane tracing algorithm for constructing LR(k) parsers and ways of enhancing its efficiency. Information Sciences (to appear)
Pager, D.: On eliminating unit productions from LR(k) parsers. In: Loeckx, J. (ed.), Automata, languages, and programming, 2nd Colloquium. Lecture Notes in Computer Science 14. Berlin-Heidelberg-New York: Springer 1974
Pager, D.: A compaction algorithm for combining the symbol-action lists of an LR(k) parser. University of Hawaii, Information Sciences Program, Tech. Report No. PE 259, July 1972
Pager, D.: On the decremental approach to left-to-right parsing. University of Hawaii, Information Sciences Program, Tech. Report No. PE 252, July 1972
This paper is a development of one of the ideas proposed in Pager . The work was supported by the National Science Foundation under Grant GJ-43362.
About this article
Cite this article
Pager, D. A practical general method for constructing LR(k) parsers. Acta Informatica 7, 249–268 (1977). https://doi.org/10.1007/BF00290336
- Information System
- Operating System
- Data Structure
- Communication Network
- Information Theory