sclass PartialAttractor Runnable { VF1 action; LS tok; IntRange matchedRange; public abstract bool find(); // uses tok public void run { callF(action, this); } toString { ret standard_toString(this); } bool acceptFull() { matchedRange = intRange(0, tok); true; } } // attracts everything sclass PDefaultAttractor > Attractor { public abstract bool find(LS tok) { ret acceptFull(); } } // uses find3 sclass PFind3Attractor > Attractor { S pattern; *(S *pattern) {} *(S *pattern, Runnable *action) {} public bool matches(S s) { ret find3(pattern, s); } } sclass YesAttractor > Attractor { *() { tester = f isYes_1; } *(Runnable action) { this(); this.action = action; } }