kirancodes.me
To Proof Maintenance & Beyond!

Scannerless NSLR(1) Parsing of Programming Languages

Daniel J. Salomon, Gordon V. Cormack

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.

Related papers