public class ATNConfigSet extends Object implements Set<ATNConfig>
ATNConfig). As
configurations are added to the set, they are merged with other
ATNConfig instances already in the set when possible using the
graph-structured stack.
An instance of this class represents the complete set of positions (with context) in an ATN which would be associated with a single DFA state. Its internal representation is more complex than traditional state used for NFA to DFA conversion due to performance requirements (both improving speed and reducing memory overhead) as well as supporting features such as semantic predicates and non-greedy operators in a form to support ANTLR's prediction algorithm.
| Modifier | Constructor and Description |
|---|---|
|
ATNConfigSet() |
protected |
ATNConfigSet(ATNConfigSet set,
boolean readonly) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streampublic ATNConfigSet()
protected ATNConfigSet(ATNConfigSet set, boolean readonly)
@NotNull public BitSet getRepresentedAlternatives()
public final boolean isReadOnly()
public boolean isOutermostConfigSet()
public void setOutermostConfigSet(boolean outermostConfigSet)
public void optimizeConfigs(ATNSimulator interpreter)
public ATNConfigSet clone(boolean readonly)
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(ATNConfig e)
public boolean add(ATNConfig e, @Nullable PredictionContextCache contextCache)
protected long getKey(ATNConfig e)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<ATNConfig>containsAll in interface Set<ATNConfig>public boolean addAll(Collection<? extends ATNConfig> c)
public boolean addAll(Collection<? extends ATNConfig> c, PredictionContextCache contextCache)
public boolean retainAll(Collection<?> c)
public boolean removeAll(Collection<?> c)
public void clear()
public boolean equals(Object obj)
public int hashCode()
public String toString(boolean showContext)
public int getUniqueAlt()
public boolean hasSemanticContext()
public void clearExplicitSemanticContext()
public void markExplicitSemanticContext()
public ConflictInfo getConflictInfo()
public void setConflictInfo(ConflictInfo conflictInfo)
public BitSet getConflictingAlts()
public boolean isExactConflict()
public boolean getDipsIntoOuterContext()
public ATNConfig get(int index)
public void remove(int index)
protected final void ensureWritable()
Copyright © 1992–2024 Daniel Sun. All rights reserved.