On the relative efficiencies of context-free grammar

A number of diverse recognition procedures that have been proposed for parsing sentences with respect to a context-free grammar are described in this paper by means of a common device. Each procedure is defined by giving an algorithm for obtaining a nondeterministic Turing Machine recognizer that is equivalent to a given context-free grammar. The formalization of the Turing Machine has been chosen to make possible particularly simple descriptions of the parsing procedures considered. The class of grammars called context-free (CF) by Chomsky [1] has been utilized in various linguistic theories, both as the sole component and as just one of several components of a natural language grammar. In addition, OF grammars have come 1o play a dominant role in the specification and translation of programming languages. It has been found that CI i' grammars are at least to some extent adequate for specifying the syntax of programming languages and that the structural descriptions assigned by these grammars are of practical utility in producing compilers. The first application of CF grammars to computer programming seems to have been made by Baekus [2] in officially defining the syntax of the ALGOr, language. Except for notation, so-called "Backus Normal Ii'orm" is identical to a CF grammar specification. It is not our purpose here to discuss the appropriateness of the CF grammar for specific applieations. Indeed, the authors' basic disagreement here makes a joint statement impossible. Instead we assume the utility of the CF grammar for some applications and confine ourselves to investigating the effieieneies of different recognition procedures for this class of grammars. A C,F grammar is represented by a quadruple (I, T, S, P) where I U .7' is an alphabet and P contains rules for rewriting symbols from [ as strings of symbols from I U T. These rules have the form: A ~Bi..-B~, (n => 1) where the symbol A is rewritten as the string B1 "" B,~. The string D1 ... Dq is derivable from the string CC1 ... Cv if D~-. • /Z~ can be obtained from C1-. • Cp by a finite sequence of applications of rules from P. The sets I and T are such that I= {C:C~D~...DqC P} and INT =~. The men'~bers of T are called terminals, the members of I, nonterminals. There is a designated symbol S C I, and terminal strings derivable from S are called sentences of the grammar. We define …

[1]  A L Bastian A PHRASE-STRUCTURE LANGUAGE TRANSLATOR , 1962 .

[2]  Robert P. Futrelle,et al.  Syntactic analysis by digital computer , 1962, CACM.

[3]  G. H. Matthews Discontinuity and Asymmetry in Phrase Structure Grammars , 1963, Information and Control.

[4]  Robert W. Floyd,et al.  Syntactic Analysis and Operator Precedence , 1963, JACM.

[5]  Maurice Gross,et al.  On the Equivalence of Models of Language used in the Fields of Mechanical Translation and Information Retrieval , 1964, EARLYMT.

[6]  Jeffrey S. Rohl,et al.  Trees and Routines , 1962, Comput. J..

[7]  J. Hosler,et al.  AUTOMATIC PROGRAMMING TECHNIQUES. , 1962 .

[8]  Susumu Kuno,et al.  Syntactic structure and ambiguity of English , 1899, AFIPS '63 (Fall).

[9]  Jane J. Robinson PRELIMINARY CODES AND RULES FOR THE AUTOMATIC PARSING OF ENGLISH , 1962 .

[10]  James J. Baker,et al.  A note on multiplying Boolean matrices , 1962, CACM.

[11]  A E Glennie ON THE SYNTAX MACHINE AND THE CONSTRUCTION OF A UNIVERSAL COMPILER , 1960 .

[12]  Howard H Metcalfe A parameterized compiler based on mechanical linguistics , 1964 .

[13]  Noam Chomsky,et al.  On Certain Formal Properties of Grammars , 1959, Inf. Control..

[14]  Stephen Warshall,et al.  A Theorem on Boolean Matrices , 1962, JACM.

[15]  Murray E Sherry SYNTACTIC ANALYSIS IN AUTOMATIC TRANSLATION , 1960 .

[16]  Edgar T. Irons,et al.  A syntax directed compiler for ALGOL 60 , 1961, CACM.

[17]  Robert S. Ledley,et al.  Automatic-programming-language translation through syntactical analysis , 1962, CACM.

[18]  John W. Backus,et al.  The syntax and semantics of the proposed international algebraic language of the Zurich ACM-GAMM Conference , 1959, IFIP Congress.

[19]  Stephen Warshall A syntax directed generator , 1961, AFIPS '61 (Eastern).

[20]  Seymour Ginsburg,et al.  Two Families of Languages Related to ALGOL , 1962, JACM.

[21]  R. A. Brooker,et al.  An Assembly Program for a Phrase Structure Language , 1960, Comput. J..

[22]  D. Morris,et al.  A General Translation Program for Phrase Structure Languages , 1962, JACM.

[23]  Friedrich L. Bauer,et al.  Revised report on the algorithm language ALGOL 60 , 1963, CACM.

[24]  Thomas V. Griffiths Turing machine recognizers for general rewriting systems , 1964, SWCT.

[25]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1959, Commun. ACM.