org.joni
Class ByteCodeMachine

java.lang.Object
  extended by org.jcodings.IntHolder
      extended by org.joni.Matcher
          extended by org.joni.StackMachine
              extended by org.joni.ByteCodeMachine
All Implemented Interfaces:
StackType

 class ByteCodeMachine
extends StackMachine


Field Summary
private  int bestLen
           
private  byte[] cfbuf
           
private  byte[] cfbuf2
           
private  int[] code
           
private static int INTERRUPT_CHECK_EVERY
           
(package private)  int interruptCheckCounter
           
private  int ip
           
private  int range
           
private  int s
           
private  int sbegin
           
private  int sprev
           
private  int sstart
           
protected  int stkp
           
 
Fields inherited from class org.joni.StackMachine
INVALID_INDEX, memEndStk, memStartStk, repeatStk, stack, stacks, stateCheckBuff, stateCheckBuffSize, stk
 
Fields inherited from class org.joni.Matcher
bytes, enc, end, FAILED, high, INTERRUPTED, low, msaBegin, msaBestLen, msaBestS, msaEnd, msaOptions, msaRegion, msaStart, regex, str
 
Fields inherited from class org.jcodings.IntHolder
value
 
Fields inherited from interface org.joni.constants.StackType
ALT, CALL_FRAME, INVALID_STACK_INDEX, LOOK_BEHIND_NOT, MASK_MEM_END_OR_MARK, MASK_POP_USED, MASK_TO_VOID_TARGET, MEM_END, MEM_END_MARK, MEM_START, NULL_CHECK_END, NULL_CHECK_START, POS, POS_NOT, REPEAT, REPEAT_INC, RETURN, STATE_CHECK_MARK, STOP_BT, VOID
 
Constructor Summary
ByteCodeMachine(Regex regex, byte[] bytes, int p, int end)
           
 
Method Summary
private  void backref(int mem)
           
private  int backrefEnd(int mem)
           
private  boolean backrefInvalid(int mem)
           
private  boolean backrefMatchAtNestedLevel(boolean ignoreCase, int caseFoldFlag, int nest, int memNum, int memp)
           
private  int backrefStart(int mem)
           
protected  byte[] cfbuf()
           
protected  byte[] cfbuf2()
           
private  void checkCaptureHistory(Region region)
           
private  void debugMatchBegin()
           
private  void debugMatchLoop()
           
private  boolean endBestLength()
           
private  int finish()
           
private  boolean isInBitSet()
           
private  boolean isInClassMB()
           
private  boolean isNotInClassMB()
           
private  boolean makeCaptureHistoryTree(CaptureTreeNode node)
           
protected  int matchAt(int range, int sstart, int sprev)
           
private  boolean memIsInMemp(int mem, int num, int memp)
           
private  void nullCheckFound()
           
private  void opAnyChar()
           
private  void opAnyCharML()
           
private  void opAnyCharMLSb()
           
private  void opAnyCharMLStar()
           
private  void opAnyCharMLStarPeekNext()
           
private  void opAnyCharMLStarPeekNextSb()
           
private  void opAnyCharMLStarSb()
           
private  void opAnyCharSb()
           
private  void opAnyCharStar()
           
private  void opAnyCharStarPeekNext()
           
private  void opAnyCharStarPeekNextSb()
           
private  void opAnyCharStarSb()
           
private  void opBackRef1()
           
private  void opBackRef2()
           
private  void opBackRefAtLevel()
           
private  void opBackRefMulti()
           
private  void opBackRefMultiIC()
           
private  void opBackRefN()
           
private  void opBackRefNIC()
           
private  void opBeginBuf()
           
private  void opBeginLine()
           
private  void opBeginPosition()
           
private  void opCall()
           
private  void opCClass()
           
private  void opCClassMB()
           
private  void opCClassMBNot()
           
private  void opCClassMIX()
           
private  void opCClassMIXNot()
           
private  void opCClassNode()
           
private  void opCClassNot()
           
private  void opCClassNotSb()
           
private  void opCClassSb()
           
private  boolean opEnd()
           
private  void opEndBuf()
           
private  void opEndLine()
           
private  void opExact1()
           
private  void opExact1IC()
           
private  void opExact1ICSb()
           
private  void opExact2()
           
private  void opExact3()
           
private  void opExact4()
           
private  void opExact5()
           
private  void opExactMB2N()
           
private  void opExactMB2N1()
           
private  void opExactMB2N2()
           
private  void opExactMB2N3()
           
private  void opExactMB3N()
           
private  void opExactMBN()
           
private  void opExactN()
           
private  void opExactNIC()
           
private  void opExactNICSb()
           
private  void opFail()
           
private  void opFailLookBehindNot()
           
private  void opFailPos()
           
private  void opJump()
           
private  void opLookBehind()
           
private  void opLookBehindSb()
           
private  void opMemoryEnd()
           
private  void opMemoryEndPush()
           
private  void opMemoryEndPushRec()
           
private  void opMemoryEndRec()
           
private  void opMemoryStart()
           
private  void opMemoryStartPush()
           
private  void opNotWord()
           
private  void opNotWordBound()
           
private  void opNotWordBoundSb()
           
private  void opNotWordSb()
           
private  void opNullCheckEnd()
           
private  void opNullCheckEndMemST()
           
private  void opNullCheckEndMemSTPush()
           
private  void opNullCheckStart()
           
private  void opPop()
           
private  void opPopPos()
           
private  void opPopStopBT()
           
private  void opPush()
           
private  void opPushIfPeekNext()
           
private  void opPushLookBehindNot()
           
private  void opPushOrJumpExact1()
           
private  void opPushPos()
           
private  void opPushPosNot()
           
private  void opPushStopBT()
           
private  void opRepeat()
           
private  void opRepeatInc()
           
private  void opRepeatIncNG()
           
private  void opRepeatIncNGSG()
           
private  void opRepeatIncSG()
           
private  void opRepeatNG()
           
private  void opReturn()
           
private  void opSemiEndBuf()
           
private  void opSetOption()
           
private  void opSetOptionPush()
           
private  void opStateCheck()
           
private  void opStateCheckAnyCharMLStar()
           
private  void opStateCheckAnyCharMLStarSb()
           
private  void opStateCheckAnyCharStar()
           
private  void opStateCheckAnyCharStarSb()
           
private  void opStateCheckPush()
           
private  void opStateCheckPushOrJump()
           
private  void opWord()
           
private  void opWordBegin()
           
private  void opWordBeginSb()
           
private  void opWordBound()
           
private  void opWordBoundSb()
           
private  void opWordEnd()
           
private  void opWordEndSb()
           
private  void opWordSb()
           
private  void repeatInc(int mem, int si)
           
private  void repeatIncNG(int mem, int si)
           
private  boolean stringCmpIC(int caseFlodFlag, int s1, org.jcodings.IntHolder ps2, int mbLen, int textEnd)
           
 
Methods inherited from class org.joni.StackMachine
ensure1, getMemStart, getRepeat, init, nullCheck, nullCheckMemSt, nullCheckMemStRec, nullCheckRec, pop, popOne, popTilLookBehindNot, popTilPosNot, posEnd, pushAlt, pushAltWithStateCheck, pushCallFrame, pushEnsured, pushLookBehindNot, pushMemEnd, pushMemEndMark, pushMemStart, pushNullCheckEnd, pushNullCheckStart, pushPos, pushPosNot, pushRepeat, pushRepeatInc, pushReturn, pushStateCheck, pushStopBT, pushType, sreturn, stateCheckBuffClear, stateCheckBuffInit, stateCheckVal, stopBtEnd
 
Methods inherited from class org.joni.Matcher
getBegin, getEagerRegion, getEnd, getRegion, match, matchInterruptible, msaInit, search, searchInterruptible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTERRUPT_CHECK_EVERY

private static final int INTERRUPT_CHECK_EVERY
See Also:
Constant Field Values

interruptCheckCounter

int interruptCheckCounter

bestLen

private int bestLen

s

private int s

range

private int range

sprev

private int sprev

sstart

private int sstart

sbegin

private int sbegin

code

private final int[] code

ip

private int ip

stkp

protected int stkp

cfbuf

private byte[] cfbuf

cfbuf2

private byte[] cfbuf2
Constructor Detail

ByteCodeMachine

ByteCodeMachine(Regex regex,
                byte[] bytes,
                int p,
                int end)
Method Detail

makeCaptureHistoryTree

private boolean makeCaptureHistoryTree(CaptureTreeNode node)

checkCaptureHistory

private void checkCaptureHistory(Region region)

cfbuf

protected final byte[] cfbuf()

cfbuf2

protected final byte[] cfbuf2()

stringCmpIC

private boolean stringCmpIC(int caseFlodFlag,
                            int s1,
                            org.jcodings.IntHolder ps2,
                            int mbLen,
                            int textEnd)

debugMatchBegin

private void debugMatchBegin()

debugMatchLoop

private void debugMatchLoop()

matchAt

protected final int matchAt(int range,
                            int sstart,
                            int sprev)
                     throws InterruptedException
Specified by:
matchAt in class Matcher
Throws:
InterruptedException

opEnd

private boolean opEnd()

endBestLength

private boolean endBestLength()

opExact1

private void opExact1()

opExact2

private void opExact2()

opExact3

private void opExact3()

opExact4

private void opExact4()

opExact5

private void opExact5()

opExactN

private void opExactN()

opExactMB2N1

private void opExactMB2N1()

opExactMB2N2

private void opExactMB2N2()

opExactMB2N3

private void opExactMB2N3()

opExactMB2N

private void opExactMB2N()

opExactMB3N

private void opExactMB3N()

opExactMBN

private void opExactMBN()

opExact1IC

private void opExact1IC()

opExact1ICSb

private void opExact1ICSb()

opExactNIC

private void opExactNIC()

opExactNICSb

private void opExactNICSb()

isInBitSet

private boolean isInBitSet()

opCClass

private void opCClass()

opCClassSb

private void opCClassSb()

isInClassMB

private boolean isInClassMB()

opCClassMB

private void opCClassMB()

opCClassMIX

private void opCClassMIX()

opCClassNot

private void opCClassNot()

opCClassNotSb

private void opCClassNotSb()

isNotInClassMB

private boolean isNotInClassMB()

opCClassMBNot

private void opCClassMBNot()

opCClassMIXNot

private void opCClassMIXNot()

opCClassNode

private void opCClassNode()

opAnyChar

private void opAnyChar()

opAnyCharSb

private void opAnyCharSb()

opAnyCharML

private void opAnyCharML()

opAnyCharMLSb

private void opAnyCharMLSb()

opAnyCharStar

private void opAnyCharStar()

opAnyCharStarSb

private void opAnyCharStarSb()

opAnyCharMLStar

private void opAnyCharMLStar()

opAnyCharMLStarSb

private void opAnyCharMLStarSb()

opAnyCharStarPeekNext

private void opAnyCharStarPeekNext()

opAnyCharStarPeekNextSb

private void opAnyCharStarPeekNextSb()

opAnyCharMLStarPeekNext

private void opAnyCharMLStarPeekNext()

opAnyCharMLStarPeekNextSb

private void opAnyCharMLStarPeekNextSb()

opStateCheckAnyCharStar

private void opStateCheckAnyCharStar()

opStateCheckAnyCharStarSb

private void opStateCheckAnyCharStarSb()

opStateCheckAnyCharMLStar

private void opStateCheckAnyCharMLStar()

opStateCheckAnyCharMLStarSb

private void opStateCheckAnyCharMLStarSb()

opWord

private void opWord()

opWordSb

private void opWordSb()

opNotWord

private void opNotWord()

opNotWordSb

private void opNotWordSb()

opWordBound

private void opWordBound()

opWordBoundSb

private void opWordBoundSb()

opNotWordBound

private void opNotWordBound()

opNotWordBoundSb

private void opNotWordBoundSb()

opWordBegin

private void opWordBegin()

opWordBeginSb

private void opWordBeginSb()

opWordEnd

private void opWordEnd()

opWordEndSb

private void opWordEndSb()

opBeginBuf

private void opBeginBuf()

opEndBuf

private void opEndBuf()

opBeginLine

private void opBeginLine()

opEndLine

private void opEndLine()

opSemiEndBuf

private void opSemiEndBuf()

opBeginPosition

private void opBeginPosition()

opMemoryStartPush

private void opMemoryStartPush()

opMemoryStart

private void opMemoryStart()

opMemoryEndPush

private void opMemoryEndPush()

opMemoryEnd

private void opMemoryEnd()

opMemoryEndPushRec

private void opMemoryEndPushRec()

opMemoryEndRec

private void opMemoryEndRec()

backrefInvalid

private boolean backrefInvalid(int mem)

backrefStart

private int backrefStart(int mem)

backrefEnd

private int backrefEnd(int mem)

backref

private void backref(int mem)

opBackRef1

private void opBackRef1()

opBackRef2

private void opBackRef2()

opBackRefN

private void opBackRefN()

opBackRefNIC

private void opBackRefNIC()

opBackRefMulti

private void opBackRefMulti()

opBackRefMultiIC

private void opBackRefMultiIC()

memIsInMemp

private boolean memIsInMemp(int mem,
                            int num,
                            int memp)

backrefMatchAtNestedLevel

private boolean backrefMatchAtNestedLevel(boolean ignoreCase,
                                          int caseFoldFlag,
                                          int nest,
                                          int memNum,
                                          int memp)

opBackRefAtLevel

private void opBackRefAtLevel()

opSetOptionPush

private void opSetOptionPush()

opSetOption

private void opSetOption()

opNullCheckStart

private void opNullCheckStart()

nullCheckFound

private void nullCheckFound()

opNullCheckEnd

private void opNullCheckEnd()

opNullCheckEndMemST

private void opNullCheckEndMemST()

opNullCheckEndMemSTPush

private void opNullCheckEndMemSTPush()

opJump

private void opJump()

opPush

private void opPush()

opStateCheckPush

private void opStateCheckPush()

opStateCheckPushOrJump

private void opStateCheckPushOrJump()

opStateCheck

private void opStateCheck()

opPop

private void opPop()

opPushOrJumpExact1

private void opPushOrJumpExact1()

opPushIfPeekNext

private void opPushIfPeekNext()

opRepeat

private void opRepeat()

opRepeatNG

private void opRepeatNG()

repeatInc

private void repeatInc(int mem,
                       int si)

opRepeatInc

private void opRepeatInc()

opRepeatIncSG

private void opRepeatIncSG()

repeatIncNG

private void repeatIncNG(int mem,
                         int si)

opRepeatIncNG

private void opRepeatIncNG()

opRepeatIncNGSG

private void opRepeatIncNGSG()

opPushPos

private void opPushPos()

opPopPos

private void opPopPos()

opPushPosNot

private void opPushPosNot()

opFailPos

private void opFailPos()

opPushStopBT

private void opPushStopBT()

opPopStopBT

private void opPopStopBT()

opLookBehind

private void opLookBehind()

opLookBehindSb

private void opLookBehindSb()

opPushLookBehindNot

private void opPushLookBehindNot()

opFailLookBehindNot

private void opFailLookBehindNot()

opCall

private void opCall()

opReturn

private void opReturn()

opFail

private void opFail()

finish

private int finish()


Copyright © 2013. All Rights Reserved.