RegexEngineBuilder is the entry point into using
RegexLanguage. It is an
executable
TruffleObject that configures and returns a
RegexEngine. When
executing a
RegexEngineBuilder, it accepts the following arguments:
String options (optional): a comma-separated list of options for the engine,
the currently supported options include:
Flavor: the flavor of regular expressions to support
ECMAScript (default): regular expressions as provided by RegExp objects in ECMAScript
PythonStr: regular expressions as provided by the re module in Python when
compiling str-based regular expressions
PythonBytes: regular expressions as provided by the re module in Python when
compiling bytes-based regular expressions
U180EWhitespace: the U+180E Unicode character (MONGOLIAN VOWEL SEPARATOR) is to be
treated as whitespace (Unicode versions before 6.3.0)
RegressionTestMode: all compilation is done eagerly, so as to detect errors early
during testing
DumpAutomata: ASTs and automata are dumped in JSON, DOT (GraphViz) and LaTeX formats
StepExecution: the execution of automata is traced and logged in JSON files
AlwaysEager: capture groups are always eagerly matched
RegexCompiler fallbackCompiler (optional): an optional RegexCompiler
to be used when compilation by TRegexCompiler, the native compiler of
RegexLanguage, fails with an UnsupportedRegexException; fallbackCompiler
does not have to be an instance of RegexCompiler, it can also be a TruffleObject
with the same interop semantics as RegexCompiler