public boolean equals(ATNConfig other) {
		if (this == other) {
			return true;
		}
		else if (other == null) {
			return false;
		}

		return this.state.stateNumber==other.state.stateNumber
			&& this.alt==other.alt
			&& Objects.equals(this.context, other.context)
			&& this.semanticContext.equals(other.semanticContext)
			&& this.isPrecedenceFilterSuppressed() == other.isPrecedenceFilterSuppressed();
	}
An ATN configuration is equal to another if both have
 the same state, they predict the same alternative, and
 syntactic/semantic contexts are the same.
runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java