Deterministic left corner parsing

  • Authors:
  • D. J. Rosenkrantz;P. M. Lewis

  • Affiliations:
  • -;-

  • Venue:
  • SWAT '70 Proceedings of the 11th Annual Symposium on Switching and Automata Theory (swat 1970)
  • Year:
  • 1970

Quantified Score

Hi-index 0.00

Visualization

Abstract

Left corner parsing refers to a class of parsing procedures in which the productions are recognized in a particular order which is different than both bottom up and top down. Each production is recognized after its left descendant but before its other descendants. Procedures in this class have occurred frequently in the compiler literature. In this paper a class of grammars, called LC (k) grammars, is defined and shown to be exactly those grammars for which a certain canonical pushdown machine that does left corner parsing is deterministic. A subset of LC(k) grammars, called strong LC(k) grammars, is defined and shown to be those grammars that can be deterministically left corner parsed by a simplified canonical machine. It is shown that when a particular grammatical rewriting procedure is applied to a grammar, the resulting grammar is (strong) LL(k) if and only if the original grammar is (strong) LC(k). This implies that the class of LC(k) languages is identical to the class of LL(k) languages. The syntax directed translations on LC(k) grammars that can be performed by the canonical pushdown machine are also discussed.