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 classA Range represents a range of consecutive Unicode codepoints -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected IntHashSetprotected booleanprotected charprotected intprotected booleanprotected booleanprotected booleanprotected booleanprotected intstatic final intstatic final Stringprotected intprotected CharSequenceprotected final FastStringBufferstatic final intstatic final Stringstatic final Stringprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected voidadvance()protected voidprotected voidexpect(char c) protected static StringhighSurrogateRanges(List ranges) protected static booleanisAsciiAlnum(char c) protected static booleanprotected static booleanisJavaMetaChar(int c) protected static StringlowSurrogateRanges(List ranges) protected RegexSyntaxExceptionmakeException(String key) protected RegexSyntaxExceptionmakeException(String key, String arg) protected CharSequenceprotected voidrecede()protected static voidsortRangeList(List ranges) protected abstract booleanprotected voidprotected voidprotected voidprotected voidprotected 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)
-