Class MetaPatternParser

    • Constructor Summary

      Constructors 
      Constructor Description
      MetaPatternParser​(java.lang.CharSequence input)
      Construct the parser.
      MetaPatternParser​(MetaPattern pattern, java.lang.CharSequence input)
      Construct the parser and initialize the matcher with the pattern given.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean advance​(MetaPattern pattern)
      Advance parsing to the next element.
      boolean atEnd()
      Whether the internal cursor has advanced to the end of the input.
      java.util.regex.Matcher matcher()
      Gets the matcher.
      boolean matches()
      Whether the matcher matches the pattern.
      void setPattern​(MetaPattern pattern)  
      • Methods inherited from class java.lang.Object

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

      • MetaPatternParser

        public MetaPatternParser​(MetaPattern pattern,
                                 java.lang.CharSequence input)
        Construct the parser and initialize the matcher with the pattern given.
        Parameters:
        pattern - Meta pattern
        input - Input to parse
    • Method Detail

      • setPattern

        public void setPattern​(MetaPattern pattern)
        Parameters:
        pattern - Pattern
      • advance

        protected final boolean advance​(MetaPattern pattern)
        Advance parsing to the next element. The internal cursor will be moved to end of the string matched.
        Parameters:
        pattern - Meta pattern
        Returns:
        True if found, false otherwise
      • matches

        public boolean matches()
        Whether the matcher matches the pattern.
        Returns:
        whether the matcher matches
      • matcher

        public final java.util.regex.Matcher matcher()
        Gets the matcher.
        Returns:
        the matcher
      • atEnd

        public final boolean atEnd()
        Whether the internal cursor has advanced to the end of the input.
        Returns:
        whether the input is parsed