Affordable Access

A Left to Right then Right to Left Parsing Algorithm

Publication Date
  • Computer Science


Determination of the minimum resources required to parse a language generated by a given context free grammar is an intriguing and yet unsolved problem. It seems plausible that any unambiguous context free grammar could be parsed in time proportional to the length, n, of each input string. Early (2) has presented an algorithm which parses "many" grammars in the proportional to n, but requires n2 on some. His work is an extension of Knuth's method. Knuth's method fails when more than one alternative must be examined by a push-down automation making a left to right scan of the input string. Early's extension takes all possible alternatives simultaneously without duplication of effort at any given one step. The method presented here continues through the string in order to gain pass, which is made on the symbols accumulated on the stack of the automation. The algorithm is probably more efficient than Early's on certain grammars; it will fail completely on others. The essential idea may be interesting to those attacking the general problem.

There are no comments yet on this publication. Be the first to share your thoughts.