public final class RegexOptions extends Object
Available options:
str objects.bytes-like objects.Pattern method was called (Python flavors
only). Possible values:
\s. This is
a legacy feature for languages using a Unicode standard older than 6.3, such as ECMAScript 6 and
older.char instead
of per-codepoint. This may improve performance in certain scenarios, but increases the likelihood
of DFA state explosion.RegexResult).Flavor, Encoding and PythonMethod are boolean and
false by default.| Modifier and Type | Class and Description |
|---|---|
static class |
RegexOptions.Builder |
| Modifier and Type | Field and Description |
|---|---|
static String |
ALWAYS_EAGER_NAME |
static RegexOptions |
DEFAULT |
static String |
DUMP_AUTOMATA_NAME |
static String |
ENCODING_NAME |
static String |
FLAVOR_ECMASCRIPT |
static String |
FLAVOR_NAME |
static String |
FLAVOR_PYTHON |
static String |
FLAVOR_PYTHON_BYTES |
static String |
FLAVOR_PYTHON_STR |
static String |
FLAVOR_RUBY |
static String |
IGNORE_ATOMIC_GROUPS_NAME |
static String |
MUST_ADVANCE_NAME |
static String |
PYTHON_METHOD_FULLMATCH |
static String |
PYTHON_METHOD_MATCH |
static String |
PYTHON_METHOD_NAME |
static String |
PYTHON_METHOD_SEARCH |
static String |
REGRESSION_TEST_MODE_NAME |
static String |
STEP_EXECUTION_NAME |
static String |
U180E_WHITESPACE_NAME |
static String |
UTF_16_EXPLODE_ASTRAL_SYMBOLS_NAME |
static String |
VALIDATE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static RegexOptions.Builder |
builder(com.oracle.truffle.api.source.Source source,
String sourceString) |
boolean |
equals(Object obj) |
Encodings.Encoding |
getEncoding() |
RegexFlavor |
getFlavor() |
PythonMethod |
getPythonMethod() |
int |
hashCode() |
boolean |
isAlwaysEager()
Always match capture groups eagerly.
|
boolean |
isBooleanMatch()
Don't track capture groups, just return a boolean match result instead.
|
boolean |
isDumpAutomata()
Produce ASTs and automata in JSON, DOT (GraphViz) and LaTeX formats.
|
boolean |
isDumpAutomataWithSourceSections() |
boolean |
isGenerateDFAImmediately()
Generate DFA matchers immediately after parsing the expression.
|
boolean |
isIgnoreAtomicGroups()
Ignore atomic groups (found e.g.
|
boolean |
isMustAdvance()
Do not return zero-width matches at the beginning of the search string.
|
boolean |
isRegressionTestMode() |
boolean |
isStepExecution()
Trace the execution of automata in JSON files.
|
boolean |
isU180EWhitespace() |
boolean |
isUTF16ExplodeAstralSymbols()
Explode astral symbols (
0x10000 - 0x10FFFF) into sub-automata where every state
matches one char as opposed to one code point. |
boolean |
isValidate()
Do not generate an actual regular expression matcher, just check the given regular expression
for syntax errors.
|
String |
toString() |
RegexOptions |
withBooleanMatch() |
RegexOptions |
withEncoding(Encodings.Encoding newEnc) |
RegexOptions |
withoutBooleanMatch() |
RegexOptions |
withoutPythonMethod() |
public static final String U180E_WHITESPACE_NAME
public static final String REGRESSION_TEST_MODE_NAME
public static final String DUMP_AUTOMATA_NAME
public static final String STEP_EXECUTION_NAME
public static final String ALWAYS_EAGER_NAME
public static final String UTF_16_EXPLODE_ASTRAL_SYMBOLS_NAME
public static final String VALIDATE_NAME
public static final String IGNORE_ATOMIC_GROUPS_NAME
public static final String MUST_ADVANCE_NAME
public static final String FLAVOR_NAME
public static final String FLAVOR_PYTHON
public static final String FLAVOR_PYTHON_STR
public static final String FLAVOR_PYTHON_BYTES
public static final String FLAVOR_RUBY
public static final String FLAVOR_ECMASCRIPT
public static final String ENCODING_NAME
public static final String PYTHON_METHOD_NAME
public static final String PYTHON_METHOD_SEARCH
public static final String PYTHON_METHOD_MATCH
public static final String PYTHON_METHOD_FULLMATCH
public static final RegexOptions DEFAULT
public static RegexOptions.Builder builder(com.oracle.truffle.api.source.Source source, String sourceString)
public boolean isU180EWhitespace()
public boolean isRegressionTestMode()
public boolean isDumpAutomata()
public boolean isDumpAutomataWithSourceSections()
public boolean isStepExecution()
public boolean isGenerateDFAImmediately()
public boolean isBooleanMatch()
public boolean isAlwaysEager()
public boolean isUTF16ExplodeAstralSymbols()
0x10000 - 0x10FFFF) into sub-automata where every state
matches one char as opposed to one code point.public boolean isValidate()
public boolean isIgnoreAtomicGroups()
public boolean isMustAdvance()
public RegexFlavor getFlavor()
public Encodings.Encoding getEncoding()
public PythonMethod getPythonMethod()
public RegexOptions withEncoding(Encodings.Encoding newEnc)
public RegexOptions withoutPythonMethod()
public RegexOptions withBooleanMatch()
public RegexOptions withoutBooleanMatch()