private char lookAhead() { char la = glob.next(); glob.previous(); return la; } }
/** * Return the value of the next character if it is an octal character. * * @param c potentially octal character * @return the hex value or -1 if the next character is not a octal character * @since 3.0 */ protected int decodeOctalCharacter(StringCharacterIterator i) { char c = i.next(); if (c == StringCharacterIterator.DONE) { return -1; } if (('0' <= c) && (c <= '7')) { return c - '0'; } i.previous(); return -1; }
/** * Return the value of the next character if it is an octal character. * * @param c potentially octal character * @return the hex value or -1 if the next character is not a octal character * @since 3.0 */ protected int decodeOctalCharacter(StringCharacterIterator i) { char c = i.next(); if (c == StringCharacterIterator.DONE) { return -1; } if (('0' <= c) && (c <= '7')) { return c - '0'; } i.previous(); return -1; }
}else{ str.append("\\"); iter.previous();
break; } else { char previous = iterator.previous();
private void matchDelimiter( StringCharacterIterator sci, StringBuffer token ) { char c = sci.current(); switch( c ) { case PLUS : char cnext= sci.next(); switch( cnext) { case EQUALS : token.append( c ); token.append( cnext ); sci.next(); break; default : sci.previous(); matchValue( sci, token ); } break; default : token.append( c ); sci.next(); } } // this is called when a token starts with QUOTE
continue; }else{ if(iter.previous() == ']'){ iter.next(); break;
private void matchCommentOrValue( StringCharacterIterator sci, StringBuffer token ) { char cnext = sci.next(); if ( cnext == EOF ) { throw new HydraConfigException( "Premature end of file in comment or value" ); } else if ( cnext == SLASH ) { sci.next(); gobbleSingleLineComment( sci ); } else if ( cnext == STAR ) { sci.next(); gobbleMultiLineComment( sci ); } else { // value sci.previous(); // reset index matchValue( sci, token ); } } // this is called when a token starts with SLASH-SLASH OR POUND
if(iter.previous() == '}'){ iter.next(); break;
int c2 = decodeOctalCharacter(i); if (c2 < 0) { i.previous(); return (char)(c1);
int c2 = decodeOctalCharacter(i); if (c2 < 0) { i.previous(); return (char)(c1);