Package org.joni
Class Matcher
- java.lang.Object
-
- org.jcodings.IntHolder
-
- org.joni.Matcher
-
- Direct Known Subclasses:
NativeMachine
,StackMachine
public abstract class Matcher extends org.jcodings.IntHolder
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
bytes
protected org.jcodings.Encoding
enc
protected int
end
static int
FAILED
(package private) int
high
static int
INTERRUPTED
(package private) int
low
protected int
msaBegin
protected int
msaBestLen
protected int
msaBestS
protected int
msaEnd
protected int
msaOptions
protected Region
msaRegion
protected int
msaStart
protected Regex
regex
protected int
str
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private boolean
backwardSearchRange(byte[] bytes, int str, int end, int s, int range, int adjrange)
private boolean
endBuf(int start, int range, int minSemiEnd, int maxSemiEnd)
private boolean
forwardSearchRange(byte[] bytes, int str, int end, int s, int range, org.jcodings.IntHolder lowPrev)
int
getBegin()
Region
getEagerRegion()
int
getEnd()
Region
getRegion()
private int
match(int s)
int
match(int at, int range, int option)
protected abstract int
matchAt(int range, int sstart, int sprev)
private boolean
matchCheck(int upperRange, int s, int prev)
int
matchInterruptible(int at, int range, int option)
private int
mismatch()
protected void
msaInit(int option, int start)
int
search(int start, int range, int option)
int
searchInterruptible(int start, int range, int option)
protected abstract void
stateCheckBuffClear()
protected abstract void
stateCheckBuffInit(int strLength, int offset, int stateNum)
-
-
-
Field Detail
-
FAILED
public static final int FAILED
- See Also:
- Constant Field Values
-
INTERRUPTED
public static final int INTERRUPTED
- See Also:
- Constant Field Values
-
regex
protected final Regex regex
-
enc
protected final org.jcodings.Encoding enc
-
bytes
protected final byte[] bytes
-
str
protected final int str
-
end
protected final int end
-
msaStart
protected int msaStart
-
msaOptions
protected int msaOptions
-
msaRegion
protected final Region msaRegion
-
msaBestLen
protected int msaBestLen
-
msaBestS
protected int msaBestS
-
msaBegin
protected int msaBegin
-
msaEnd
protected int msaEnd
-
low
int low
-
high
int high
-
-
Method Detail
-
matchAt
protected abstract int matchAt(int range, int sstart, int sprev) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
stateCheckBuffInit
protected abstract void stateCheckBuffInit(int strLength, int offset, int stateNum)
-
stateCheckBuffClear
protected abstract void stateCheckBuffClear()
-
getRegion
public final Region getRegion()
-
getEagerRegion
public final Region getEagerRegion()
-
getBegin
public final int getBegin()
-
getEnd
public final int getEnd()
-
msaInit
protected final void msaInit(int option, int start)
-
match
public final int match(int at, int range, int option)
-
matchInterruptible
public final int matchInterruptible(int at, int range, int option) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
forwardSearchRange
private boolean forwardSearchRange(byte[] bytes, int str, int end, int s, int range, org.jcodings.IntHolder lowPrev)
-
backwardSearchRange
private boolean backwardSearchRange(byte[] bytes, int str, int end, int s, int range, int adjrange)
-
matchCheck
private boolean matchCheck(int upperRange, int s, int prev) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
search
public final int search(int start, int range, int option)
-
searchInterruptible
public final int searchInterruptible(int start, int range, int option) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
endBuf
private boolean endBuf(int start, int range, int minSemiEnd, int maxSemiEnd)
-
match
private int match(int s)
-
mismatch
private int mismatch()
-
-