TokenQueue { public static String unescape(String in) { StringBuilder out = new StringBuilder(); char last = 0; for (char c : in.toCharArray()) { if (c == ESC) { if (last != 0 && last == ESC) { out.append(c); } } else { out.append(c); } last = c; } return out.toString(); } TokenQueue(String data); boolean isEmpty(); boolean matches(String seq); boolean matchesAny(String... seq); boolean matchesAny(char... seq); boolean matchChomp(String seq); boolean matchesWhitespace(); boolean matchesWord(); char consume(); void consume(String seq); String consumeTo(String seq); String consumeToAny(String... seq); String chompTo(String seq); String chompBalanced(char open, char close); static String unescape(String in); boolean consumeWhitespace(); String consumeNodeSelector(); String consumeIdentifier(); String remainder(); @Override String toString();  }
@Test public void unescape() { assertEquals("one ( ) \\", TokenQueue.unescape("one \\( \\) \\\\")); }