Such a parser needs to be given a boolean (indicating whether we want a partial
parsing, where partial parsing means that there may be some input remaining after
parsing, whereas with non-partial parsing all input must be consumed) and a text
iterator and it returns either none if parsing failed or a pair some((i, v))where i is a new text iterator (at the new position in the input) and v is
the value associated with the parsed construct.