private void consumePattern() {
        while (!isEoi()) {
            final int ch = peek();
            if (ch == '\'') {
                consumeEscapeOrQuoteLiteral();
            }
            else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
                consumePatternLetters();
            }
            else {
                consumeChar();
                addLiteral(ch);
            }
        }
        finishLiterals();
    }
Creates a new pattern read for processing the given string.
@param sequence String with the pattern to process.
@param visitor Visitor to call for each encountered token of the pattern.
primefaces/src/main/java/org/primefaces/convert/PatternReader.java