configLookup property

  1. @override
Set<ATNConfig>? configLookup
finalgetter/setter pairinherited-setteroverride-getter

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 {@code (s,i,_,semctx)} to be equal. Unfortunately, this key effectively doubles the number of objects associated with ATNConfigs. The other solution is to use a hash table that lets us specify the equals/hashcode operation.

All configs but hashed by (s, i, _, pi) not including context. Wiped out when we go readonly as this set becomes a DFA state.

Implementation

@override
final configLookup = <ATNConfig>{};

Set<ATNConfig>? configLookup = defaultConfigLookup();