Matches input against a predicate block, like PP2PredicateSequenceNode, but for an unknown/variable length.
For example, whereas for fixed-length matches you can already do:
parser := PP2PredicateSequenceNode
on: [ :value | value first isUppercase ]
message: 'uppercase 3 letter words'
size: 3.
(parser parse: 'Abc') isPetitFailure not.
Now you can do:
parser := PP2FlexiblePredicateSequenceNode
on: [ :value | Object new respondsTo: value asSymbol ]
message: 'message to an object'
while: [ :e | e ~= Character space ].
Matches input against a predicate block, like PP2PredicateSequenceNode, but for an unknown/variable length.
For example, whereas for fixed-length matches you can already do: parser := PP2PredicateSequenceNode on: [ :value | value first isUppercase ] message: 'uppercase 3 letter words' size: 3. (parser parse: 'Abc') isPetitFailure not.
Now you can do: parser := PP2FlexiblePredicateSequenceNode on: [ :value | Object new respondsTo: value asSymbol ] message: 'message to an object' while: [ :e | e ~= Character space ].