Skip to main content

On Parsing and Condensing Substrings of LR Languages in Linear Time

  • Conference paper
  • First Online:
Automata Implementation (WIA 1998)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1660))

Included in the following conference series:

  • 297 Accesses

Abstract

LR parsers have long been known as being an efficient algorithm for recognizing deterministic context-free grammars. In this article, we present a linear—time method for parsing substrings of LR languages. The algorithm depends on the LR automaton that is used for the usual parsing of complete sentences. We prove the correctness and linear complexity of our algorithm and present an interesting extension of our substring parser that allows to condense the input string, which increases the speed when reparsing that string for a second time.

This work is dedicated to my mother.

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. A. V. Aho, J. D. Ullman: The Theory of Parsing, Translation and Compiling. Vol. 1: Parsing. Prentice Hall (1972).

    Google Scholar 

  2. J. Bates, A. Lavie: Recognizing Substrings of LR(k) Languages in Linear Time. ACM Transactions on Programming Languages and Systems 16(3) (1994), 1051–1077.

    Article  Google Scholar 

  3. G. Clarke, D. T. Barnard: An LR Substring Parser Applied in a Parallel Environment. Journal of Parallel and Distributed Computing 35 (1996), 2–17.

    Article  MATH  Google Scholar 

  4. G. V. Cormack: An LR Substring Parser for Noncorrecting Syntax Error Recovery. ACM SIGPLAN 24(7) (1989), 161–169.

    Article  Google Scholar 

  5. H. Richter: Noncorrecting Syntax Error Recovery. ACM Transactions on Programming Languages and Systems 7(3) (1985), 478–489.

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Goeman, H. (1999). On Parsing and Condensing Substrings of LR Languages in Linear Time. In: Champarnaud, JM., Ziadi, D., Maurel, D. (eds) Automata Implementation. WIA 1998. Lecture Notes in Computer Science, vol 1660. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48057-9_3

Download citation

  • DOI: https://doi.org/10.1007/3-540-48057-9_3

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66652-3

  • Online ISBN: 978-3-540-48057-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics