public abstract class Matcher
extends org.jcodings.IntHolder
Modifier and Type | Field and Description |
---|---|
protected byte[] |
bytes |
protected org.jcodings.Encoding |
enc |
protected int |
end |
static int |
FAILED |
(package private) int |
high |
private byte[] |
icbuf |
static int |
INTERRUPTED |
(package private) int |
low |
protected int |
msaBegin |
protected int |
msaBestLen |
protected int |
msaBestS |
protected int |
msaEnd |
protected int |
msaGpos |
protected int |
msaOptions |
protected Region |
msaRegion |
protected int |
msaStart |
protected Regex |
regex |
protected int |
str |
Constructor and Description |
---|
Matcher(Regex regex,
Region region,
byte[] bytes,
int p,
int end) |
Modifier and Type | Method and Description |
---|---|
private boolean |
backwardSearchRange(byte[] bytes,
int str,
int end,
int s,
int range,
int adjrange) |
private void |
debugBackwardSearchRange(int str,
int low,
int high) |
private void |
debugForwardSearchRange(int str,
int end,
int s,
int range) |
private void |
debugForwardSearchRangeSuccess(int str,
int low,
int high) |
private void |
debugSearch(int str,
int end,
int start,
int range) |
(package private) static void |
debugSearch(java.lang.String name,
int textP,
int textEnd,
int textRange) |
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() |
protected byte[] |
icbuf() |
abstract void |
interrupt() |
(package private) static boolean |
isMbcAsciiWord(org.jcodings.Encoding enc,
byte[] bytes,
int p,
int end) |
private int |
match(int s) |
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 int |
matchCommon(int at,
int range,
int option,
boolean interrupt) |
int |
matchInterruptible(int at,
int range,
int option) |
private int |
mismatch() |
protected void |
msaInit(int option,
int start,
int gpos) |
int |
search(int start,
int range,
int option) |
int |
search(int gpos,
int start,
int range,
int option) |
private int |
searchCommon(int gpos,
int start,
int range,
int option,
boolean interrupt) |
int |
searchInterruptible(int start,
int range,
int option) |
int |
searchInterruptible(int gpos,
int start,
int range,
int option) |
protected abstract void |
stateCheckBuffClear() |
protected abstract void |
stateCheckBuffInit(int strLength,
int offset,
int stateNum) |
public static final int FAILED
public static final int INTERRUPTED
protected final Regex regex
protected final org.jcodings.Encoding enc
protected final byte[] bytes
protected final int str
protected final int end
protected int msaStart
protected int msaOptions
protected final Region msaRegion
protected int msaBestLen
protected int msaBestS
protected int msaGpos
protected int msaBegin
protected int msaEnd
int low
int high
private byte[] icbuf
protected abstract int matchAt(int range, int sstart, int sprev, boolean interrupt) throws java.lang.InterruptedException
java.lang.InterruptedException
protected abstract void stateCheckBuffInit(int strLength, int offset, int stateNum)
protected abstract void stateCheckBuffClear()
public abstract void interrupt()
public final Region getRegion()
public final Region getEagerRegion()
public final int getBegin()
public final int getEnd()
protected final void msaInit(int option, int start, int gpos)
public final int match(int at, int range, int option)
public final int matchInterruptible(int at, int range, int option) throws java.lang.InterruptedException
java.lang.InterruptedException
private final int matchCommon(int at, int range, int option, boolean interrupt) throws java.lang.InterruptedException
java.lang.InterruptedException
private final boolean forwardSearchRange(byte[] bytes, int str, int end, int s, int range, org.jcodings.IntHolder lowPrev)
private final boolean backwardSearchRange(byte[] bytes, int str, int end, int s, int range, int adjrange)
private boolean matchCheck(int upperRange, int s, int prev, boolean interrupt) throws java.lang.InterruptedException
java.lang.InterruptedException
public final int search(int start, int range, int option)
public final int search(int gpos, int start, int range, int option)
public final int searchInterruptible(int start, int range, int option) throws java.lang.InterruptedException
java.lang.InterruptedException
public final int searchInterruptible(int gpos, int start, int range, int option) throws java.lang.InterruptedException
java.lang.InterruptedException
private final int searchCommon(int gpos, int start, int range, int option, boolean interrupt) throws java.lang.InterruptedException
java.lang.InterruptedException
private final boolean endBuf(int start, int range, int minSemiEnd, int maxSemiEnd)
private final int match(int s)
private final int mismatch()
protected final byte[] icbuf()
static boolean isMbcAsciiWord(org.jcodings.Encoding enc, byte[] bytes, int p, int end)
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)
private final void debugBackwardSearchRange(int str, int low, int high)
static void debugSearch(java.lang.String name, int textP, int textEnd, int textRange)