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
FieldsModifier and TypeFieldDescriptionprotected final byte[]
protected final org.jcodings.Encoding
protected final int
static final int
(package private) int
private byte[]
static final int
(package private) int
protected int
protected int
protected int
protected int
protected int
protected final Region
protected int
protected final Regex
protected final int
Fields inherited from class org.jcodings.IntHolder
value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate final boolean
backwardSearchRange
(byte[] bytes, int str, int end, int s, int range, int adjrange) private final void
debugBackwardSearchRange
(int str, int low, int high) private final void
debugForwardSearchRange
(int str, int end, int s, int range) private final void
debugForwardSearchRangeSuccess
(int str, int low, int high) private final void
debugSearch
(int str, int end, int start, int range) (package private) static void
debugSearch
(String name, int textP, int textEnd, int textRange) private final boolean
endBuf
(int start, int range, int minSemiEnd, int maxSemiEnd) private final boolean
forwardSearchRange
(byte[] bytes, int str, int end, int s, int range, org.jcodings.IntHolder lowPrev) final int
getBegin()
final Region
final int
getEnd()
final Region
protected final byte[]
icbuf()
abstract void
(package private) static boolean
isMbcAsciiWord
(org.jcodings.Encoding enc, byte[] bytes, int p, int end) private final int
match
(int s) final int
match
(int at, int range, int option) protected abstract int
matchAt
(int range, int sstart, int sprev, boolean interrupt) private boolean
matchCheck
(int upperRange, int s, int prev, boolean interrupt) private final int
matchCommon
(int at, int range, int option, boolean interrupt) final int
matchInterruptible
(int at, int range, int option) private final int
mismatch()
protected final void
msaInit
(int option, int start) final int
search
(int start, int range, int option) private final int
searchCommon
(int start, int range, int option, boolean interrupt) final int
searchInterruptible
(int start, int range, int option) protected abstract void
protected abstract void
stateCheckBuffInit
(int strLength, int offset, int stateNum)
-
Field Details
-
FAILED
public static final int FAILED- See Also:
-
INTERRUPTED
public static final int INTERRUPTED- See Also:
-
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
-
msaBestLen
protected int msaBestLen -
msaBestS
protected int msaBestS -
msaBegin
protected int msaBegin -
msaEnd
protected int msaEnd -
low
int low -
high
int high -
icbuf
private byte[] icbuf
-
-
Constructor Details
-
Matcher
-
-
Method Details
-
matchAt
protected abstract int matchAt(int range, int sstart, int sprev, boolean interrupt) throws InterruptedException - Throws:
InterruptedException
-
stateCheckBuffInit
protected abstract void stateCheckBuffInit(int strLength, int offset, int stateNum) -
stateCheckBuffClear
protected abstract void stateCheckBuffClear() -
interrupt
public abstract void interrupt() -
getRegion
-
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
- Throws:
InterruptedException
-
matchCommon
private final int matchCommon(int at, int range, int option, boolean interrupt) throws InterruptedException - Throws:
InterruptedException
-
forwardSearchRange
private final boolean forwardSearchRange(byte[] bytes, int str, int end, int s, int range, org.jcodings.IntHolder lowPrev) -
backwardSearchRange
private final boolean backwardSearchRange(byte[] bytes, int str, int end, int s, int range, int adjrange) -
matchCheck
private boolean matchCheck(int upperRange, int s, int prev, boolean interrupt) throws InterruptedException - Throws:
InterruptedException
-
search
public final int search(int start, int range, int option) -
searchInterruptible
- Throws:
InterruptedException
-
searchCommon
private final int searchCommon(int start, int range, int option, boolean interrupt) throws InterruptedException - Throws:
InterruptedException
-
endBuf
private final boolean endBuf(int start, int range, int minSemiEnd, int maxSemiEnd) -
match
private final int match(int s) -
mismatch
private final int mismatch() -
icbuf
protected final byte[] icbuf() -
isMbcAsciiWord
static boolean isMbcAsciiWord(org.jcodings.Encoding enc, byte[] bytes, int p, int end) -
debugForwardSearchRange
private final void debugForwardSearchRange(int str, int end, int s, int range) -
debugForwardSearchRangeSuccess
private final void debugForwardSearchRangeSuccess(int str, int low, int high) -
debugSearch
private final void debugSearch(int str, int end, int start, int range) -
debugBackwardSearchRange
private final void debugBackwardSearchRange(int str, int low, int high) -
debugSearch
-