public class TRegexOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
TRegexEnableNodeSplitter
Try to make control flow through DFAs reducible by node splitting (see
DFANodeSplit). |
static boolean |
TRegexEnableTraceFinder
Try to pre-calculate results of tree-like expressions (see
NFATraceFinderGenerator). |
static int |
TRegexGenerateDFAThresholdCalls
Number of regex searches done without generating a DFA for a given regular expression.
|
static int |
TRegexGenerateDFAThresholdCharacters
If a regex could have processed more than this number of characters without generating a
fully expanded DFA, then we go ahead and generate the fully expanded DFA even before the
TRegexOptions.TRegexGenerateDFAThresholdCalls threshold is met. |
static int |
TRegexMaxBackTrackerMergeExplodeSize
Maximum number of
PureNFA states allowed to be exploded in
TRegexBacktrackingNFAExecutorNode. |
static int |
TRegexMaxDFACGPartialTransitions
Bailout threshold for number of partial capture group transitions in the DFA
(
TRegexDFAExecutorNode generated by DFAGenerator). |
static int |
TRegexMaxDFASize
Bailout threshold for number of nodes in the DFA (
TRegexDFAExecutorNode generated by
DFAGenerator). |
static int |
TRegexMaxDFASizeAfterNodeSplitting
Maximum size of a DFA after being altered by
DFANodeSplit. |
static int |
TRegexMaxDFATransitions
Bailout threshold for number of transitions in the DFA (
TRegexDFAExecutorNode
generated by DFAGenerator). |
static int |
TRegexMaxEagerCGDFACost
Maximum
capture group tracking cost of
eager capture group tracking DFA matchers. |
static int |
TRegexMaxNFASize
Bailout threshold for number of nodes in the NFA (
NFA generated by
NFAGenerator). |
static int |
TRegexMaxNumberOfASTSuccessorsInOneASTStep
Bailout threshold for number of ASTSuccessor instances allowed in a single
ASTStep. |
static int |
TRegexMaxNumberOfCaptureGroups
Bailout threshold for number of capture groups.
|
static int |
TRegexMaxNumberOfCaptureGroupsForDFA
Bailout threshold for number of capture groups in the DFA generator.
|
static int |
TRegexMaxNumberOfNFAStatesInOneDFATransition
Maximum number of NFA states involved in one DFA transition.
|
static int |
TRegexMaxParseTreeSizeForDFA
Parser trees bigger than this setting will not be considered for DFA generation.
|
static int |
TRegexMaxPureNFASize
Bailout threshold for number of nodes in the pure NFA (
PureNFA generated by
PureNFAGenerator). |
static int |
TRegexMaxPureNFATransitions
Bailout threshold for number of transitions in the pure NFA (
PureNFA generated by
PureNFAGenerator). |
static int |
TRegexMaxTransitionsInTrivialExecutor
Maximum number of
transitions for a
TRegexExecutorNode to be considered trivial. |
static int |
TRegexParserTreeMaxNumberOfSequencesInGroup
|
static int |
TRegexParserTreeMaxNumberOfTermsInSequence
|
static int |
TRegexParserTreeMaxSize
Bailout threshold for number of nodes in the parser tree (
RegexAST generated by
RegexASTBuilder). |
static int |
TRegexQuantifierUnrollThresholdGroup
The parser will try to unroll bounded quantifiers on groups up to this limit.
|
static int |
TRegexQuantifierUnrollThresholdSingleCC
The parser will try to unroll bounded quantifiers on single character classes up to this
limit.
|
static int |
TRegexRangeToBitSetConversionThreshold
Minimum number of ranges that have the same high byte to convert into a bit set in a
RangeListMatcher or
RangeTreeMatcher. |
static int |
TRegexTraceFinderMaxNumberOfResults
Maximum number of pre-calculated results per TraceFinder DFA.
|
| Constructor and Description |
|---|
TRegexOptions() |
public static final int TRegexGenerateDFAThresholdCalls
public static final int TRegexGenerateDFAThresholdCharacters
TRegexOptions.TRegexGenerateDFAThresholdCalls threshold is met.public static final boolean TRegexEnableTraceFinder
NFATraceFinderGenerator).
A regular expression is considered tree-like if it does not contain infinite loops (+ or *).
This option will increase performance at the cost of startup time and memory usage.public static final int TRegexTraceFinderMaxNumberOfResults
byte in
TraceFinderDFAStateNode, with 255 being reserved for "no result"!public static final boolean TRegexEnableNodeSplitter
DFANodeSplit).
This option will increase performance at the cost of startup time and memory usage.public static final int TRegexMaxDFASizeAfterNodeSplitting
DFANodeSplit.public static final int TRegexRangeToBitSetConversionThreshold
RangeListMatcher or
RangeTreeMatcher. The threshold value must
be greater than 1. Example:
[က-ဠ], [ူ-၀], [ၐ-ၠ]
are three ranges that have the same high byte (0x10).
if TRegexRangeToBitSetConversionThreshold is <= 3, they will be converted to a
bit set if they appear in a RangeList or RangeTree matcher.
public static final int TRegexParserTreeMaxSize
RegexAST generated by
RegexASTBuilder).public static final int TRegexParserTreeMaxNumberOfSequencesInGroup
public static final int TRegexParserTreeMaxNumberOfTermsInSequence
public static final int TRegexMaxParseTreeSizeForDFA
graal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.jspublic static final int TRegexMaxNFASize
NFA generated by
NFAGenerator). This number must not be higher than Short.MAX_VALUE, because
we use short values for indexing NFA nodes. The current setting is based on run times
of
graal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.jspublic static final int TRegexMaxNumberOfASTSuccessorsInOneASTStep
ASTStep.
It is possible to construct patterns where the number of NFA transitions grows exponentially.
ASTStep is an intermediate data structure between the AST and the NFA, which is
filled eagerly and can cause an OutOfMemoryError if not capped. Since ASTSuccessors
roughly correspond to NFA transitions, the cap has been set to the maximum number of NFA
transitions we allow in a single NFA.public static final int TRegexMaxDFASize
TRegexDFAExecutorNode generated by
DFAGenerator). This number must not be higher than Short.MAX_VALUE, because
we use short values for indexing DFA nodes. The current setting is based on run times
of
graal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.jspublic static final int TRegexMaxDFATransitions
TRegexDFAExecutorNode
generated by DFAGenerator).public static final int TRegexMaxEagerCGDFACost
capture group tracking cost of
eager capture group tracking DFA matchers.public static final int TRegexMaxDFACGPartialTransitions
TRegexDFAExecutorNode generated by DFAGenerator).public static final int TRegexQuantifierUnrollThresholdSingleCC
public static final int TRegexQuantifierUnrollThresholdGroup
public static final int TRegexMaxNumberOfCaptureGroups
public static final int TRegexMaxNumberOfCaptureGroupsForDFA
byte in
DFACaptureGroupPartialTransition!public static final int TRegexMaxNumberOfNFAStatesInOneDFATransition
DFACaptureGroupPartialTransition.public static final int TRegexMaxPureNFASize
PureNFA generated by
PureNFAGenerator).public static final int TRegexMaxPureNFATransitions
PureNFA generated by
PureNFAGenerator).public static final int TRegexMaxBackTrackerMergeExplodeSize
PureNFA states allowed to be exploded in
TRegexBacktrackingNFAExecutorNode.public static final int TRegexMaxTransitionsInTrivialExecutor
transitions for a
TRegexExecutorNode to be considered trivial.