sS tok_packageName(LS tok) { int i = jfind(tok, "package"); if (i < 0) ret ""; i += 2; int j = jfind(tok, i, ";"); if (j < 0) ret ""; ret join(codeTokensOnly(subList(tok, i-1, j))); } sS tok_packageName(S src) { Producer p = javaTokC_producer(src); S t = p.next(); if (!eq(t, "package")) ret ""; new StringBuilder buf; while (!eqOneOf(t = p.next(), null, ";")) buf.append(t); ret str(buf); }