svoid tok_replaceColonEqualsSyntax(LS tok) { int i; // "field := value" for defining fields e.g. in "uniq" while ((i = jfind_check(":", tok, " :=")) >= 0) { S id = tok.get(i); // special case for null := which we interpret as actually null, // not "null" S string = eq(id, "null") ? id : quote(id); tok.set(i, string); tok.set(i+2, ","); tok.set(i+4, ""); reTok(tok, i, i+5); } // "quoted" := value while ((i = jfind_check(":", tok, " :=")) >= 0) { tok.set(i+2, ","); tok.set(i+4, ""); reTok(tok, i, i+5); } // := value while ((i = jfind_check(":", tok, " :=")) >= 0) { tok.set(i+2, ","); tok.set(i+4, ""); reTok(tok, i, i+5); } // all other cases: just replace with comma jreplace(tok, ":=", ","); }