Skip to main content
Log in

Disambiguating grammars by exclusion of sub-parse trees

  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

A method is presented for disambiguation of grammars, based on the idea of excluding certain forbidden sub-parse trees. Combined with recent developments in the theory of parser generation for ambiguous grammars, the method disambiguates large classes of grammars guaranteeing that the generated language is unchanged.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aho, A.V., Johnson, S.C, Ullman, J.D.: Deterministic parsing of ambiguous grammars. Comm. ACM 18, 8 (1975), 441–452.

    Article  MATH  MathSciNet  Google Scholar 

  2. Aho, A.V., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass., 1986.

    Google Scholar 

  3. Aho, A.V., Ullman, J.D.: A technique for speeding up LR(k) parsers. SIAM J. Computing 2, 2 (1973), 106–127.

    Article  MATH  Google Scholar 

  4. Anderson, T., Eve, J., Horning, J.J.: Efficient LR(1) parsers. Acta Informatica 2, 1 (1973), 12–39.

    Article  MATH  MathSciNet  Google Scholar 

  5. Billot, S., Lang, B.: The structure of shared forests in ambiguous parsing. In Proceedings of the 27th Annual Meeting of the Association for Computational Linguistics. Vancouver, 1989, pp. 143–151.

  6. Blikle, A.: Denotational engineering. Science of Computer Programming 12 (1989), 207–253.

    Article  MATH  MathSciNet  Google Scholar 

  7. Blikle, A., Tarlecki, A., Thorup, M.: On conservative extensions of syntax in system development, Theor. Comp. Sci. 90, 1 (1991), 209–233.

    MATH  MathSciNet  Google Scholar 

  8. DeRemer, F., Pennello, T.: Efficient computation of LALR(l) look-ahead sets. ACM Trans. Progr. Lang. Syst. 4, 4 (1982), 615–649.

    Article  MATH  Google Scholar 

  9. Garey, M.R., Johnson, S.J.: Computers and intractability: a guide to the theory of NP-Completeness. W.H. Freeman and Company, New York, 1979.

    MATH  Google Scholar 

  10. Graham, S.L., Harrison, M.A., Ruzzo, W.L.: An Improved Context-Free Recognizer. ACM Trans. Progr. Lang. Syst. 2, 3 (1980), 415–62.

    Article  MATH  Google Scholar 

  11. Irons, E.T.: A syntax directed compiler for Algol 60. Comm. ACM 4, 1 (1961), 51–55.

    Article  MATH  Google Scholar 

  12. Kernighan, B.W., Cherry, J.B.: A system for typesetting mathematics. Comm. ACM 18, 3 (1975), 151–157.

    Article  Google Scholar 

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

    Article  MathSciNet  Google Scholar 

  14. Maddox, W.: Personal Communication, 1993.

  15. McNaughton, R.: Parenthesis grammars. J. ACM 14 (1967), 490–500.

    Article  MATH  MathSciNet  Google Scholar 

  16. Pager, D.: Eliminating unit productions from LR(k) parsers. Acta Informatica 9 (1977), 31–59.

    Article  MATH  MathSciNet  Google Scholar 

  17. Sippu, S., Soisalon-Soininen, E.: Parsing Theory, Vol 1: Languages an Parsing; EATCS Monographs on Theoretical Computer Science 15. Springer-Verlag, Berlin, London, 1988.

    Google Scholar 

  18. Sippu, S., Soisalon-Soininen, E.: Parsing Theory, Vol 2: LR(k) and LL(k) Parsing; EATCS Monographs on Theoretical Computer Science 20. Springer-Verlag, Berlin, London, 1990.

    Google Scholar 

  19. Soisalon-Soininen, E.: On the space optimizing effect of eliminating single productions from LR parsers. Acta Informatica 14 (1980), 157–174.

    Article  MATH  MathSciNet  Google Scholar 

  20. Soisalon-Soininen, E., Ukkonen, E.: A method for transforming grammars into LL(k) form. Acta Informatica 12 (1979), 339–369.

    Article  MATH  MathSciNet  Google Scholar 

  21. Stockmeyer, L.J.: The set basis problem is NP-complete. Report RC-5431, IBM Research Center, Yorktown Heights, NY, 1975.

    Google Scholar 

  22. Thorup, M.: Ambiguity for incremental parsing and evaluation. Technical Report PRG-TR-24-92, Programming Research Group of Oxford University, Oxford, 1992.

    Google Scholar 

  23. Thorup, M.: Controlled grammatic ambiguity. ACM Trans. Progr. Lang. Syst. 16, 3 (1994) 1024–1050.

    Article  Google Scholar 

  24. Tomita, M.: Efficient Parsing for Natural Language: A Fast Algorithm for Practical Systems. Kluwer Academic Publishers, 1986.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mikkel Thorup.

Additional information

Most of the research was done whilst the author was at Oxford University supported by the Danish Technical Research Council.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Thorup, M. Disambiguating grammars by exclusion of sub-parse trees. Acta Informatica 33, 511–522 (1996). https://doi.org/10.1007/BF03036460

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03036460

Keywords

Navigation