2001•Utrecht University Repository (Utrecht University)Open access

Parsec: direct style monadic parser combinators for the real world

Daan Leijen, Erik Meijer

Open full text 155 citations

Abstract

Despite the long list of publications on parser combinators, there does \nnot yet exist a monadic parser combinator library that is applicable in real \nworld situations. In particular naive implementations of parser combinators \nare likely to suffer from space leaks and are often unable to report \nprecise error messages in case of parse errors. The Parsec parser combinator \nlibrary described in this paper, utilizes a novel implementation \ntechnique for space and time e±cient parser combinators that in case of \na parse error, report both the position of the error as well as all grammar \nproductions that would have been legal at that point in the input.

Open-access reader

About this research paper

What this paper is about

Despite the long list of publications on parser combinators, there does \nnot yet exist a monadic parser combinator library that is applicable in real \nworld situations. In particular naive implementations of parser combinators \nare likely to suffer from space leaks and are often unable to report \nprecise error messages in case of parse errors. The Parsec parser combinator \nlibrary described in this paper, utilizes a novel implementation \ntechnique for space and time e±cient parser combinators that in case of \na parse error, report both the position of the error as well as all grammar \nproductions that would have been legal at that point in the input.

Why it matters

OpenAlex reports 155 citations for this work. Citation counts describe recorded attention and do not establish research quality.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

Despite the long list of publications on parser combinators, there does \nnot yet exist a monadic parser combinator library that is applicable in real \nworld situations. In particular naive implementations of parser combinators \nare likely to suffer from space leaks and are often unable to report \nprecise error messages in case of parse errors. The Parsec parser combinator \nlibrary described in this paper, utilizes a novel implementation \ntechnique for space and time e±cient parser combinators that in case of \na parse error, report both the position of the error as well as all grammar \nproductions that would have been legal at that point in the input.

Key concepts: Combinatory logic, Parser combinator, Computer science, Parsing, Programming language, LR parser, Top-down parsing, Grammar

Related papers

Back to paper searchBrowse research topicsOriginal source
Parsec: direct style monadic parser combinators for the real world — Research Paper | ScholarLens