srecord IfThen(Exp in, Exp out) { S text() { ret in.text() + " => " + out.text(); } } abstract sclass Exp { abstract S text(); } srecord Func(S name, Exp arg) extends Exp { S text() { ret name + "(" + arg.text() + ")"; } } srecord And(Exp a, Exp b) extends Exp { S text() { ret a.text() + " && " + b.text(); } } abstract sclass Literal extends Exp { abstract S text(); } srecord Sentence(L tok) extends Literal { S text() { ret join(tok); } } srecord Sentence2(S text) extends Literal { S text() { ret text; } } srecord Eq(Exp left, Exp right) extends Exp { S text() { ret left.text() + " = " + right.text(); }