static S xyzToNewIDs(S s) { ret xyzToNewIDs(s, (L) null); } static S xyzToNewIDs(S s, L varCollector) { L tok = javaTok(s); int n = numberOfXYZVars(tok); for (int i = 1; i <= n; i++) { S var = xyzIndexToVar(i); if (tok.contains(var)) replace(tok, var, addAndReturn(varCollector, aGlobalID())); } ret join(tok); } static S xyzToNewIDs(S s, S... varsToReplace) { L tok = javaTok(s); for (S var : varsToReplace) if (tok.contains(var)) replace(tok, var, aGlobalID()); ret join(tok); }