Package net.sf.saxon.regex
Class RegexTranslator
java.lang.Object
net.sf.saxon.regex.RegexTranslator
- Direct Known Subclasses:
JDK15RegexTranslator
,SurrogateRegexTranslator
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 int
static final int
static final String
protected int
protected CharSequence
protected final FastStringBuffer
static final int
static final String
static final String
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 ranges) protected static boolean
isAsciiAlnum
(char c) protected static boolean
protected static boolean
isJavaMetaChar
(int c) protected static String
lowSurrogateRanges
(List ranges) protected RegexSyntaxException
makeException
(String key) protected RegexSyntaxException
makeException
(String key, String arg) protected CharSequence
protected void
recede()
protected static void
sortRangeList
(List ranges) protected abstract boolean
protected void
protected void
protected void
protected void
protected void
-
Field Details
-
regExp
-
xmlVersion
protected int xmlVersion -
isXPath
protected boolean isXPath -
ignoreWhitespace
protected boolean ignoreWhitespace -
inCharClassExpr
protected boolean inCharClassExpr -
caseBlind
protected boolean caseBlind -
pos
protected int pos -
length
protected int length -
curChar
protected char curChar -
eos
protected boolean eos -
currentCapture
protected int currentCapture -
captures
-
result
-
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
- Throws:
RegexSyntaxException
-
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
-
sortRangeList
-
isBlock
-
isAsciiAlnum
protected static boolean isAsciiAlnum(char c)
-