Noncanonical LALR(1) Parsing

  • Sylvain Schmitz
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4036)


This paper addresses the longstanding problem of the recognition limitations of classical LALR(1) parser generators by proposing the usage of noncanonical parsers. To this end, we present a definition of noncanonical LALR(1) parsers, NLALR(1). The class of grammars accepted by NLALR(1) parsers is a proper superclass of the NSLR(1) and LALR(1) grammar classes. Among the recognized languages are some nondeterministic languages. The proposed parsers retain many of the qualities of canonical LALR(1) parsers: they are deterministic, easy to construct, and run in linear time. We argue that they could provide the basis for a range of powerful noncanonical parsers.


Regular Language Sentential Form Valid Item Parser Generator Valid Cover 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Johnson, S.C.: YACC — yet another compiler compiler. Computing science technical report 32, AT&T Bell Laboratories, Murray Hill, New Jersey (1975)Google Scholar
  2. 2.
    Earley, J.: An efficient context-free parsing algorithm. Communications of the ACM 13(2), 94–102 (1970)MATHCrossRefGoogle Scholar
  3. 3.
    Tomita, M.: Efficient Parsing for Natural Language. Kluwer Academic Publishers, Dordrecht (1986)Google Scholar
  4. 4.
    Szymanski, T.G., Williams, J.H.: Noncanonical extensions of bottom-up parsing techniques. SIAM Journal on Computing 5(2), 231–250 (1976)MATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Tai, K.C.: Noncanonical SLR(1) grammars. ACM Transactions on Programming Languages and Systems 1(2), 295–320 (1979)MATHCrossRefGoogle Scholar
  6. 6.
    Charles, P.: A Practical method for Constructing Efficient LALR(k) Parsers with Automatic Error Recovery. PhD thesis, New York University (1991)Google Scholar
  7. 7.
    Čulik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. Journal of Computer and System Sciences 7, 66–96 (1973)MATHMathSciNetCrossRefGoogle Scholar
  8. 8.
    Bermudez, M.E., Schimpf, K.M.: Practical arbitrary lookahead LR parsing. Journal of Computer and System Sciences 41(2), 230–250 (1990)MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Farré, J., Fortes Gálvez, J.: A bounded-connect construction for LR-regular parsers. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 244–258. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  10. 10.
    Farré, J., Fortes Gálvez, J.: Bounded-connect noncanonical discriminating-reverse parsers. Theoretical Computer Science 313(1), 73–91 (2004)MATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    DeRemer, F., Pennello, T.: Efficient computation of LALR(1) look-ahead sets. ACM Transactions on Programming Languages and Systems 4(4), 615–649 (1982)MATHCrossRefGoogle Scholar
  12. 12.
    Schmitz, S.: Noncanonical LALR(1) parsing. Technical Report I3S/RR-2005-21-FR, Laboratoire I3S (2005),
  13. 13.
    Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling. Parsing of Series in Automatic Computation, vol. I. Prentice Hall, Englewood Cliffs (1972)Google Scholar
  14. 14.
    Sippu, S., Soisalon-Soininen, E.: Parsing Theory. LR(k) and LL(k) Parsing of EATCS Monographs on Theoretical Computer Science, vol. II. Springer, Heidelberg (1990)MATHGoogle Scholar
  15. 15.
    Tarjan, R.E.: Depth first search and linear graph algorithms. SIAM Journal on Computing 1(2), 146–160 (1972)MATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Sylvain Schmitz
    • 1
  1. 1.Laboratoire I3SUniversité de NiceSophia AntipolisFrance

Personalised recommendations