Introducing: ParserKit
A parser-combinator library
ParserKit Series
This blog is part of a series about parsing, in Swift.
Release
We've been working on a small parser-combinator library as part of a larger project, and although it doesn't have all the bells and whistles yet, it's enough to do some impressive things, and we've decided it's time to publish our first proper library:
ParserKit: A Swift implementation of monadic parser-combinators.
This library provides an implementation of parser combinators, a flexible and functional method of parsing data wherein we build up larger parsers by using smaller parsers as components. In particular, by treating parsers as functions, we can write simple parsers that take advantage of reuseable code, reducing the total amount of complexity and leading to an easier understanding of what's going on in your code.
It's got:
A small codebase with no external dependencies.
A generic
Parser
classPrimitive and complex combinators
Custom infix operators
Full DocC documentation
Example playgrounds
Unit tests
Check out the github repo, or git clone https://github.com/apotheca/Swift-ParserKit.git
, and then jump right in with our Quickstart