Package net.sf.saxon.functions.regex
Class RegexTranslator
java.lang.Object
net.sf.saxon.functions.regex.RegexTranslator
- Direct Known Subclasses:
JDK15RegexTranslator
Abstract superclass for the various regex translators, which differ according to the target platform.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A Range represents a range of consecutive Unicode codepoints -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected IntHashSet
protected boolean
protected char
protected int
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected int
static final int
static final String
protected int
protected CharSequence
protected final FastStringBuffer
static final int
static final String
static final String
protected List<RegexSyntaxException>
protected int
protected int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
protected void
advance()
protected void
protected void
expect
(char c) protected static String
highSurrogateRanges
(List<RegexTranslator.Range> ranges) protected static boolean
isAsciiAlnum
(char c) protected static boolean
isJavaMetaChar
(int c) protected static String
lowSurrogateRanges
(List<RegexTranslator.Range> ranges) protected RegexSyntaxException
makeException
(String key) protected RegexSyntaxException
makeException
(String key, String arg) protected CharSequence
protected void
recede()
protected abstract boolean
If what follows is an Atom, translate it and return true; otherwise return falseprotected void
protected void
protected void
protected void
protected void
-
Field Details
-
regExp
-
xmlVersion
protected int xmlVersion -
xsdVersion
protected int xsdVersion -
isXPath
protected boolean isXPath -
isXPath30
protected boolean isXPath30 -
ignoreWhitespace
protected boolean ignoreWhitespace -
inCharClassExpr
protected boolean inCharClassExpr -
caseBlind
protected boolean caseBlind -
expandComplementBlockNames
protected boolean expandComplementBlockNames -
pos
protected int pos -
length
protected int length -
curChar
protected char curChar -
eos
protected boolean eos -
currentCapture
protected int currentCapture -
captures
-
result
-
warnings
-
NONE
public static final int NONE- See Also:
-
SOME
public static final int SOME- See Also:
-
ALL
public static final int ALL- See Also:
-
SURROGATES1_CLASS
- See Also:
-
SURROGATES2_CLASS
- See Also:
-
NOT_ALLOWED_CLASS
- See Also:
-
-
Constructor Details
-
RegexTranslator
public RegexTranslator()
-
-
Method Details
-
translateTop
- Throws:
RegexSyntaxException
-
translateRegExp
- Throws:
RegexSyntaxException
-
translateBranch
- Throws:
RegexSyntaxException
-
translateAtom
If what follows is an Atom, translate it and return true; otherwise return false- Returns:
- true if we found an atom
- Throws:
RegexSyntaxException
- if the regex syntax is incorrect
-
translateQuantifier
- Throws:
RegexSyntaxException
-
translateQuantity
- Throws:
RegexSyntaxException
-
parseQuantExact
- Throws:
RegexSyntaxException
-
copyCurChar
protected void copyCurChar() -
advance
protected void advance() -
absorbSurrogatePair
- Throws:
RegexSyntaxException
-
recede
protected void recede() -
expect
- Throws:
RegexSyntaxException
-
makeException
-
makeException
-
isJavaMetaChar
protected static boolean isJavaMetaChar(int c) -
highSurrogateRanges
-
lowSurrogateRanges
-
isAsciiAlnum
protected static boolean isAsciiAlnum(char c)
-