Parsing permutation phrases

  • Authors:
  • Arthur I. Baars;Andres Löh;S. Doaitse Swierstra

  • Affiliations:
  • Institute of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands (email: arthurb@cs.uu.nl andres@cs.uu.nl doaitse@cs.uu.nl);Institute of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands (email: arthurb@cs.uu.nl andres@cs.uu.nl doaitse@cs.uu.nl);Institute of Information and Computing Sciences, Utrecht University, Utrecht, The Netherlands (email: arthurb@cs.uu.nl andres@cs.uu.nl doaitse@cs.uu.nl)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

A permutation phrase is a sequence of elements (possibly of different types) in which each element occurs exactly once and the order is irrelevant. Some of the permutable elements may be optional. We show how to extend a parser combinator library with support for parsing such free-order constructs. A user of the library can easily write parsers for permutation phrases and does not need to care about checking and reordering the recognized elements. Applications include the generation of parsers for attributes of XML tags and Haskell's record syntax.