Terminals extends Lexicon { @Private static void checkDup(Iterable<String> a, Iterable<String> b) { for (String s1 : a) { for (String s2 : b) { Checks.checkArgument(!s1.equals(s2), "%s duplicated", s1); } } } private  Terminals(Lexicon lexicon); @Deprecated static Terminals caseInsensitive(String[] ops, String[] keywords); @Deprecated static Terminals caseSensitive(String[] ops, String[] keywords); @Deprecated static Terminals caseInsensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords); @Deprecated static Terminals caseSensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords); @Deprecated static Terminals caseInsensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords, Function<String, ?> wordMap); @Deprecated static Terminals caseSensitive(
      Parser<String> wordScanner, String[] ops, String[] keywords, Function<String, ?> wordMap); static Terminals operators(String... ops); static Terminals operators(Collection<String> ops); Builder words(Parser<String> wordScanner); static Parser<String> identifier(); static Parser<String> fragment(final Object... tags); static final Parser<String> RESERVED; }
@Test public void testCheckDup() { Terminals.checkDup(asList("a", "b"), asList("+", "-")); Terminals.checkDup(asList("a", "b"), asList("A", "B")); assertDup(asList("a", "b"), asList("x", "b")); }