The ComplexTypeSplitter is used to parse a micro-grammar in support of specifying complex type
values. It allows for brevity in specifying values and also handles optional values via a
name/value pair mechanism.
In a complex type, you may have 3 value that always have to be specified and various optional
parts. For example:
name type id comment="various things" version=1.2.3.4
The micro grammar doesn't know anything about what's required or optional (that's handled
in higher level code), but for the input above, it will create a set of name/value pairs
However, there is another hint as to how the information should be parsed and that has to
do with greedy required parts. The greedy flag can be specified only on the last requiredPart
of a complex type composed entirely of required parts. What this means is that as soon as we
have found the nth - 1 separator, everything else becomes part of the final requiredPart.
For example, if we have 3 required parts and the final one is marked as greedy, we'll cycle
through until we hit the 3 - 1 (2) second separator and stop parsing - everything else
becomes part of the final value.
You could mark a single requirePart as greedy, and we would just return the entire initialInput.
The stopAfter flag indicates the number separators we'll stop after, or -1 if we aren't doing
the greedy thing.