OrderedATNConfigSet class
- Inheritance
-
- Available Extensions
Properties
-
alts
→ BitSet
-
Gets the complete set of represented alternatives for the configuration
set.
no setterinherited
-
cachedHashCode
↔ int
-
getter/setter pairinherited
-
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.
finalgetter/setter pairinherited-setteroverride-getter
-
configs
→ List<ATNConfig>
-
Track the elements as they are added to the set; supports get(i) */
finalinherited
-
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 pairinherited
-
dipsIntoOuterContext
↔ bool
-
getter/setter pairinherited
-
elements
→ List<ATNConfig>
-
Return a List holding list of configs
no setterinherited
-
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 pairinherited
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hasSemanticContext
↔ bool
-
getter/setter pairinherited
-
isEmpty
→ bool
-
Whether this collection has no elements.
no setterinherited
-
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 setterinherited
-
last
→ ATNConfig
-
The last element.
no setterinherited
-
length
→ int
-
The number of elements in this.
no setterinherited
-
predicates
→ List<SemanticContext?>
-
no setterinherited
-
readOnly
↔ bool
-
getter/setter pairinherited
-
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 setterinherited
-
uniqueAlt
↔ int
-
getter/setter pairinherited
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.
inherited
-
addAll(dynamic coll)
→ bool
-
inherited
-
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
-
inherited
-
contains(Object? o)
→ bool
-
Whether the collection contains an element equal to
element
.
inherited
-
elementAt(int index)
→ ATNConfig
-
Returns the
index
th 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
-
inherited
-
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
-
inherited
-
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
.
inherited
-
updateHashCode(dynamic hash)
→ void
-
inherited
-
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