Scannerless NSLR(1) parsing of programming languages

  • Authors:
  • D. J. Salomon;G. V. Cormack

  • Affiliations:
  • Department of Computer Science, University of Waterloo, Waterloo, Ontario, Canada;Department of Computer Science, University of Waterloo, Waterloo, Ontario, Canada

  • Venue:
  • PLDI '89 Proceedings of the ACM SIGPLAN 1989 Conference on Programming language design and implementation
  • Year:
  • 1989

Quantified Score

Hi-index 0.02

Visualization

Abstract

The disadvantages of traditional two-phase parsing (a scanner phase preprocessing input for a parser phase) are discussed. We present metalanguage enhancements for context-free grammars that allow the syntax of programming languages to be completely described in a single grammar. The enhancements consist of two new grammar rules, the exclusion rule, and the adjacency-restriction rule. We also present parser construction techniques for building parsers from these enhanced grammars, that eliminate the need for a scanner phase.