From 6322ff3abdefb267512d4604b7e63ce5d6d60486 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Thu, 26 Jul 2012 18:17:05 -0700 Subject: [PATCH] add comment --- runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfigSet.java | 6 ++++++ 1 file changed, 6 insertions(+) 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;