Skip to main content

Practical Nondeterministic DR(k) Parsing on Graph-Structured Stack

  • Conference paper
  • First Online:
Computational Linguistics and Intelligent Text Processing (CICLing 2001)

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.

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. 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.

    Google Scholar 

  2. 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.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, 1979.

    Google Scholar 

  9. D. E. Knuth. On the translation of languages from left to right. Information and Control, 8(6):607–639, 1965.

    Article  MathSciNet  Google Scholar 

  10. 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.

    Google Scholar 

  11. 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.

    Chapter  Google Scholar 

  12. R. Nozohoor-Farshi. Handling of ill-designed grammars in Tomita’s parsing algorithm. In International Workshop on Parsing Technologies, pages 182–192, 1989.

    Google Scholar 

  13. S. Sippu and E. Soisalon-Soininen. Parsing Theory. Springer-Verlag, 1988–1990.

    Google Scholar 

  14. M. Tomita. Efficient Parsing for Natural Language. wer Academic Publishers, Boston, 1986.

    Book  Google Scholar 

  15. M. Tomita. The generalized parsing algorithm. In M. Tomita, itor, Generalized LR Parsing, pages 1–16. Kluwer Academic Publishers, Boston, 1991.

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics