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).
Lowers the requirements for the input to CollectionType.
Adds an index into the input to parsers’ inputs.
Replaces the remainder subslice with an index into the input.
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).
CollectionType
.Fixes #68.