An efficient context-free parsing algorithm

A parsing algorithm which seems to be the most efficient general context-free algorithm known is described. It is similar to both Knuth's LR(<italic>k</italic>) algorithm and the familiar top-down algorithm. It has a time bound proportional to <italic>n</italic><supscrpt>3</supscrpt> (where <italic>n</italic> is the length of the string being parsed) in general; it has an <italic>n</italic><supscrpt>2</supscrpt> bound for unambiguous grammars; and it runs in linear time on a large class of grammars, which seems to include most practical context-free programming language grammars. In an empirical comparison it appears to be superior to the top-down and bottom-up algorithms studied by Griffiths and Petrick.

[1]  Emil L. Post Recursive Unsolvability of a problem of Thue , 1947, Journal of Symbolic Logic.

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

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

[4]  John McCarthy,et al.  LISP 1.5 Programmer's Manual , 1962 .

[5]  J. S. Wholey IEEE Transactions on Electronic Computers , 1963 .

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

[7]  Robert W. Floyd,et al.  The Syntax of Programming Languages-A Survey , 1964, IEEE Trans. Electron. Comput..

[8]  Richard Edwin Stearns,et al.  Memory bounds for recognition of context-free and context-sensitive languages , 1965, SWCT.

[9]  Jeffrey Ullman PUSHDOWN AUTOMATA WITH BOUNDED BACKTRACK , 1965 .

[10]  Tadao Kasami,et al.  An Efficient Recognition and Syntax-Analysis Algorithm for Context-Free Languages , 1965 .

[11]  S. R. Petrick,et al.  On the relative efficiencies of context-free grammar , 1965, CACM.

[12]  Susumu Kuno,et al.  The predictive analyzer and a path elimination technique , 1965, CACM.

[13]  Donald E. Knuth,et al.  On the Translation of Languages from Left to Right , 1965, Inf. Control..

[14]  Jerome A. Feldman A formal semantics for computer languages and its application in a compiler-compiler , 1966, CACM.

[15]  Niklaus Wirth,et al.  EULER: A generalization of ALGOL and its formal definition: Part 1 , 1966, Commun. ACM.

[16]  Daniel H. Younger,et al.  Context-Free Language Processing in Time n^3 , 1966, SWAT.

[17]  Daniel H. Younger,et al.  Recognition and Parsing of Context-Free Languages in Time n^3 , 1967, Inf. Control..

[18]  Bernard A. Galler,et al.  A proposal for definitions in ALGOL , 1967, CACM.

[19]  Tadao Kasami A Note on Computing Time for Recognition of Languages Generated by Linear Grammars , 1967, Inf. Control..

[20]  Jerome A. Feldman,et al.  Translator writing systems , 1968, Commun. ACM.

[21]  W. Martin A Left to Right then Right to Left Parsing Algorithm , 1968 .

[22]  Tadao Kasami,et al.  A Syntax-Analysis Procedure for Unambiguous Context-Free Grammars , 1969, J. ACM.

[23]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.