sclass Attractor implements IAttractor, Runnable { F1 tester; Runnable action; S input; // when matched *() {} *(F1 *tester, Runnable *action) {} *(Runnable *action) {} public bool matches(S s) { ret isTrue(callF(tester, s)); } public void run { callF(action); } toString { ret standard_toString(this); } bool matches_public(S s) { ret false if !matches(s); ret true with a.input = input; } } sclass DefaultAttractor > Attractor { *() { this(null); } *(Runnable *action) { tester = f1_true(); } } sclass MatchAttractor > Attractor { S pattern; *() {} *(S *pattern) {} *(S *pattern, Runnable *action) {} public bool matches(S s) { ret matchX2(pattern, s); } } sclass YesAttractor > Attractor { *() { tester = f isYes_1; } *(Runnable action) { this(); this.action = action; } }