Abstract
Tomita devised a method of generalized LR (GLR) parsing to parse ambiguous grammars efficiently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary.
Much research has addressed speeding up LR parsers. However, we argue that this previous work is not transferable to GLR parsers. Instead, we speed up LR parsers by building larger pushdown automata, trading space for time. A variant of the GLR algorithm then incorporates our faster LR parsers.
Our timings show that our new method for GLR parsing can parse highly ambiguous grammars significantly faster than a standard GLR parser.
Chapter PDF
Similar content being viewed by others
References
Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading (1986)
Aycock, J.: Faster Tomita Parsing. MSc thesis, University of Victoria (1998)
Bhamidipaty, A., Proebsting, T.A.: Very Fast YACC-Compatible Parsers (For Very Little Effort). Technical Report TR 95-09, Department of Computer Science, University of Arizona (1995)
Eades, P., Lin, X., Smyth, W.F.: A fast and effective heuristic for the feedback arc set problem. Information Processing Letters 47, 319–323 (1993)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, New York (1979)
Grune, D., Jacobs, C.J.H.: Parsing Techniques: A Practical Guide. Ellis Horwood (1990)
Horspool, R.N.: Recursive Ascent-Descent Parsing. Journal of Computer Languages 18(1), 1–16 (1993)
Horspool, R.N., Whitney, M.: Even Faster LR Parsing. Software, Practice and Experience 20(6), 515–535 (1990)
Karp, R.M.: Reducibility Among Combinatorial Problems. In: Miller, R.E., Thatcher, J.W. (eds.) Complexity of Computer Calculations, pp. 85–103. Plenum Press (1972)
Kipps, J.R.: GLR Parsingin Time O(n3). Tomita [24], 43–59
Knuth, D.E.: On the Translation of Languages from Left to Right. Information and Control 8, 607–639 (1965)
Knuth, D.E.: The Art of Computer Programming. Sorting and Searching, vol. 3. Addison-Wesley, Reading (1973)
Kruseman Aretz, F.E.J.: On a Recursive Ascent Parser. Information Processing Letters 29, 201–206 (1988)
Leermakers, R.: Recursive ascent parsing: from Earley to Marcus. Theoretical Computer Science 104, 299–312 (1992)
Lewis, H.R., Papadimitriou, C.H.: Elements of the Theory of Computation. Prentice-Hall, Englewood Cliffs (1981)
Pennello, T.J.: Very Fast LR Parsing. In: Proceedings SIGPLAN 1986 Symposium on Compiler Construction. ACM SIGPLAN Notices, vol. 21(7), pp. 145–151 (1986)
Pfahler, P.: Optimizing Directly Executable LR Parsers. In: Hammer, D. (ed.) CC 1990. LNCS, vol. 477, pp. 179–192. Springer, Heidelberg (1991)
Roberts, G.H.: Recursive Ascent: An LR Analogto Recursive Descent. ACM SIGPLAN Notices 23(8), 23–29 (1988)
Roberts, G.H.: Another Note on Recursive Ascent. Information Processing Letters 32, 263–266 (1989)
Speckenmeyer, E.: On Feedback Problems in Digraphs. Graph-Theoretic Concepts in Computer Science, 218–231. Springer (1989)
Tomita, M.: An Efficient Context-Free Parsing Algorithm for Natural Languages and Its Applications. PhD thesis, Carnegie-Mellon University (1985)
Tomita, M.: Efficient Parsing for Natural Language. Kluwer Academic, Dordrecht (1986)
Tomita, M.: An Efficient Augmented-Context-Free Parsing Algorithm. Computational Linguistics 13(1-2), 31–46 (1987)
Tomita, M. (ed.): Generalized LR Parsing. Kluwer Academic, Dordrecht (1991)
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
Aycock, J., Horspool, N. (1999). Faster Generalized LR Parsing. In: Jähnichen, S. (eds) Compiler Construction. CC 1999. Lecture Notes in Computer Science, vol 1575. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-49051-7_3
Download citation
DOI: https://doi.org/10.1007/978-3-540-49051-7_3
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-65717-0
Online ISBN: 978-3-540-49051-7
eBook Packages: Springer Book Archive