Advertisement

A modification of the LR(k) method for constructing compact bottom-up parsers

Extended abstract
  • Esko Ukkonen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 71)

Abstract

A subclass of context-free grammars properly between the PLR(k) and the LR(k) grammars is defined. Grammars in this class, called the weak PLR(k) grammars, generate the LR(k) languages. A construction of a deterministic bottom-up parser for weak PLR(k) grammars is given based on the same collection of sets of LR(k) items as the standard construction of LR(k) parsers. The resulting parsers use the parsing stack in a way which resembles LL(k) parsing and simplifies the optimization of the parser. Finally some optimization methods are described.

Keywords

Left Corner Closed State Parsing Table Nonterminal Symbol Start 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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aho, A.V. and J.D. Ullman: The Theory of Parsing, Translation and Compiling, Vol. I: Parsing. Prentice-Hall, Englewood Cliffs, N.J., 1972.Google Scholar
  2. 2.
    Aho, A.V. and J.D. Ullman: The Theory of Parsing, Translation and Compiling, Vol. II: Compiling. Prentice-Hall, Englewood Cliffs, N.J., 1973.Google Scholar
  3. 3.
    Aho, A.V. and J.D. Ullman: A technique for speeding up LR(k) parsers. SIAM J. Computing 2 (1973), 106–127.Google Scholar
  4. 4.
    Aho, A.V. and J.D. Ullman: Principles of Compiler Design. Addison-Wesley, Reading, Mass., 1977.Google Scholar
  5. 5.
    DeRemer, F.L.: Simple LR(1) grammars. Comm. ACM 14:7 (1971), 435–460.Google Scholar
  6. 6.
    Geller,M.M. and S.L.Graham and M.A.Harrison: Production prefix parsing (extended abstract). In: Automata, Languages and Programming, Second Colloquium (ed. J. Loeckx), Lecture Notes in Computer Science 14, pp. 232–241, Springer-Verlag, 1974.Google Scholar
  7. 7.
    Hammer, M.: A new grammatical transformation into deterministic top-down form. Project MAC Technical Report TR-119, MIT, Mass., 1974.Google Scholar
  8. 8.
    Hammer,M.: A new grammatical transformation into LL(k) form. In: Proc. of Sixth Annual ACM Symposium on Theory of Computing (1974), 266–275.Google Scholar
  9. 9.
    Harrison, M.A. and I.M. Havel: On the parsing of deterministic languages. J. Assoc. Comput. Mach. 21 (1974), 525–548.Google Scholar
  10. 10.
    Knuth, D.E.: On the translation of languages from left to right. Information and Control 8:6 (1965), 607–639.Google Scholar
  11. 11.
    Rosenkrantz,D.J. and P.M.Lewis: Deterministic left corner parsing. In: IEEE Conf. Record of 11th Annual Symp. on Switching and Automata Theory (1970), 139–152.Google Scholar
  12. 12.
    Soisalon-Soininen, E. and E. Ukkonen: A characterization of LL(k) languages. In: Automata, Languages and Programming, Third Colloquium (eds. S. Michaelson, R. Milner), pp. 20–30, Edinburgh University Press, Edinburgh, 1976.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1979

Authors and Affiliations

  • Esko Ukkonen
    • 1
  1. 1.Department of Computer ScienceUniversity of HelsinkiHelsinki 25Finland

Personalised recommendations