Polish parsers, step by step

  • Authors:
  • R. John M. Hughes;S. Doaitse Swierstra

  • Affiliations:
  • Chalmers University of Technology, Gøteborg, Sweden;Utrecht University, Utrecht, The Netherlands

  • Venue:
  • ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present the derivation of a space efficient parser combinator library: the constructed parsers do not keep unnecessary references to the input, produce online results and efficiently handle ambiguous grammars. The underlying techniques can be applied in many contexts where traditionally backtracking is used.We present two data types, one for keeping track of the progress of the search process, and one for representing the final result in a linear way. Once these data types are combined into a single type, we can perform a breadth-first search, while returning parts of the result as early as possible.