Abstract
We show how LR parsers for the analysis of arbitrary context-free grammars can be derived from classical Earley's parsing algorithm. The result is a Generalized LR parsing algorithm working at complexity O(n 3) in the worst case, which is achieved by the use of dynamic programming to represent the non-deterministic evolution of the stack instead of graph-structured stack representations, as has often been the case in previous approaches. The algorithm behaves better in practical cases, achieving linear complexity on LR grammars. Experimental results show the performance of our proposal.
Preview
Unable to display preview. Download preview PDF.
References
Aho, A. V., Ullman,J. D.: The theory of parsing, translation and compiling. Prentice Hall (1972)
Donnelly, C., Stallman, R. M.: BISON reference manual. Free Software Foundation, Inc., 675 Mass Avenue, Cambridge, MA 02139, USA, 1.20 edition (1992)
Earley, J.: An efficient context-free parsing algorithm. Communications of the ACM 13 (1970) 94–102
Heering, J., Hendriks, P. R. H., Klint, P., Rekers, J.: The syntax definition formalism SDF — reference manual. SIGPLAN Notices 24 (1989) 43–75
Lang, B.: Towards a uniform formal framework for parsing. In Tomita, M. (ed.): Current Issues in Parsing Technology. Kluwer Academic Publishers (1991) 153–171
McLean, P., Horspool, R. N.: A faster Earley parser. Proc. of International Conference on Compiler Construction (1996) 281–293
Nederhof, M.-J., Sarbo, J. J.: Increasing the applicability of LR parsing. Proc. of Third International Workshop on Parsing Technologies (1993) 187–201
Pereira, F. C. N., Warren, D. H. D.: Definite Clause Grammars for language analysis — a survey of the formalism and a comparison with Augmented Transition Networks. Artificial Intelligence 13 (1980) 231–278
Rekers, J.: Parsing Generation for Interactive Environments. PhD thesis. University of Amsterdam (1992)
Sheil, B. A.: Observations on context-free grammars. Proc. of Statistical Methods in Linguistics (1976) 71–109
Shieber, S. M., Schabes, Y., Pereira, F. C. N.: Principles and implementation of deductive parsing. Journal of Logic Programming 24 (1995) 3–36
Sikkel, K.: Parsing Schemata — A Framework for Specification and Analysis of Parsing Algorithms. Texts in Theoretical Computer Science — An EATCS Series. Springer-Verlag (1997)
Tomita, M.: Efficient Parsing for Natural Language. Kluwer Academic Publishers (1986)
Vilares Ferro, M., Alonso Pardo, M. A.: An LALR extension for DCGs in dynamic programming. In Martin Vide, C. (ed.): Mathematical Linguistics, vol. II. John Benjamins Publishing Company (to appear)
Vilares Ferro, M., Dion, B. A.: Efficient incremental parsing for context-free languages. Proc. of the 5th IEEE International Conference on Computer Languages (1994) 241–252
Villemonte de la Clergerie, E.: Automates à Piles et Programmation Dynamique. DyALog: Une Application à la Programmation en Logique. PhD thesis. Université Paris 7 (1993)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Alonso, M.A., Cabrero, D., Vilares, M. (1998). Construction of efficient generalized LR parsers. In: Wood, D., Yu, S. (eds) Automata Implementation. WIA 1997. Lecture Notes in Computer Science, vol 1436. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0031377
Download citation
DOI: https://doi.org/10.1007/BFb0031377
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64694-5
Online ISBN: 978-3-540-69104-4
eBook Packages: Springer Book Archive