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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A. V. Aho, J. D. Ullman: The Theory of Parsing, Translation and Compiling. Vol. 1: Parsing. Prentice Hall (1972).
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.
G. Clarke, D. T. Barnard: An LR Substring Parser Applied in a Parallel Environment. Journal of Parallel and Distributed Computing 35 (1996), 2–17.
G. V. Cormack: An LR Substring Parser for Noncorrecting Syntax Error Recovery. ACM SIGPLAN 24(7) (1989), 161–169.
H. Richter: Noncorrecting Syntax Error Recovery. ACM Transactions on Programming Languages and Systems 7(3) (1985), 478–489.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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