public List<Token> tokenize(String formula) {

        int offset = 0;
        int length = formula.length();
        List<Token> parts = new ArrayList<Token>();

        while (offset < length) {
            char current = formula.charAt(offset);

            if (Character.isWhitespace(current)) {
                offset++;
            } else if (readCharToken(current, parts)) {
                offset++;
            } else if (Character.isDigit(current) || current == '.') {
                offset = readNumberToken(current, offset, formula, parts);
            } else {

                int tokenLength = 0;
                for(Map<String, ? extends Token> map : maps) {
                   tokenLength = readOtherToken(map, offset, formula, parts);
                    if (tokenLength > 0) {
                        break;
                    }
                }
                if (tokenLength == 0) {
                    throw new ParseException("Could not tokenize formula [" + formula + "] at position " + offset);
                }
                offset += tokenLength;
            }
        }
        return parts;
    }