Class IdentifierTokenMatcher

    • Constructor Detail

      • IdentifierTokenMatcher

        public IdentifierTokenMatcher​(java.util.regex.Pattern pattern)
      • IdentifierTokenMatcher

        public IdentifierTokenMatcher​(java.lang.String regex)
        Construct and identifier matcher.
        Parameters:
        regex - a regular expression specifying the allowed identifier names.
        See Also:
        Pattern
    • Method Detail

      • buildToken

        public Token buildToken​(java.lang.String s)
        Create the token, if the name matches a function name return a FunctionToken otherwise return an IdentifierToken.
        Specified by:
        buildToken in interface TokenBuilder
        Specified by:
        buildToken in class RegExpTokenMatcher
        Parameters:
        s - String representing the completed matched token
        Returns:
        the appropriate type of token.
      • basicIndetifierMatcher

        @Deprecated
        public static IdentifierTokenMatcher basicIndetifierMatcher()
        Deprecated.
        replace by correctly spelled version basicIdentifierMatcher().
        Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores.
        Returns:
        the matcher
      • dottedIndetifierMatcher

        @Deprecated
        public static IdentifierTokenMatcher dottedIndetifierMatcher()
        Deprecated.
        replace by correctly spelled version dottedIdentifierMatcher()
        Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores or . characters.
        Returns:
        the matcher
      • basicIdentifierMatcher

        public static IdentifierTokenMatcher basicIdentifierMatcher()
        Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores. Correctly spelled version
        Returns:
        the matcher
        Since:
        3.5
      • dottedIdentifierMatcher

        public static IdentifierTokenMatcher dottedIdentifierMatcher()
        Matches identifiers which start with a letter or underscore and are followed by 0 or more letters digits or underscores or . characters. Correctly spelled version
        Returns:
        the matcher
        Since:
        3.5
      • init

        public void init​(Jep j)
        Description copied from interface: TokenMatcher
        Initialize the matcher when the Jep instance is known.
        Parameters:
        j - Jep instance