Class SimpleTokenizer


  • public final class SimpleTokenizer
    extends Object
    Tokenizer to create SimpleToken from the input.
    • Method Detail

      • hasFunctionStartToken

        public static boolean hasFunctionStartToken​(String expression)
        Does the expression include a simple function.
        Parameters:
        expression - the expression
        Returns:
        true if one or more simple function is included in the expression
      • nextToken

        public static SimpleToken nextToken​(String expression,
                                            int index,
                                            boolean allowEscape,
                                            TokenType... filter)
        Create the next token
        Parameters:
        expression - the input expression
        index - the current index
        allowEscape - whether to allow escapes
        filter - defines the accepted token types to be returned (character is always used as fallback)
        Returns:
        the created token, will always return a token
      • nextToken

        public static SimpleToken nextToken​(String expression,
                                            int index,
                                            boolean allowEscape)
        Create the next token
        Parameters:
        expression - the input expression
        index - the current index
        allowEscape - whether to allow escapes
        Returns:
        the created token, will always return a token