public class RECompiler
extends java.lang.Object
REMatcher
Constructor and Description |
---|
RECompiler()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
REProgram |
compile(UnicodeString pattern)
Compiles a regular expression pattern into a program runnable by the pattern
matcher class 'RE'.
|
java.util.List<java.lang.String> |
getWarnings()
On completion of compilation, get any warnings that were generated
|
static CharacterClass |
makeComplement(CharacterClass p1)
Make the complement of an IntPredicate (matches if p1 does not match)
|
static CharacterClass |
makeDifference(CharacterClass p1,
CharacterClass p2)
Make the difference of two IntPredicates (matches if p1 matches and p2 does not match)
|
static CharacterClass |
makeUnion(CharacterClass p1,
CharacterClass p2)
Make the union of two IntPredicates (matches if p1 matches or p2 matches)
|
void |
setFlags(REFlags flags)
Set the regular expression flags to be used
|
public RECompiler()
public void setFlags(REFlags flags)
flags
- the regular expression flagspublic java.util.List<java.lang.String> getWarnings()
public static CharacterClass makeUnion(CharacterClass p1, CharacterClass p2)
p1
- the firstp2
- the secondpublic static CharacterClass makeDifference(CharacterClass p1, CharacterClass p2)
p1
- the firstp2
- the secondpublic static CharacterClass makeComplement(CharacterClass p1)
p1
- the operandpublic REProgram compile(UnicodeString pattern) throws RESyntaxException
pattern
- Regular expression pattern to compile (see RECompiler class
for details).RESyntaxException
- Thrown if the regular expression has invalid syntax.RECompiler
,
REMatcher
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.