4 ms·
Show HN: My New Years project, Parcoa: Objective-C Parser Combinators
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
- brotchie 14y agoclickable: https://github.com/brotchie/Parcoa https://github.com/brotchie/Parcoa