Summary
This paper presents a new approach to the design and the proof of bypassed LR(k) parsers; a bypassed LR(k) parser is an LR(k) parser which does not perform any reductions caused by insignificant unit productions. We show that bypassed LR(k) parsers having minimum set of reduction contexts always exist for Knuth LR(k) parsers, but do not necessarily exist for SLR(k) and LALR(k) parsers. As byproducts of our approach, we naturally derive Anderson, Eve and Homing's algorithm [5] and a sufficient condition for the existence of bypassed SLR(1) parsers.
Similar content being viewed by others
References
Aho, A.V., Ullman, J.D.: The theory of parsing, translation, and compiling, Vol. 1–2. Englewood Cliffs N.J.: Prentice-Hall 1972, 1973
Aho, A.V., Ullman, J.D.: A technique for speeding up LR(k) parsers. SIAM J. Comput. 2, 106–127 (1973)
Aho, A.V., Ullman, J.D.: Principle of compiler design. Reading Mass.: Prentice-Hall 1977
Anderson, T.: Syntactic analysis of LR(k) languages. Ph. D. Thesis, Univ. of Newcastle upon Tyne, Computing Lab. 1972
Anderson, T., Eve, J., Horning, J.J.: Efficient LR(1) parsers. Acta Informat. 2, 12–39 (1973)
Backhouse, R.C.: An alternative approach to the improvement of LR(k) parsers. Acta Informat. 6, 277–296 (1976)
Demers, A.J.: Skeletal LR parsing. Proc. 15th IEEE Symposium on Switching and Automata Theory, 185–198 (1974)
Demers, A.J.: Elimination of single productions and merging nonterminal symbols of LR(1) grammars. Comput. Lang. 1, 105–119 (1975)
DeRemer, F.L.: Practical translators for LR(k) languages. Mass. Inst. of Tech., Cambridge (Mass.), Project MAC, Tech. Report MAC TR-65, 1969
DeRemer, F.L.: Simple LR(k) grammars. Comm. ACM 14, 453–460 (1971)
DeRemer, F.L., Pennello, J.J.: Efficient computation of LALR(1) look-ahead sets. Proc. ACM Symposium on Compiler Construction, 176–87 (1979)
Joliat, M.L.: A simple technique for partial elimination of unit productions from LR(k) parsers. IEEE Trans. Computers C-25, 763–764 1976)
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)
Koskimies, K., Soisalon-Soininen, E.: On a method for optimizing LR parsers. Internat. J. Comput. Math. 7, 287–295 (1979)
LaLonde, W.R.: An efficient LALR parser generator. Computer Systems Research Group, University of Toronto, Toronto, Tech. Report CSRG-2, 1971
LaLonde, W.R., Lee, E.S., Horning, J.J.: An LALR(k) parser generator, Proc. IFIP Congress 1971, Ljubljana, pp. 151–153, Amsterdam: North Holland, 1971
LaLonde, W.R.: On directly constructing LR(k) parsers without chain reductions. Proc. 3rd ACM Symposium on Principles of programming languages, pp. 127–133 (1976)
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 Vol. 14. Berlin-Heidelberg-New York: Springer 1974
Pager, D.: A practical general method for constructing LR(k) parsers. Acta Informat. 7, 249–268 (1977)
Pager, D.: Eliminating unit productions from LR parsers. Acta Informat. 9, 31–59 (1977)
Rushby, J.M.: LR(k) sparse-parsers and their optimization. Ph. D. Thesis, Univ. of Newcastle upon Tyne, Computing Lab. 1977
Soisalon-Soininen, E.: Elimination of single productions from LR parsers in conjunction with the use of default reductions. Proc. 4th ACM Symposium on Principles of Programming Languages, pp. 183–193 (1977)
Soisalon-Soininen, E.: On the space optimizing effect of eliminating single productions from LR parsers. Acta Informat. 14, 157–174 (1980)
Tokuda, T.: Eliminating unit reductions from LR(k) parsers using minimum contexts. Tokyo Inst. of Tech., Tokyo, Res. Report C-16, (1978) (Revised version C-29, 1980)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Tokuda, T. Eliminating unit reductions from LR(k) parsers using minimum contexts. Acta Informatica 15, 447–470 (1981). https://doi.org/10.1007/BF00264538
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264538