public char nextcharClass(char c,boolean advance){
  int distance=0;
  if (c == '\\' && text.charAt(textPos) == 'u') {
    int y, digit, thisChar=0;
    for (y=textPos + 1; y < textPos + 5 && y < text.length(); y++) {
      digit=Character.digit(text.charAt(y),16);
      if (digit == -1)       break;
      thisChar=(thisChar << 4) + digit;
    }
    if (y == textPos + 5 && Character.isDefined((char)thisChar)) {
      c=(char)thisChar;
      distance=5;
    }
 else {
      distance=1;
    }
  }
  if (advance)   textPos+=distance;
  return javaTypeOfToCharacterClass(Character.getType(c));
}

public char nextcharClass ( char c , boolean advance ) { int distance = 0 ; if ( c == '\\' && text . charAt ( textPos ) == 'u' ) { int y , digit , thisChar = 0 ; for ( y = textPos + 1 ; y < textPos + 5 && y < text . length ( ) ; y ++ ) { digit = Character . digit ( text . charAt ( y ) , 16 ) ; if ( digit == - 1 ) break ; thisChar = ( thisChar << 4 ) + digit ; } if ( y == textPos + 5 && Character . isDefined ( ( char ) thisChar ) ) { c = ( char ) thisChar ; distance = 5 ; } else { distance = 1 ; } } if ( advance ) textPos += distance ; return javaTypeOfToCharacterClass ( Character . getType ( c ) ) ; }
advance the input cursor if advance is true .
