// Subclassable, OBVIOUSLY! static class Module { void go(Lisp entry) throws Exit {} } static class Exit extends Exception {} static class SimpleInterpreter { void interpret(S src, Module module) { for (S line : toLines(src)) { Lisp entry = nlParse(line, false, true); if (!entry.is("[]", 0)) try { module.go(entry); } catch (Exit e) { break; } } } }