Tries to match subrule 'r' zero or more times. It always succeeds, since if 'r' fails
from the very beginning, it matched 'r' zero times...
Its matches are those of its subrules (they might be different for each match) and its
children are all the parse trees returned by the successive application of 'r'.
So we know the first child used the 'literal!"abc"' sub-rule and matched input[0..3].
The second matched input[3..4] and the third input[4..7].
input = ParseTree("",false,[], "efgh");
result = rule(input);
assert(result.successful); // succeed, even though all patterns failed.assert(result.children.length == 0);
Tries to match subrule 'r' zero or more times. It always succeeds, since if 'r' fails from the very beginning, it matched 'r' zero times...
Its matches are those of its subrules (they might be different for each match) and its children are all the parse trees returned by the successive application of 'r'.
So we know the first child used the 'literal!"abc"' sub-rule and matched input[0..3]. The second matched input[3..4] and the third input[4..7].