Class DFAGenerator
java.lang.Object
com.oracle.truffle.regex.tregex.dfa.DFAGenerator
- All Implemented Interfaces:
JsonConvertible
-
Constructor Summary
ConstructorsConstructorDescriptionDFAGenerator(TRegexCompilationRequest compilationRequest, NFA nfa, TRegexDFAExecutorProperties executorProps, CompilationBuffer compilationBuffer) -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcDFA()Calculates the DFA.Transforms the generator's DFA representation to the data structure required byTRegexDFAExecutorNodeand returns the dfa as a newTRegexDFAExecutorNode.getDebugDumpName(String name) getNfa()getProps()getState(short stateNodeID) booleanbooleanbooleanvoidnodeSplitRegisterDuplicateState(short oldID, short newID) voidnodeSplitSetNewDFASize(int size) voidnodeSplitUpdateSuccessors(short stateID, short[] newSuccessors) voidregisterCGPartialTransitionDebugInfo(DFACaptureGroupTransitionBuilder.PartialTransitionDebugInfo partialTransition) toJson()
-
Constructor Details
-
DFAGenerator
public DFAGenerator(TRegexCompilationRequest compilationRequest, NFA nfa, TRegexDFAExecutorProperties executorProps, CompilationBuffer compilationBuffer)
-
-
Method Details
-
getNfa
-
getEntryStates
-
getStateMap
-
getProps
-
isForward
public boolean isForward() -
isGenericCG
public boolean isGenericCG() -
isSearching
public boolean isSearching() -
getOptions
-
getCompilationBuffer
-
getState
-
nodeSplitSetNewDFASize
public void nodeSplitSetNewDFASize(int size) -
nodeSplitRegisterDuplicateState
public void nodeSplitRegisterDuplicateState(short oldID, short newID) -
nodeSplitUpdateSuccessors
public void nodeSplitUpdateSuccessors(short stateID, short[] newSuccessors) -
getCgPartialTransitionIDCounter
-
registerCGPartialTransitionDebugInfo
public void registerCGPartialTransitionDebugInfo(DFACaptureGroupTransitionBuilder.PartialTransitionDebugInfo partialTransition) -
calcDFA
public void calcDFA()Calculates the DFA. Run this method before callingcreateDFAExecutor()ortoJson()or passing the generator object toDFAExport. -
createDFAExecutor
Transforms the generator's DFA representation to the data structure required byTRegexDFAExecutorNodeand returns the dfa as a newTRegexDFAExecutorNode. Make sure to calculate the DFA withcalcDFA()before calling this method!- Returns:
- a
TRegexDFAExecutorNodethat runs the DFA generated by this object.
-
getDebugDumpName
-
getDebugDumpName
-
toJson
- Specified by:
toJsonin interfaceJsonConvertible
-