Class TRegexDFAExecutorDebugRecorder
java.lang.Object
com.oracle.truffle.regex.tregex.nodes.dfa.TRegexDFAExecutorDebugRecorder
- All Implemented Interfaces:
JsonConvertible
This class is used to store a trace of the execution of a
TRegexExecutorBaseNode.execute(com.oracle.truffle.api.frame.VirtualFrame, TRegexExecutorLocals, TruffleString.CodeRange).
A trace contains the arguments received by
TRegexExecutorBaseNode.execute(com.oracle.truffle.api.frame.VirtualFrame, TRegexExecutorLocals, TruffleString.CodeRange),
and the ID of the DFA transition taken for all characters of the input string that have been
traversed. After execution, the recorded trace can be dumped to disk as JSON with
finishRecording().-
Method Summary
Modifier and TypeMethodDescriptioncreate(RegexOptions options, DFAGenerator dfaGenerator) voidvoidrecordCGPartialTransition(int currentIndex, int cgPartialTransitionIndex) voidrecordTransition(int currentIndex, short stateNodeID, int transitionIndex) voidsetInitialIndex(int initialIndex) voidtoJson()
-
Method Details
-
create
public static TRegexDFAExecutorDebugRecorder create(RegexOptions options, DFAGenerator dfaGenerator) -
startRecording
-
setInitialIndex
public void setInitialIndex(int initialIndex) -
recordTransition
public void recordTransition(int currentIndex, short stateNodeID, int transitionIndex) -
recordCGPartialTransition
public void recordCGPartialTransition(int currentIndex, int cgPartialTransitionIndex) -
finishRecording
public void finishRecording() -
toJson
- Specified by:
toJsonin interfaceJsonConvertible
-