static int nlLogic_numberOfLinesReferenced(Exp e) { if (e cast And) ret max(nlLogic_numberOfLinesReferenced(e.a), nlLogic_numberOfLinesReferenced(e.b)); if (e cast Func) { new Matches m; if (startsWith(e.name, "line", m)) ret parseIntOpt(m.rest()); } ret 0; }