Higher-order functions for parsing

@article{Hutton1992HigherorderFF,
  title={Higher-order functions for parsing},
  author={Graham Hutton},
  journal={Journal of Functional Programming},
  year={1992},
  volume={2},
  pages={323 - 343}
}
  • G. Hutton
  • Published 1 July 1992
  • Computer Science
  • Journal of Functional Programming
Abstract In combinator parsing, the text of parsers resembles BNF notation. We present the basic method, and a number of extensions. We address the special problems presented by white-space, and parsers with separate lexical and syntactic phases. In particular, a combining form for handling the ‘offside rule’ is given. Other extensions to the basic method include an ‘into’ combining form with many useful applications, and a simple means by which combinator parsers can produce more informative… 

Combinators for parsing expressions

  • Steve Hill
  • Computer Science
    Journal of Functional Programming
  • 1996
TLDR
A set of combinators for parsing expressions described by ambiguous grammars with precedence and associativity rules are described, and it is shown that the combinator approach is most applicable for rapid development.

Continuation Passing Combinators for Parsing Precedence Grammars

TLDR
A scheme for constructing parsers for precedence grammars based on the combinators described by Hutton is described and a parser for the expression part of the C programming language is presented.

Predictive parser combinators need four values to report errors

TLDR
A method for constructing parser combinators that can be used to build efficient predictive parsers which accurately report the cause of parsing errors is described.

Design patterns for parser combinators (functional pearl)

TLDR
Several reusable approaches to writing parsers in combinator style are explored, focusing on easy to apply patterns to keep parsing code simple, separated, and maintainable.

Efficient Combinator Parsers

TLDR
It is shown how the speed of these parsers can be improved by one order of magnitude using continuations, which prevents the creation of intermediate data structures and reduces the complexity for deterministic parsers from polynomial to linear.

Total parser combinators

A monadic parser combinator library which guarantees termination of parsing, while still allowing many forms of left recursion, is described. The library's interface is similar to those of many other

Parallel Parsing Processes

TLDR
A combinator library for non-deterministic parsers with a monadic interface is derived by means of successive refinements starting from a specification, simple and efficient for “almost deterministic” grammars.

Eecient Combinator Parsers

TLDR
It is shown how the speed of these parsers can be improved by one order of magnitude using continuations, which prevents the creation of intermediate data structures and reduces the complexity for deterministic parsers from polynomial to linear.

Parser combinators in Scala

TLDR
This paper describes how parser combinators are implemented as a library in Scala, a functional object-oriented language, and is able to closely approximate the EBNF notation supported by dedicated parser generators.

Parsec: A practical parser library

TLDR
The Parsec parser combinator library described in this paper, utilizes a novel implementation technique for space and time efficient parser combinators that in case of a parse error, report both the position of the error as well as all grammar productions that would have been legal at that point in the input.
...

References

SHOWING 1-10 OF 14 REFERENCES

Parsing Using Combinators

  • G. Hutton
  • Computer Science
    Functional Programming
  • 1989
TLDR
This work presents the basic method of combinator parsing, and shows how it may be extended to more practical parsers, and addresses the special problems of layout, and parsers with separate lexical and syntactic phases.

Attribute grammars as a functional programming paradigm

TLDR
This paper shows how attributes in an attribute grammar can be simply and efficiently evaluated using a lazy functional language.

Report on the programming language Haskell: a non-strict, purely functional language version 1.2

TLDR
"Some half dozen persons have written technically on combinatory logic, and most of these, including ourselves, have published something erroneous"; this is regarded as evidence that the subject is refractory.

The next 700 programming languages

A family of unimplemented computing languages is described that is intended to span differences of application area by a unified framework. This framework dictates the rules about the uses of

Compilers: Principles, Techniques, and Tools

  • A. AhoR. SethiJ. Ullman
  • Computer Science
    Addison-Wesley series in computer science / World student series edition
  • 1986
TLDR
This book discusses the design of a Code Generator, the role of the Lexical Analyzer, and other topics related to code generation and optimization.

Constructing Natural Language Interpreters in a Lazy Functional Language

How to Replace Failure by a List of Successes: A method for exception handling, backtracking, and pattern matching in lazy functional languages

TLDR
A method whereby some programs that use special features for exception handling, backtracking, or pattern matching can be re-written in a functional language with lazy evaluation, without the use of any special features.

Comprehending Mondads

  • 1990

Constructing Natural Language Interpreters in Lazy Functional Languages, Glasgow University

  • 1988

Making Form Follow Function

  • Glasgow University. Frost, R. and Launchbury, J. 1988. Constructing Natural Language Interpreters in Lazy
  • 1986