An LR parsing technique for extended context-free grammars

  • Authors:
  • Augusto Celentano

  • Affiliations:
  • Istituto di Elettrotecnica ed Elettronica, Politecnico di Milano, Piazza L. da Vinci 32, I-20133 Milano, Italy

  • Venue:
  • Computer Languages
  • Year:
  • 1981

Quantified Score

Hi-index 0.00

Visualization

Abstract

Extended context-free grammars allow regular expressions to appear in productions right hand sides, and are a clear and natural way to describe the syntax of programming languages. In this paper an LR parsing technique for extended context-free grammars is presented, which is based on an underlying transformation of the grammar into an equivalent context-free one. The technique is suitable for inclusion in one-pass compilers: the implementation requires little extensions to the algorithms working for normal LR grammars. Besides describing the parsing method, the paper shows also the algorithms for deriving the parsing tables; tables optimization is also discussed. Finally, this technique is compared with other proposals appeared in the literature.