Abstract
A new approach to parse context-free grammars is presented. It relies on discriminating-reverse, DR(k), parsers, with a Tomita-like nondeterminism-controlling graph-structured stack (GSS) algorithm.
The advantage of this generalized discriminating-reverse (GDR) approach over GLR lies on the possibility of using DR(k) parsers, which combine full LR(k) parsing power with a small number of states even for k > 1.
This can greatly reduce nondeterminism originating from limited parsing power, as it is typical of the restricted direct LR parsers (SLR, LALR) commonly used in Tomita’s algorithm.
Furthermore, relying on a DR parser allows a GSS that associates nodes to symbols instead of direct-LR states, and makes easier computation of the shared forest.
Moreover, DR(k) parsers have been shown to be linear for LR(k) gram- mars, and the DR(k) parser efficiency has been practically found to be very similar to direct LR(k) parsers.
The paper first presents the nondeterministic DR(k) generation algo- rithm (for non-LR(k) grammars). Then, it discusses the corresponding adaptation of the GSS algorithm and shows how the shared forest com- putation is naturally handled.
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
J. Farré. Discriminating-reverse LR parsing of context-free grammars. In J. Carroll, editor, Proceedings of the Sixth International Workshop on Parsing Technologies, IWPT 2000, pages 303–304, Trento, Italy, 2000. ITC-irst.
J. Farré and J. Fortes Gálvez. A basis for looping extensions to discriminatingreverse parsing. In M. Daley, M. G. Eramian, and S. Yu, editors, 5th International Conference on Implementation and Applications of Automata, CIAA 2000, to appear in Lecture Notes in Computer Science. Springer-Verlag, 2000.
J. Fortes Gálvez. Generating LR(1) parsers of small size. In Compiler Construction. 4th Internatinal Conference, CC’92, Lecture Notes in Computer Science #641, pages 16–29. Springer-Verlag, 1992.
J. Fortes Gálvez. Experimental results on discriminating-reverse LR(1) parsing. In P. Fritzson, editor, Proceedings of the Poster Session of CC’94-International Conference on Compiler Construction, pages 71–80. Department of Computer and Information Science, Linköping University, Mar. 1994. Research report LiTH-IDAR-94–11.
J. Fortes Gálvez. A practical small LR parser with action decision through minimal stack suffix scanning. In J. Dassow, editor, Developments in Language Theory II: at the Crossroads ot Mathematics, Computer Science and Biology, Singapore, 1996. World Scientific. Proceedings of Conference, Magdeburg, Germany 17–21 July 1995.
J. Fortes Gálvez. A Discriminating Reverse Approach to LR(k) Parsing. PhD thesis, Universidad de Las Palmas de Gran Canaria and Université de Nice-Sophia Antipolis, 1998.
J. Fortes Gálvez and J. Farré. Towards a discriminating-reverse Tomita-like parser with reduced nondeterminism. Procesamiento del Lenguaje Natural, 24:111–118, Sept. 2000.
J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979.
D. E. Knuth. On the translation of languages from left to right. Information and Control, 8(6):607–639, 1965.
S. Mateo González. Efficiencia de implementación del método LR inverso. Computing undergraduate thesis, University of Las Palmas de Gran Canaria, Spain, Sept. 2000. In Spanish.
M. J. Nederhof and J. J. Sarbo. Increasing the applicability of LR parsing. In H. Bunt and M. Tomita, editors, Recent Advances in Parsing Technology, pages 35–57. Kluwer Academic Publishers, Boston, 1996.
R. Nozohoor-Farshi. Handling of ill-designed grammars in Tomita’s parsing algorithm. In International Workshop on Parsing Technologies, pages 182–192, 1989.
S. Sippu and E. Soisalon-Soininen. Parsing Theory. Springer-Verlag, 1988–1990.
M. Tomita. Efficient Parsing for Natural Language. wer Academic Publishers, Boston, 1986.
M. Tomita. The generalized parsing algorithm. In M. Tomita, itor, Generalized LR Parsing, pages 1–16. Kluwer Academic Publishers, Boston, 1991.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2001 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fortes Gálvez, J., Farré, J., Pérez Aguiar, M.Á. (2001). Practical Nondeterministic DR(k) Parsing on Graph-Structured Stack. In: Gelbukh, A. (eds) Computational Linguistics and Intelligent Text Processing. CICLing 2001. Lecture Notes in Computer Science, vol 2004. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44686-9_40
Download citation
DOI: https://doi.org/10.1007/3-540-44686-9_40
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41687-6
Online ISBN: 978-3-540-44686-6
eBook Packages: Springer Book Archive