Skip to main content

Shift-Resolve Parsing: Simple, Unbounded Lookahead, Linear Time

  • Conference paper
Implementation and Application of Automata (CIAA 2006)

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

Included in the following conference series:

Abstract

This paper introduces a mechanism for combining unbounded lookahead exploration with linear time complexity in a deterministic parser. The idea is to use a resolve parsing action in place of the classical reduce. The construction of shift-resolve parsers is presented as a two-step algorithm, from the grammar to a finite nondeterministic automaton, and from this automaton to the deterministic parser. Grammar classes comparisons are provided.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Donnely, C., Stallman, R.: Bison, The YACC-compatible Parser Generator. The Free Software Foundation (2002)

    Google Scholar 

  2. Baker, T.P.: Extending lookahead for LR parsers. Journal of Computer and System Sciences 22(2), 243–259 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  3. Bermudez, M.E., Schimpf, K.M.: Practical arbitrary lookahead LR parsing. Journal of Computer and System Sciences 41(2), 230–250 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  4. 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)

    Chapter  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

  6. Tai, K.C.: Noncanonical SLR(1) grammars. ACM Transactions on Programming Languages and Systems 1(2), 295–320 (1979)

    Article  MATH  Google Scholar 

  7. Schmitz, S.: Noncanonical LALR(1) parsing. In: Dang, Z., Ibarra, O.H. (eds.) DLT 2006. LNCS, vol. 4036, pp. 95–107. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  8. 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 

  9. Tomita, M.: Efficient Parsing for Natural Language. Kluwer Academic Publishers, Dordrecht (1986)

    Google Scholar 

  10. Čulik, K., Cohen, R.: LR-Regular grammars—an extension of LR(k) grammars. Journal of Computer and System Sciences 7, 66–96 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  11. Farré, J., Fortes Gálvez, J.: Bounded-connect noncanonical discriminating-reverse parsers. Theoretical Computer Science 313(1), 73–91 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  12. Fortes Gálvez, J.: A Discriminating Reverse Approach to LR(k) Parsing. PhD thesis, Universidad de Las Palmas de Gran Canaria and Université de Nice-Sophia Antipolis (1998)

    Google Scholar 

  13. Grune, D., Jacobs, C.J.H.: Parsing Techniques: A Practical Guide. Ellis Horwood Limited (1990)

    Google Scholar 

  14. Hunt III, H.B., Szymanski, T.G., Ullman, J.D.: On the complexity of LR(k) testing. Communications of the ACM 18(12), 707–716 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  15. Heilbrunner, S.: A parsing automata approach to LR theory. Theoretical Computer Science 15(2), 117–157 (1981)

    Article  MATH  MathSciNet  Google Scholar 

  16. Schöbel-Theuer, T.: Towards a unifying theory of context-free parsing. In: Pighizzini, G., San Pietro, P. (eds.) Proceedings ASMICS Workshop on Parsing Theory. Technical Report 126-1994, Università di Milano, pp. 89–100 (1994)

    Google Scholar 

  17. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL 1977, pp. 238–252. ACM Press, New York (1977)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gálvez, J.F., Schmitz, S., Farré, J. (2006). Shift-Resolve Parsing: Simple, Unbounded Lookahead, Linear Time. In: Ibarra, O.H., Yen, HC. (eds) Implementation and Application of Automata. CIAA 2006. Lecture Notes in Computer Science, vol 4094. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11812128_24

Download citation

  • DOI: https://doi.org/10.1007/11812128_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-37213-4

  • Online ISBN: 978-3-540-37214-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics