public class RegexEngine extends AbstractConstantKeysObject
RegexEngine is an executable TruffleObject that compiles regular expressions and
packages the results in RegexObjects. It takes the following arguments:
String pattern: the source of the regular expression to be compiledString flags (optional): a textual representation of the flags to be passed
to the compiler (one letter per flag), see RegexFlags for the supported flagsRegexEngine can also lead to the following exceptions:
RegexSyntaxException: if the input regular expression is malformedUnsupportedRegexException: if the input regular expression cannot be compiled by this
engine
A RegexEngine can be obtained by executing the RegexEngineBuilder.
| Modifier and Type | Class and Description |
|---|---|
static class |
RegexEngine.ValidateMethod |
AbstractConstantKeysObject.IsReadableCacheNode, AbstractConstantKeysObject.ReadCacheNode| Constructor and Description |
|---|
RegexEngine(RegexCompiler compiler,
RegexOptions options) |
| Modifier and Type | Method and Description |
|---|---|
RegexObject |
compile(RegexSource regexSource) |
TruffleReadOnlyKeysArray |
getKeys() |
boolean |
isExecutable() |
Object |
readMemberImpl(String symbol) |
getMembers, hasMembers, isMemberReadable, readMemberpublic RegexEngine(RegexCompiler compiler, RegexOptions options)
public RegexObject compile(RegexSource regexSource) throws RegexSyntaxException, UnsupportedRegexException
public TruffleReadOnlyKeysArray getKeys()
getKeys in class AbstractConstantKeysObjectpublic Object readMemberImpl(String symbol) throws com.oracle.truffle.api.interop.UnknownIdentifierException
readMemberImpl in class AbstractConstantKeysObjectcom.oracle.truffle.api.interop.UnknownIdentifierExceptionpublic boolean isExecutable()