!7 replace SimpleStatements with MatchableRecords. replace Env with SimpleStatements. abstract sclass Prop implements IFieldsToList {} static withToList record Did$HappenBefore$(A event1, B event2) {} static withToList record WhenDid$Happen(O event) extends Prop {} static withToList record $HappensAtSecond$(A event, B y) extends Prop {} static cached L recordClasses() { ret (L) myNonAbstractClassesImplementing(IFieldToList); } static cached LPair classesAndPatterns() { ret map(recordClasses(), c -> pair(c, dollarsToStarsAndSplitCamelCase(classNameRelativeToMC(c)))); } static O parseArg(S s) { ret isInteger(s) ? parseInt(s) : s; } static Prop parse(S s) { new Matches m; for (Pair p : classesAndPatterns()) { if (match(p.b, s, m)) ret nuObject(p.a, map parseArg(m.m)); } null; } p-exp { pnl(pairsB(classesAndPatterns())); for (S s : tlft([[ Did X happen before Y? when did Z happen ]])) print(s + " => " + parse(s)); }