private void checkForOverlap(Grammar g, Rule rule1, Rule rule2, List<String> firstTokenStringValues, List<String> secondTokenStringValues) {
		for (int i = 0; i < firstTokenStringValues.size(); i++) {
			int secondTokenInd = rule1 == rule2 ? i + 1 : 0;
			String str1 = firstTokenStringValues.get(i);
			for (int j = secondTokenInd; j < secondTokenStringValues.size(); j++) {
				String str2 = secondTokenStringValues.get(j);
				if (str1.equals(str2)) {
					errMgr.grammarError(ErrorType.TOKEN_UNREACHABLE, g.fileName,
							((GrammarAST) rule2.ast.getChild(0)).token, rule2.name, str2, rule1.name);
				}
			}
		}
	}
For same rule compare values from next index:
TOKEN_WITH_SAME_VALUES: 'asdf' | 'asdf';
For different rules compare from start value:
TOKEN1: 'asdf';
TOKEN2: 'asdf';
tool/src/org/antlr/v4/semantics/SymbolChecks.java