Skip to main content
Log in

Resolution of ambiguity in parsing

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

The use of context-free grammars to define the syntax of programming languages is complicated by the phenomenon of ambiguity. Ambiguity can be resolved by the specification of a unique canonical parse. A set of rules is given which defines a canonical bottom-up parse, and these rules are implemented in a left-to-right bottom-up parsing algorithm. A second set of rules is given which defines a canonical top-down parse, and these rules are similarly implemented in a left-to-right top-down parsing algorithm.

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., Ullman, J. D.: The theory of parsing, translation, and compiling, Vol. 1. Englewood Cliffs (N. J.): Prentice-Hall 1973

    Google Scholar 

  2. Hopcroft, J. E., Ullman, J. D.: Formal languages and their relation to automata. Reading (Mass.): Addison-Wesley 1969

    Google Scholar 

  3. Naur, P. (ed): Revised report on the algorithmic language ALGOL 60. Comm. ACM 8, 1–17 (1963)

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

    Google Scholar 

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

    Google Scholar 

  6. McKeeman, W. M., Horning, J. J., Wortman, D. B.: A compiler generator. Englewood Cliffs (N. J.): Prentice-Hall 1970

    Google Scholar 

  7. Knuth, D. E.: The art of computer programming, Vol.1. Reading (Mass.): Addison-Wesley 1969

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wharton, R.M. Resolution of ambiguity in parsing. Acta Informatica 6, 387–395 (1976). https://doi.org/10.1007/BF00268139

Download citation

  • Received:

  • Issue Date:

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

Keywords

Navigation