/** * Parse a property pattern. * @param chars iterator over the pattern characters. Upon return * it will be advanced to the first character after the parsed * pattern, or the end of the iteration if all characters are * parsed. * @param rebuiltPat the pattern that was parsed, rebuilt or * copied from the input pattern, as appropriate. * @param symbols TODO */ private void applyPropertyPattern(RuleCharacterIterator chars, Appendable rebuiltPat, SymbolTable symbols) { String patStr = chars.lookahead(); ParsePosition pos = new ParsePosition(0); applyPropertyPattern(patStr, pos, symbols); if (pos.getIndex() == 0) { syntaxError(chars, "Invalid property pattern"); } chars.jumpahead(pos.getIndex()); append(rebuiltPat, patStr.substring(0, pos.getIndex())); }
case SETMODE2_PROPERTYPAT: chars.skipIgnored(opts); nested.applyPropertyPattern(chars, patBuf, symbols); break; case SETMODE3_PREPARSED: // `nested' already parsed