Acta Informatica

, Volume 4, Issue 2, pp 183–192

Ambiguity and precedence in syntax description

  • Jay Earley

DOI: 10.1007/BF00288747

Cite this article as:
Earley, J. Acta Informatica (1975) 4: 183. doi:10.1007/BF00288747


This paper describes a method of syntax description for programming languages which allows one to factor out that part of the description which deals with the relative precedences of syntactic units. This has been found to produce simpler and more flexible syntax descriptions. It is done by allowing the normal part of the description, which is done in BNF, to be ambiguous; these ambiguities are then resolved by a separate part of the description which gives precedence relations between the conflicting productions from the grammar. The method can be used with any left-to-right parser which is capable of detecting ambiguities and recognizing which productions they come from; We have studied its use with an LR(1) parser, and it requires a small and localized addition to the parser to enable it to deal with the precedence relations.

Copyright information

© Springer-Verlag 1975

Authors and Affiliations

  • Jay Earley
    • 1
  1. 1.College of Engineering Computer Science DivisionUniversity of CaliforniaBerkeleyUSA

Personalised recommendations