public static void parsePattern(CharSequence sequence, TokenVisitor visitor) {
        final PatternReader reader = new PatternReader(sequence, visitor);
        reader.consumePattern();
    }
Parses the given pattern and calls the visitor for each encountered pattern.
@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