类 MachineProbe
- java.lang.Object
-
- org.antlr.analysis.MachineProbe
-
public class MachineProbe extends java.lang.Object
-
-
构造器概要
构造器 构造器 说明 MachineProbe(DFA dfa)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.util.List<DFAState>
getAnyDFAPathToTarget(DFAState startState, DFAState targetState, java.util.Set<DFAState> visited)
java.util.List<IntSet>
getEdgeLabels(DFAState targetState)
Return a list of edge labels from start state to targetState.java.util.List<Token>
getGrammarLocationsForInputSequence(java.util.List<java.util.Set<NFAState>> nfaStates, java.util.List<IntSet> labels)
Given an alternative associated with a DFA state, return the list of tokens (from grammar) associated with path through NFA following the labels sequence.java.lang.String
getInputSequenceDisplay(Grammar g, java.util.List<IntSet> labels)
Given List<IntSet>, return a String with a useful representation of the associated input string.
-
-
-
构造器详细资料
-
MachineProbe
public MachineProbe(DFA dfa)
-
-
方法详细资料
-
getAnyDFAPathToTarget
public java.util.List<DFAState> getAnyDFAPathToTarget(DFAState startState, DFAState targetState, java.util.Set<DFAState> visited)
-
getEdgeLabels
public java.util.List<IntSet> getEdgeLabels(DFAState targetState)
Return a list of edge labels from start state to targetState.
-
getInputSequenceDisplay
public java.lang.String getInputSequenceDisplay(Grammar g, java.util.List<IntSet> labels)
Given List<IntSet>, return a String with a useful representation of the associated input string. One could show something different for lexers and parsers, for example.
-
getGrammarLocationsForInputSequence
public java.util.List<Token> getGrammarLocationsForInputSequence(java.util.List<java.util.Set<NFAState>> nfaStates, java.util.List<IntSet> labels)
Given an alternative associated with a DFA state, return the list of tokens (from grammar) associated with path through NFA following the labels sequence. The nfaStates gives the set of NFA states associated with alt that take us from start to stop. One of the NFA states in nfaStates[i] will have an edge intersecting with labels[i].
-
-