robrix / Madness

Recursive Descent Into Madness
MIT License
291 stars 17 forks source link

Parse collections other than strings #43

Closed robrix closed 9 years ago

robrix commented 9 years ago

Not just collections of characters, either; arbitrary collections. I should be able to use Madness to parse memory, files, etc.

jspahrsummers commented 9 years ago

This would be helpful in Carthage, to build Cartfile constructs out of the OGDL nodes parsed by ogdl-swift.

davidcairns commented 9 years ago

Most of the parsing functions are already written to do this, so wouldn’t support just be replacing the bits that assume String with a Generic?

jspahrsummers commented 9 years ago

@davidcairns Everything is implicitly parameterized over String input right now, because of the definition of Parser<T>.Function.

robrix commented 9 years ago

Yeah, it’s not precisely trivial, but it’s definitely possible.