Show HN: My New Years project, Parcoa: Objective-C Parser Combinators

4 points by brotchie ↗ HN
My experience parsing text on iOS is sullied by exposure to Haskell's Parsec and Python's Parcon. Given the ability to create pure, composable, functions using Objective-C blocks, I thought Cocoa an ideal environment for parser combinators.

I've built a somewhat easy to read internal DSL for combining parsers. For example:

  ParcoaParser *yes = [Parcoa string:@"yes"];
  ParcoaParser *no  = [Parcoa string:@"no"];
  ParcoaParser *answer = [yes or: no];
https://github.com/brotchie/Parcoa

1 comment

[ 15.0 ms ] story [ 1833 ms ] thread