robrix / Madness

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

Collection indices #70

Closed robrix closed 9 years ago

robrix commented 9 years ago

This PR allows Madness to parse over any arbitrary CollectionType.

Note that the literal parsers impose the additional requirement that the collection’s elements be Equatable, but other terminal parsers can be trivially constructed parameterized by arbitrary predicates on the elements, whether domain-specific or generic.

This is an important step towards #61 (line/column information is predicated on the availability of an index) and #47 (line/column information is necessary to report errors).

Fixes #68.

robrix commented 9 years ago

/cc @jspahrsummers

jspahrsummers commented 9 years ago

:metal: