On LR Parsing with Selective Delays

  • Eberhard Bertsch
  • Mark-Jan Nederhof
  • Sylvain Schmitz
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7791)


The paper investigates an extension of LR parsing that allows the delay of parsing decisions until a sufficient amount of context has been processed. We provide two characterizations for the resulting class of grammars, one based on grammar transformations, the other on the direct construction of a parser. We also report on experiments with a grammar collection.


  1. 1.
    Ancona, M., Dodero, G., Gianuzzi, V., Morgavi, M.: Efficient construction of LR(k) states and tables. ACM Trans. Progr. Lang. Syst. 13(1), 150–178 (1991)CrossRefGoogle Scholar
  2. 2.
    Basten, H.J.S.: The usability of ambiguity detection methods for context-free grammars. In: Electronic Notes in Theoretical Computer Science, LDTA 2008, vol. 238, pp. 35–46. Elsevier (2008)Google Scholar
  3. 3.
    Bermudez, M.E., Schimpf, K.M.: Practical arbitrary lookahead LR parsing. J. Comput. Syst. Sci. 41(2), 230–250 (1990)MathSciNetzbMATHCrossRefGoogle Scholar
  4. 4.
    Bertsch, E., Nederhof, M.J.: Some observations on LR-like parsing with delayed reduction. Inf. Process. Lett. 104(6), 195–199 (2007)MathSciNetzbMATHCrossRefGoogle Scholar
  5. 5.
    Boullier, P.: Contribution à la construction automatique d’analyseurs lexicographiques et syntaxiques. Thèse d’État, Université d’Orléans (1984)Google Scholar
  6. 6.
    Čulik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. J. Comput. Syst. Sci. 7(1), 66–96 (1973)zbMATHCrossRefGoogle Scholar
  7. 7.
    Demers, A.J.: Generalized left corner parsing. In: POPL 1977, pp. 170–182. ACM (1977)Google Scholar
  8. 8.
    Farré, J., Fortes Gálvez, J.: A Bounded Graph-Connect Construction for LR-regular Parsers. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 244–258. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  9. 9.
    Gálvez, J.F., Schmitz, S., Farré, J.: Shift-Resolve Parsing: Simple, Unbounded Lookahead, Linear Time. In: Ibarra, O.H., Yen, H.-C. (eds.) CIAA 2006. LNCS, vol. 4094, pp. 253–264. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Gosling, J., Joy, B., Steele, G.: The JavaTM Language Specification, 1st edn. Addison-Wesley (1996)Google Scholar
  11. 11.
    ISO: ISO/IEC 14882:1998: Programming Languages — C++. International Organization for Standardization, Geneva, Switzerland (1998)Google Scholar
  12. 12.
    Kats, L.C., Visser, E., Wachsmuth, G.: Pure and declarative syntax definition: Paradise lost and regained. In: OOPSLA 2010, pp. 918–932. ACM (2010)Google Scholar
  13. 13.
    Knuth, D.E.: On the translation of languages from left to right. Inform. and Cont. 8(6), 607–639 (1965)MathSciNetCrossRefGoogle Scholar
  14. 14.
    Leermakers, R.: Recursive ascent parsing: from Earley to Marcus. Theor. Comput. Sci. 104(2), 299–312 (1992)MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    Malloy, B.A., Power, J.F., Waldron, J.T.: Applying software engineering techniques to parser design: the development of a C# parser. In: SAICSIT 2002, pp. 75–82. SAICSIT (2002)Google Scholar
  16. 16.
    Marcus, M.P.: A Theory of Syntactic Recognition for Natural Language. Series in Artificial Intelligence. MIT Press (1980)Google Scholar
  17. 17.
    McPeak, S., Necula, G.C.: Elkhound: A Fast, Practical GLR Parser Generator. In: Duesterwald, E. (ed.) CC 2004. LNCS, vol. 2985, pp. 73–88. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  18. 18.
    Mickunas, M.D., Lancaster, R.L., Schneider, V.B.: Transforming LR(k) grammars to LR(1), SLR(1), and (1,1) Bounded Right-Context grammars. J. ACM 23(3), 511–533 (1976)MathSciNetzbMATHCrossRefGoogle Scholar
  19. 19.
    Nijholt, A.: Context-free grammars: Covers, normal forms, and parsing. LNCS, vol. 93. Springer (1980)Google Scholar
  20. 20.
    Parr, T.J., Quong, R.W.: LL and LR translators need k > 1 lookahead. ACM Sigplan. Not. 31(2), 27–34 (1996)CrossRefGoogle Scholar
  21. 21.
    Reeder, J., Steffen, P., Giegerich, R.: Effective ambiguity checking in biosequence analysis. BMC Bioinformatics 6, 153 (2005)CrossRefGoogle Scholar
  22. 22.
    Schmitz, S.: An experimental ambiguity detection tool. Science of Computer Programming 75(1-2), 71–84 (2010)MathSciNetzbMATHCrossRefGoogle Scholar
  23. 23.
    Sippu, S., Soisalon-Soininen, E.: Parsing Theory, vol. II: LR(k) and LL(k) Parsing. EATCS Monographs on Theoretical Computer Science, vol. 20. Springer (1990)Google Scholar
  24. 24.
    Soisalon-Soininen, E., Ukkonen, E.: A method for transforming grammars into LL(k) form. Acta Inf. 12(4), 339–369 (1979)MathSciNetzbMATHCrossRefGoogle Scholar
  25. 25.
    Szymanski, T.G., Williams, J.H.: Noncanonical extensions of bottom-up parsing techniques. SIAM J. Comput. 5(2), 231–250 (1976)MathSciNetzbMATHCrossRefGoogle Scholar
  26. 26.
    Tai, K.C.: Noncanonical SLR(1) grammars. ACM Trans. Progr. Lang. Syst. 1(2), 295–320 (1979)zbMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Eberhard Bertsch
    • 1
  • Mark-Jan Nederhof
    • 2
  • Sylvain Schmitz
    • 3
  1. 1.Faculty of MathematicsRuhr UniversityBochumGermany
  2. 2.School of Computer ScienceUniversity of St. AndrewsUK
  3. 3.LSV, ENS Cachan & CNRSCachanFrance

Personalised recommendations