Package org.joni

Class ArrayCompiler

  • All Implemented Interfaces:
    org.jcodings.exception.ErrorMessages, ErrorMessages

    final class ArrayCompiler
    extends Compiler
    • Field Detail

      • code

        private int[] code
      • codeLength

        private int codeLength
      • templates

        private byte[][] templates
      • templateNum

        private int templateNum
      • QUANTIFIER_EXPAND_LIMIT_SIZE

        private static final int QUANTIFIER_EXPAND_LIMIT_SIZE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ArrayCompiler

        ArrayCompiler​(Analyser analyser)
    • Method Detail

      • prepare

        protected final void prepare()
        Specified by:
        prepare in class Compiler
      • finish

        protected final void finish()
        Specified by:
        finish in class Compiler
      • isNeedStrLenOpExact

        private boolean isNeedStrLenOpExact​(int op)
      • opTemplated

        private boolean opTemplated​(int op)
      • selectStrOpcode

        private int selectStrOpcode​(int mbLength,
                                    int strLength,
                                    boolean ignoreCase)
      • compileTreeEmptyCheck

        private void compileTreeEmptyCheck​(Node node,
                                           int emptyInfo)
      • addCompileStringlength

        private int addCompileStringlength​(byte[] bytes,
                                           int p,
                                           int mbLength,
                                           int strLength,
                                           boolean ignoreCase)
      • addCompileString

        protected final void addCompileString​(byte[] bytes,
                                              int p,
                                              int mbLength,
                                              int strLength,
                                              boolean ignoreCase)
        Specified by:
        addCompileString in class Compiler
      • compileLengthStringNode

        private int compileLengthStringNode​(Node node)
      • compileLengthStringRawNode

        private int compileLengthStringRawNode​(StringNode sn)
      • addMultiByteCClass

        private void addMultiByteCClass​(CodeRangeBuffer mbuf)
      • compileLengthCClassNode

        private int compileLengthCClassNode​(CClassNode cc)
      • entryRepeatRange

        private void entryRepeatRange​(int id,
                                      int lower,
                                      int upper)
      • compileRangeRepeatNode

        private void compileRangeRepeatNode​(QuantifierNode qn,
                                            int targetLen,
                                            int emptyInfo)
      • cknOn

        private static boolean cknOn​(int ckn)
      • compileCECLengthQuantifierNode

        private int compileCECLengthQuantifierNode​(QuantifierNode qn)
      • compileNonCECLengthQuantifierNode

        private int compileNonCECLengthQuantifierNode​(QuantifierNode qn)
      • compileLengthOptionNode

        private int compileLengthOptionNode​(EncloseNode node)
      • compileLengthEncloseNode

        private int compileLengthEncloseNode​(EncloseNode node)
      • compileLengthAnchorNode

        private int compileLengthAnchorNode​(AnchorNode node)
      • compileLengthTree

        private int compileLengthTree​(Node node)
      • ensure

        private void ensure​(int size)
      • addInt

        private void addInt​(int i)
      • setInt

        void setInt​(int i,
                    int offset)
      • addObject

        private void addObject​(java.lang.Object o)
      • addBytes

        private void addBytes​(byte[] bytes,
                              int p,
                              int length)
      • addInts

        private void addInts​(int[] ints,
                             int length)
      • addOpcode

        private void addOpcode​(int opcode)
      • addStateCheckNum

        private void addStateCheckNum​(int num)
      • addRelAddr

        private void addRelAddr​(int addr)
      • addAbsAddr

        private void addAbsAddr​(int addr)
      • addLength

        private void addLength​(int length)
      • addMemNum

        private void addMemNum​(int num)
      • addPointer

        private void addPointer​(java.lang.Object o)
      • addOption

        private void addOption​(int option)
      • addOpcodeRelAddr

        private void addOpcodeRelAddr​(int opcode,
                                      int addr)
      • addOpcodeOption

        private void addOpcodeOption​(int opcode,
                                     int option)
      • addTemplate

        private void addTemplate​(byte[] bytes)