org.eclipse.xtext.parsetree.reconstr.impl
Class TreeConstState

java.lang.Object
  extended by org.eclipse.emf.common.notify.impl.AdapterImpl
      extended by org.eclipse.xtext.grammaranalysis.impl.AbstractNFAState<TreeConstState,TreeConstTransition>
          extended by org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState
All Implemented Interfaces:
org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal, INFAState<TreeConstState,TreeConstTransition>

public class TreeConstState
extends AbstractNFAState<TreeConstState,TreeConstTransition>

Author:
Moritz Eysholdt - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.grammaranalysis.impl.AbstractNFAState
AbstractNFAState.IsInitializedMarker
 
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter
org.eclipse.emf.common.notify.Adapter.Internal
 
Field Summary
protected  java.util.Map<TreeConstState,java.lang.Integer> distances
           
protected  java.util.List<TreeConstTransition> enabledOutgoing
           
protected  java.util.List<TreeConstTransition> enabledOutgoingAfterReturn
           
protected  java.util.Map<TreeConstState,java.lang.Integer> endDistances
           
protected  org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status status
           
protected  java.util.Set<TypeRef> types
           
protected  boolean typesDirty
           
 
Fields inherited from class org.eclipse.xtext.grammaranalysis.impl.AbstractNFAState
allIncoming, builder, element, endState, outgoing, outgoingRuleCalls
 
Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
target
 
Constructor Summary
TreeConstState(AbstractElement element, IGrammarNFAProvider.NFABuilder<TreeConstState,TreeConstTransition> builder)
           
 
Method Summary
protected  void calculateDistances(TreeConstState root, int dist)
           
protected  org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status checkForAmbigiousPaths(java.util.Set<TreeConstState> visited)
           
protected  org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status checkForDetoursAndLoops(java.util.Set<TreeConstState> visited)
           
protected  void consume(java.util.Map<TreeConstState,java.lang.Integer> dist)
           
protected  void discardMisleadingDistances(java.util.Set<TreeConstState> visited)
           
 java.util.List<TreeConstTransition> getEnabledOutgoing()
           
 java.util.List<TreeConstTransition> getEnabledOutgoingAfterReturn()
           
protected  java.util.Map<TreeConstState,java.lang.Integer> getEndDistances()
           
 org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status getStatus()
           
protected  org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status getStatusInternal()
           
 java.util.Set<TypeRef> getTypes()
           
 java.util.Collection<TypeRef> getTypesToCheck()
           
protected  void initStatus()
           
protected  void initTypes(java.util.Map<TreeConstState,java.util.List<TreeConstState>> map, java.util.Set<TreeConstState> endStates)
           
protected  boolean isConsumingElement()
           
 boolean isDisabled()
           
protected  boolean isTransitionEnabledTo(java.util.Map<TreeConstState,java.lang.Integer> dist)
           
protected  void populateTypes(java.util.Map<TreeConstState,java.util.List<TreeConstState>> map)
           
protected  java.util.List<TypeRef> sortTypes(java.util.Collection<TypeRef> types)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.xtext.grammaranalysis.impl.AbstractNFAState
addOutgoing, collectAllOutgoingTransitions, collectOutgoing, collectOutgoingByContainer, collectReferencesToThis, filter, getAllIncoming, getAllOutgoing, getBuilder, getGrammarElement, getIncoming, getIncommingWithoutRuleCalls, getOutgoing, getOutgoingAfterReturn, hasOutgoingRuleCall, isEndState, isStartState, removeDuplicates
 
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl
getTarget, isAdapterForType, notifyChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

distances

protected java.util.Map<TreeConstState,java.lang.Integer> distances

enabledOutgoing

protected java.util.List<TreeConstTransition> enabledOutgoing

enabledOutgoingAfterReturn

protected java.util.List<TreeConstTransition> enabledOutgoingAfterReturn

endDistances

protected java.util.Map<TreeConstState,java.lang.Integer> endDistances

status

protected org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status status

types

protected java.util.Set<TypeRef> types

typesDirty

protected boolean typesDirty
Constructor Detail

TreeConstState

public TreeConstState(AbstractElement element,
                      IGrammarNFAProvider.NFABuilder<TreeConstState,TreeConstTransition> builder)
Method Detail

calculateDistances

protected void calculateDistances(TreeConstState root,
                                  int dist)

checkForAmbigiousPaths

protected org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status checkForAmbigiousPaths(java.util.Set<TreeConstState> visited)

checkForDetoursAndLoops

protected org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status checkForDetoursAndLoops(java.util.Set<TreeConstState> visited)

consume

protected void consume(java.util.Map<TreeConstState,java.lang.Integer> dist)

discardMisleadingDistances

protected void discardMisleadingDistances(java.util.Set<TreeConstState> visited)

getEnabledOutgoing

public java.util.List<TreeConstTransition> getEnabledOutgoing()

getEnabledOutgoingAfterReturn

public java.util.List<TreeConstTransition> getEnabledOutgoingAfterReturn()

getEndDistances

protected java.util.Map<TreeConstState,java.lang.Integer> getEndDistances()

getStatusInternal

protected org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status getStatusInternal()

getStatus

public org.eclipse.xtext.parsetree.reconstr.impl.TreeConstState.Status getStatus()

getTypes

public java.util.Set<TypeRef> getTypes()

getTypesToCheck

public java.util.Collection<TypeRef> getTypesToCheck()

initStatus

protected void initStatus()

initTypes

protected void initTypes(java.util.Map<TreeConstState,java.util.List<TreeConstState>> map,
                         java.util.Set<TreeConstState> endStates)

isConsumingElement

protected boolean isConsumingElement()

isDisabled

public boolean isDisabled()

isTransitionEnabledTo

protected boolean isTransitionEnabledTo(java.util.Map<TreeConstState,java.lang.Integer> dist)

populateTypes

protected void populateTypes(java.util.Map<TreeConstState,java.util.List<TreeConstState>> map)

sortTypes

protected java.util.List<TypeRef> sortTypes(java.util.Collection<TypeRef> types)

toString

public java.lang.String toString()
Overrides:
toString in class AbstractNFAState<TreeConstState,TreeConstTransition>