Skip to main content

On LR Parsing with Selective Delays

  • Conference paper
  • 1307 Accesses

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 7791)

Abstract

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.

References

  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)

    CrossRef  Google Scholar 

  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. Bermudez, M.E., Schimpf, K.M.: Practical arbitrary lookahead LR parsing. J. Comput. Syst. Sci. 41(2), 230–250 (1990)

    MathSciNet  MATH  CrossRef  Google Scholar 

  4. Bertsch, E., Nederhof, M.J.: Some observations on LR-like parsing with delayed reduction. Inf. Process. Lett. 104(6), 195–199 (2007)

    MathSciNet  MATH  CrossRef  Google Scholar 

  5. Boullier, P.: Contribution à la construction automatique d’analyseurs lexicographiques et syntaxiques. Thèse d’État, Université d’Orléans (1984)

    Google Scholar 

  6. Čulik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. J. Comput. Syst. Sci. 7(1), 66–96 (1973)

    MATH  CrossRef  Google Scholar 

  7. Demers, A.J.: Generalized left corner parsing. In: POPL 1977, pp. 170–182. ACM (1977)

    Google Scholar 

  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)

    CrossRef  Google Scholar 

  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)

    CrossRef  Google Scholar 

  10. Gosling, J., Joy, B., Steele, G.: The JavaTM Language Specification, 1st edn. Addison-Wesley (1996)

    Google Scholar 

  11. ISO: ISO/IEC 14882:1998: Programming Languages — C++. International Organization for Standardization, Geneva, Switzerland (1998)

    Google Scholar 

  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. Knuth, D.E.: On the translation of languages from left to right. Inform. and Cont. 8(6), 607–639 (1965)

    MathSciNet  CrossRef  Google Scholar 

  14. Leermakers, R.: Recursive ascent parsing: from Earley to Marcus. Theor. Comput. Sci. 104(2), 299–312 (1992)

    MathSciNet  MATH  CrossRef  Google Scholar 

  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. Marcus, M.P.: A Theory of Syntactic Recognition for Natural Language. Series in Artificial Intelligence. MIT Press (1980)

    Google Scholar 

  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)

    CrossRef  Google Scholar 

  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)

    MathSciNet  MATH  CrossRef  Google Scholar 

  19. Nijholt, A.: Context-free grammars: Covers, normal forms, and parsing. LNCS, vol. 93. Springer (1980)

    Google Scholar 

  20. Parr, T.J., Quong, R.W.: LL and LR translators need k > 1 lookahead. ACM Sigplan. Not. 31(2), 27–34 (1996)

    CrossRef  Google Scholar 

  21. Reeder, J., Steffen, P., Giegerich, R.: Effective ambiguity checking in biosequence analysis. BMC Bioinformatics 6, 153 (2005)

    CrossRef  Google Scholar 

  22. Schmitz, S.: An experimental ambiguity detection tool. Science of Computer Programming 75(1-2), 71–84 (2010)

    MathSciNet  MATH  CrossRef  Google Scholar 

  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. Soisalon-Soininen, E., Ukkonen, E.: A method for transforming grammars into LL(k) form. Acta Inf. 12(4), 339–369 (1979)

    MathSciNet  MATH  CrossRef  Google Scholar 

  25. Szymanski, T.G., Williams, J.H.: Noncanonical extensions of bottom-up parsing techniques. SIAM J. Comput. 5(2), 231–250 (1976)

    MathSciNet  MATH  CrossRef  Google Scholar 

  26. Tai, K.C.: Noncanonical SLR(1) grammars. ACM Trans. Progr. Lang. Syst. 1(2), 295–320 (1979)

    MATH  CrossRef  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bertsch, E., Nederhof, MJ., Schmitz, S. (2013). On LR Parsing with Selective Delays. In: Jhala, R., De Bosschere, K. (eds) Compiler Construction. CC 2013. Lecture Notes in Computer Science, vol 7791. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37051-9_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-37051-9_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-37050-2

  • Online ISBN: 978-3-642-37051-9

  • eBook Packages: Computer ScienceComputer Science (R0)