Derivation of a Typed Functional LR Parser

Ralf Thomas Walter Hinze · 2003

Abstract. This paper describes a purely functional implementation of LR parsing. We formally derive our parsers in a series of steps starting from the inverse of printing. In contrast to traditional implementations of LR parsing, the resulting parsers are fully typed, stackless and table-free. The parsing functions pursue alternatives in parallel with each alternative represented by a continuation argument. The direct implementation presents many opportunities for optimization and initial measurements show excellent performance in comparison with conventional table-driven parsers. Keywords: continuations, derivation, LL- and LR parsing, efficiency. 1.

Read the paper · More papers on PaperTik