Advertisement

On constructing LL(k) parsers

Extended abstract
  • Seppo Sippu
  • Eljas Soisalon-Soininen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 71)

Abstract

A method for constructing canonical LL(k) parsers for context-free grammars is presented. This method can be regarded as a dual of the well-known LR(k) parser construction technique involving so-called LR(k) items and viable prefixes. The counterparts of LR(k) items and viable prefixes are called LL(k) items and viable suffixes, respectively. Modifications of the basic method give rise to subclasses of the canonical LL(k) grammars corresponding to the LALR(k) and SLR(k) grammars. The duals of LALR(k) grammars are called LALL(k) grammars and they form a proper subclass of the canonical LL(k) grammars when k>1. The duals of SLR(k) grammars, called SLL(k) grammars, in turn coincide with the so-called strong LL(k) grammars and form a proper subclass of the LALL(k) grammars when k>1.

Keywords

Equivalence Class Shift Action General String Formal Language Theory Wesley Publishing 
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. Englewood Cliffs, N.J.: Prentice-Hall, 1972.Google Scholar
  2. 2.
    Aho, A.V., and J.D. Ullman, Principles of Compiler Design. Reading, Mass.: Addison-Wesley Publishing Co., 1977.Google Scholar
  3. 3.
    Anderson,T., Syntactic Analysis of LR(k) Languages, Ph.D. Thesis, Computing Lab., University of Newcastle upon Tyne, 1972.Google Scholar
  4. 4.
    DeRemer,F.L., Practical Translators for LR(k) Languages, Ph.D. Thesis and Project MAC Technical Report TR-65, Mass. Inst. of Tech., 1969.Google Scholar
  5. 5.
    DeRemer, F.L., Simple LR(k) Grammars, Comm. ACM 14, 453–460, 1971.Google Scholar
  6. 6.
    Fischer,C.N., D.R.Milton and S.B.Quiring, An Efficient Insertion Only Error-Corrector for LL(1) Parsers, in Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, 97–103, 1977.Google Scholar
  7. 7.
    Ghezzi, C., LL(l) Grammars Supporting an Efficient Error Handling, Information Processing Letters 3, 174–176, 1975.Google Scholar
  8. 8.
    Harrison, M.A., Introduction to Formal Language Theory. Reading, Mass.: Addison-Wesley Publishing Co., 1978.Google Scholar
  9. 9.
    Knuth, D.E., On the Translation of Languages from Left to Right, Information and Control 8, 607–639, 1965.Google Scholar
  10. 10.
    LaLonde,W.R., On Directly Constructing LA(k)LR(m) Parsers without Chain Productions, Technical Report No. SE & CS 76-9, Department of Systems Engineering and Computing Science, Carleton University, 1976.Google Scholar
  11. 11.
    Rosenkrantz, D.J., and R.E. Stearns, Properties of Deterministic Top-Down Grammars, Information and Control 17, 226–256, 1970.Google Scholar
  12. 12.
    Wood,D., Lecture Notes on Top-Down Syntax Analysis, Computer Science Technical Report 78-CS-12, Department of Applied Mathematics, McMaster University, 1978.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1979

Authors and Affiliations

  • Seppo Sippu
    • 1
  • Eljas Soisalon-Soininen
    • 1
  1. 1.Department of Computer ScienceUniversity of HelsinkiHelsinki 25Finland

Personalised recommendations