scispace - formally typeset
Open AccessJournal ArticleDOI

On the translation of languages from left to right

Donald E. Knuth
- 01 Dec 1965 - 
- Vol. 8, Iss: 6, pp 607-639
TLDR
LR(k) grammars are defined, which are perhaps the most general ones of this type, and they provide the basis for understanding all of the special tricks which have been used in the construction of parsing algorithms for languages with simple structure, e.g. algebraic languages.
Abstract
There has been much recent interest in languages whose grammar is sufficiently simple that an efficient left-to-right parsing algorithm can be mechanically produced from the grammar. In this paper, we define LR(k) grammars, which are perhaps the most general ones of this type, and they provide the basis for understanding all of the special tricks which have been used in the construction of parsing algorithms for languages with simple structure, e.g. algebraic languages. We give algorithms for deciding if a given grammar satisfies the LR(k) condition, for given k, and also give methods for generating recognizes for LR(k) grammars. It is shown that the problem of whether or not a grammar is LR(k) for some k is undecidable, and the paper concludes by establishing various connections between LR(k) grammars and deterministic languages. In particular, the LR(k) condition is a natural analogue, for grammars, of the deterministic condition, for languages.

read more

Citations
More filters
Journal ArticleDOI

Fast Pattern Matching in Strings

TL;DR: An algorithm is presented which finds all occurrences of one given string within another, in running time proportional to the sum of the lengths of the strings, showing that the set of concatenations of even palindromes, i.e., the language $\{\alpha \alpha ^R\}^*$, can be recognized in linear time.
Journal ArticleDOI

An efficient context-free parsing algorithm

TL;DR: In this article, a parsing algorithm which seems to be the most efficient general context-free algorithm known is described, which is similar to both Knuth's LR(k) algorithm and the familiar top-down algorithm.
Journal ArticleDOI

Transition network grammars for natural language analysis

TL;DR: The use of augmented transition network grammars for the analysis of natural language sentences is described, and structure-building actions associated with the arcs of the grammar network allow for a powerful selectivity which can rule out meaningless analyses and take advantage of semantic information to guide the parsing.

An efficient context-free parsing algorithm

TL;DR: A parsing algorithm which seems to be the most efficient general context-free algorithm known is described and appears to be superior to the top-down and bottom-up algorithms studied by Griffiths and Petrick.
Journal ArticleDOI

Collaboration Processes: Inside the Black Box

TL;DR: The authors argue that public managers should look inside the "black box" of collaboration processes and find a complex construct of five variable dimensions: governance, administration, organizational autonomy, mutuality, and norms.
References
More filters
Journal ArticleDOI

Recursive Unsolvability of a Problem of Thue

TL;DR: Thue's problem is the problem of determining for arbitrarily given strings A, B on al, whether, or no, A and B are equivalent, and this problem is more readily placed if it is restated in terms of a special form of the canonical systems of [3].
Journal ArticleDOI

Syntactic Analysis and Operator Precedence

TL;DR: Three increasingly restricted types of formal grammar are phrase structure Grammars, operator grammars and precedence grammar, which form models of mathematical and algorithmic languages which may be analyzed mechanically by a simple procedure based on a matrix representation of a relation between character pairs.
Journal ArticleDOI

Deterministic context free languages

TL;DR: A number of results about deterministic languages (languages accepted by pushdown automata with no choice of moves) are established, and several problems are shown to be recursively unsolvable.
Journal ArticleDOI

Bounded context syntactic analysis

TL;DR: Bounded context grammars form models for most languages used in computer programming, and many methods of syntactic analysis, including analysis by operator precedence, are special cases of bounded context analysis.
Journal ArticleDOI

Universality of Tag Systems with P = 2

TL;DR: The representation of the Turing machine in the present system has a lower degree of exponentiation, which may be of significance in applications, and these systems seem to be of value in establishing unsolvability of combinatorial problems.