ATNConfigSet class

Inheritance
Implementers
Available Extensions

Constructors

ATNConfigSet([bool fullCtx = true])
ATNConfigSet.dup(ATNConfigSet old)

Properties

alts → BitSet
Gets the complete set of represented alternatives for the configuration set.
no setter
cachedHashCode int
getter/setter pair
configLookup Set<ATNConfig>?
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.
getter/setter pair
configs List<ATNConfig>
Track the elements as they are added to the set; supports get(i) */
final
conflictingAlts ↔ BitSet?
Currently this is only used when we detect SLL conflict; this does not necessarily represent the ambiguous alternatives. In fact, I should also point out that this seems to include predicated alternatives that have predicates that evaluate to false. Computed in computeTargetState().
getter/setter pair
dipsIntoOuterContext bool
getter/setter pair
elements List<ATNConfig>
Return a List holding list of configs
no setter
first ATNConfig
The first element.
no setterinherited
fullCtx bool
Indicates that this configuration set is part of a full context LL prediction. It will be used to determine how to merge $. With SLL it's a wildcard whereas it is not for LL context merge.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
hasSemanticContext bool
getter/setter pair
isEmpty bool
Whether this collection has no elements.
no setteroverride
isNotEmpty bool
Whether this collection has at least one element.
no setterinherited
iterator Iterator<ATNConfig>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last ATNConfig
The last element.
no setterinherited
length int
The number of elements in this.
no setteroverride
predicates List<SemanticContext?>
no setter
readOnly bool
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single ATNConfig
Checks that this iterable has only one element, and returns that element.
no setterinherited
states Set<ATNState>
no setter
uniqueAlt int
getter/setter pair

Methods

add(ATNConfig config, [Map<Pair<PredictionContext, PredictionContext>, PredictionContext>? mergeCache]) bool
Adding a new config means merging contexts with existing configs for {@code (s, i, pi, _)}, where s is the {@link ATNConfig#state}, i is the {@link ATNConfig#alt}, and pi is the {@link ATNConfig#semanticContext}. We use {@code (s,i,pi)} as key.
addAll(dynamic coll) bool
any(bool test(ATNConfig element)) bool
Checks whether any element of this iterable satisfies test.
inherited
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
inherited
clear() → void
contains(Object? o) bool
Whether the collection contains an element equal to element.
override
elementAt(int index) ATNConfig
Returns the indexth element.
inherited
every(bool test(ATNConfig element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> toElements(ATNConfig element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(ATNConfig element), {ATNConfig orElse()?}) ATNConfig
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, ATNConfig element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<ATNConfig> other) Iterable<ATNConfig>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(ATNConfig element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
get(int i) ATNConfig
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(ATNConfig element), {ATNConfig orElse()?}) ATNConfig
The last element that satisfies the given predicate test.
inherited
map<T>(T toElement(ATNConfig e)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optimizeConfigs(dynamic interpreter) → void
reduce(ATNConfig combine(ATNConfig value, ATNConfig element)) ATNConfig
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
singleWhere(bool test(ATNConfig element), {ATNConfig orElse()?}) ATNConfig
The single element that satisfies test.
inherited
skip(int count) Iterable<ATNConfig>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(ATNConfig value)) Iterable<ATNConfig>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
take(int count) Iterable<ATNConfig>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(ATNConfig value)) Iterable<ATNConfig>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) List<ATNConfig>
Creates a List containing the elements of this Iterable.
inherited
toSet() Set<ATNConfig>
Creates a Set containing the same elements as this iterable.
inherited
toString() String
Returns a string representation of (some of) the elements of this.
override
updateHashCode(dynamic hash) → void
where(bool test(ATNConfig element)) Iterable<ATNConfig>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override