diff --git a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java index 85acf3358..2c40a62c0 100755 --- a/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java +++ b/runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java @@ -45,6 +45,12 @@ import java.util.Set; */ public class ATNConfigSet implements Set { // TODO: convert to long like Sam? use list and map from config to ctx? + /* + The reason that we need this is because we don't want the hash map to use + the standard hash code and equals. We need all configurations with the same + (s,i,_,semctx) to be equal. Unfortunately, this key effectively doubles + the number of objects associated with ATNConfigs. + */ public static class Key { ATNState state; int alt;