static Set findFunctionDefs_keywords = new HashSet(splitAtSpace("static svoid ssvoid ssynchronized sbool sS sO sL")); static L findFunctionDefs(L tok) { int n = l(tok); new L functions; for (int i = 1; i < n; i += 2) { S t = tok.get(i); if (findFunctionDefs_keywords.contains(t)) { int j = i+2; while (j < n && !eqOneOf(tok.get(j), ";", "=", "(", "{", "#")) j += 2; if (eq(get(tok, j), "(") && isIdentifier(tok.get(j-2))) functions.add(tok.get(j-2)); } } ret functions; }