net.sf.saxon.regex

Class RegexTranslator

public abstract class RegexTranslator extends Object

Abstract superclass for the various regex translators, which differ according to the target platform.
Nested Class Summary
static classRegexTranslator.Range
A Range represents a range of consecutive Unicode codepoints
Field Summary
static intALL
protected IntHashSetcaptures
protected booleancaseBlind
protected charcurChar
protected intcurrentCapture
protected booleaneos
protected booleanignoreWhitespace
protected booleaninCharClassExpr
protected booleanisXPath
protected intlength
static intNONE
static StringNOT_ALLOWED_CLASS
protected intpos
protected CharSequenceregExp
protected FastStringBufferresult
static intSOME
static StringSURROGATES1_CLASS
static StringSURROGATES2_CLASS
protected intxmlVersion
Method Summary
protected intabsorbSurrogatePair()
protected voidadvance()
protected voidcopyCurChar()
protected voidexpect(char c)
protected static StringhighSurrogateRanges(List ranges)
protected static booleanisAsciiAlnum(char c)
protected static booleanisBlock(String name)
protected static booleanisJavaMetaChar(int c)
protected static StringlowSurrogateRanges(List ranges)
protected RegexSyntaxExceptionmakeException(String key)
protected RegexSyntaxExceptionmakeException(String key, String arg)
protected CharSequenceparseQuantExact()
protected voidrecede()
protected static voidsortRangeList(List ranges)
protected abstract booleantranslateAtom()
protected voidtranslateBranch()
protected voidtranslateQuantifier()
protected voidtranslateQuantity()
protected voidtranslateRegExp()
protected voidtranslateTop()

Field Detail

ALL

public static final int ALL

captures

protected IntHashSet captures

caseBlind

protected boolean caseBlind

curChar

protected char curChar

currentCapture

protected int currentCapture

eos

protected boolean eos

ignoreWhitespace

protected boolean ignoreWhitespace

inCharClassExpr

protected boolean inCharClassExpr

isXPath

protected boolean isXPath

length

protected int length

NONE

public static final int NONE

NOT_ALLOWED_CLASS

public static final String NOT_ALLOWED_CLASS

pos

protected int pos

regExp

protected CharSequence regExp

result

protected final FastStringBuffer result

SOME

public static final int SOME

SURROGATES1_CLASS

public static final String SURROGATES1_CLASS

SURROGATES2_CLASS

public static final String SURROGATES2_CLASS

xmlVersion

protected int xmlVersion

Method Detail

absorbSurrogatePair

protected int absorbSurrogatePair()

advance

protected void advance()

copyCurChar

protected void copyCurChar()

expect

protected void expect(char c)

highSurrogateRanges

protected static String highSurrogateRanges(List ranges)

isAsciiAlnum

protected static boolean isAsciiAlnum(char c)

isBlock

protected static boolean isBlock(String name)

isJavaMetaChar

protected static boolean isJavaMetaChar(int c)

lowSurrogateRanges

protected static String lowSurrogateRanges(List ranges)

makeException

protected RegexSyntaxException makeException(String key)

makeException

protected RegexSyntaxException makeException(String key, String arg)

parseQuantExact

protected CharSequence parseQuantExact()

recede

protected void recede()

sortRangeList

protected static void sortRangeList(List ranges)

translateAtom

protected abstract boolean translateAtom()

translateBranch

protected void translateBranch()

translateQuantifier

protected void translateQuantifier()

translateQuantity

protected void translateQuantity()

translateRegExp

protected void translateRegExp()

translateTop

protected void translateTop()