# An iteration theorem for simple precedence languages

## Abstract

We have obtained powerful and reasonably general tools for proving that languages are not simple precedence when that is the case. We have also been able to give a systematic way of producing simple precedence grammars in certain situations.

An extension of the precedence relations between two symbols is obtained by defining precedence relations between strings of length m and n (cf [AU1]). Thus the family of uniquely invertible (m,n) precedence languages is obtained. Our iteration theorem may be generalized to deal with uniquely invertible (1,k) precedence languages, and using it we determine that all the languages proved in the literature to be non-SPL are not uniquely invertible (1,k) precedence for any k ⩾ 1. This is particularly interesting since it is not known if the families of uniquely invertible (1,k) precedence languages form a hierarchy [AU2,S]. (Note that uniquely invertible (2,1) precedence languages coincide with the deterministic languages [G].) Details of this generalization, as well as additional comments, may be found in the full text [KY].

## Keywords

Precedence Relation Counting Scheme Sentential Form Typical Derivation Nonterminal Symbol## Preview

Unable to display preview. Download preview PDF.

## References

- [AU1]A.V. Aho and J.D. Ullman, The theory of parsing, translation and compiling, Prentice-Hall, Vol. I, 1972.Google Scholar
- [AU2]A.V. Aho and J.D. Ullman, The theory of parsing, translation and compiling, Prentice-Hall, Vol. II, 1973.Google Scholar
- [Be]J.C. Beatty, Two iteration theorems for the LL(k) languages, TCS 12 (1980), 193–228.MathSciNetCrossRefGoogle Scholar
- [Bo]L. Boasson, Two iteration theorems for some families of languages, JCSS 7 (1973), 583–596.MathSciNetzbMATHGoogle Scholar
- [BPS]Y. Bar-Hillel, M. Perles and E. Shamir, On formal properties of simple phrase structure grammars, Z. Phonetik Sprachwiss. Kommunikat. 14 (1961), 143–172.MathSciNetzbMATHGoogle Scholar
- [Fi]M.J. Fischer, Some properties of precedence languages, proceedings of 1st STOC, 1969, 181–190.Google Scholar
- [F1]R.W. Floyd, Syntactic analysis and operator precedence, JACM 10 (1963), 316–333.CrossRefGoogle Scholar
- [G]S.L. Graham, Extended precedence languages, bounded right context languages and deterministic languages, IEEE Conf. record of the 11th Annual Symposium on Switching and Automata Theory (1970), 175–180.Google Scholar
- [H]M.A. Harrison, Introduction to formal language theory, Addison-Wesley, 1978.Google Scholar
- [HH]M.A. Harrison and I.M. Havel, On the parsing of deterministic languages, JACM 21 (1974), 525–548.MathSciNetCrossRefGoogle Scholar
- [K]K.N. King, Iteration theorems for families of strict deterministic languages, TCS 10 (1980), 317–333.MathSciNetCrossRefGoogle Scholar
- [KY]Y. Krevner and A. Yehudai, An iteration theorem for simple precedence languages, submitted for publication.Google Scholar
- [O1]W.F. Ogden, Intercalation theorems for pushdown store and stack languages, Ph.D. Thesis, Stanford University, 1968.Google Scholar
- [O2]W.F. Ogden, A helpful result for proving inherent ambiguity, Math. Systems Theory 2 (1968), 191–194.MathSciNetCrossRefGoogle Scholar
- [RSL]D.J. Rosenkrantz, P.M. Lewis III and R.E. Stearns, A simple language which is not a precedence language, unpublished manuscript (1968).Google Scholar
- [S]I.H. Sudborough, private communication, 1979.Google Scholar
- [WW]N. Wirth and H. Weber, Euler-a generalization of ALGOL and its formal definition, part I, CACM 9 (1966), 13–23.CrossRefGoogle Scholar
- [Y]A. Yehudai, A new definition for simple precedence grammars, BIT 19 (1979), 282–284.MathSciNetCrossRefGoogle Scholar