static Set findFullFunctionDefs_keywords = new HashSet(splitAtSpace("static svoid ssvoid ssynchronized sbool sS sO sL")); // returns actual CNC static L> findFullFunctionDefs(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))) { int k = smartIndexOf(tok, "{", j); int k = findEndOfBlock(tok, k)+1; functions.add(subList(tok, i-1, k)); i = k-2; } } } ret functions; }