PEG Parser Library for Pony

I have recently released a PEG parser library for the Pony programming language: Kiuatan (“horse” or “pony” in Chinook Jargon). This is mostly a learning exercise for me. It doesn’t make use of any of Pony’s actor model functionality.

Kiuatan (“horse” or “pony” in Chinook Jargon) is a library for building and running parsers in the Pony programming language.

Kiuatan uses Parsing Expression Grammar semantics, which means:

  • Choices are ordered, i.e. the parser will always try to parse alternatives in the order they are declared.
    • Parsers do not backtrack from successful choices.
    • Sequences are greedy, i.e. the parser will not backtrack from the end of a sequence.
  • Kiuatan parsers are “packrat” parsers; they memoize intermediate results, resulting in linear-time parsing.
  • Parsers use Mederios et al’s algorithm to handle unlimited left-recursion.