Package org.joni

Class Matcher

    • Constructor Summary

      Constructors 
      Constructor Description
      Matcher​(Regex regex, Region region, byte[] bytes, int p, int end)  
    • Method Summary

      All Methods Static 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 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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
      • msaGpos

        protected int msaGpos
      • msaBegin

        protected int msaBegin
      • msaEnd

        protected int msaEnd
      • low

        int low
      • high

        int high
      • icbuf

        private byte[] icbuf
    • Constructor Detail

      • Matcher

        Matcher​(Regex regex,
                Region region,
                byte[] bytes,
                int p,
                int end)
    • Method Detail

      • matchAt

        protected abstract int matchAt​(int range,
                                       int sstart,
                                       int sprev,
                                       boolean interrupt)
                                throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • stateCheckBuffInit

        protected abstract void stateCheckBuffInit​(int strLength,
                                                   int offset,
                                                   int stateNum)
      • stateCheckBuffClear

        protected abstract void stateCheckBuffClear()
      • interrupt

        public abstract void interrupt()
      • 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,
                                     int gpos)
      • 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
      • matchCommon

        private final int matchCommon​(int at,
                                      int range,
                                      int option,
                                      boolean interrupt)
                               throws java.lang.InterruptedException
        Throws:
        java.lang.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 java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • search

        public final int search​(int start,
                                int range,
                                int option)
      • search

        public final int search​(int gpos,
                                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
      • searchInterruptible

        public final int searchInterruptible​(int gpos,
                                             int start,
                                             int range,
                                             int option)
                                      throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • searchCommon

        private final int searchCommon​(int gpos,
                                       int start,
                                       int range,
                                       int option,
                                       boolean interrupt)
                                throws java.lang.InterruptedException
        Throws:
        java.lang.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

        static void debugSearch​(java.lang.String name,
                                int textP,
                                int textEnd,
                                int textRange)