static String readNumber(String s){
  int i=0;
  if (s.startsWith("0x") || s.startsWith("0X")) {
    i=2;
    while (true) {
      char ch=s.charAt(i);
      if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f') && (ch < 'A' || ch > 'F')) {
        break;
      }
      i++;
    }
    if (s.charAt(i) == 'l' || s.charAt(i) == 'L') {
      i++;
    }
  }
 else {
    while (true) {
      char ch=s.charAt(i);
      if ((ch < '0' || ch > '9') && ch != '.') {
        break;
      }
      i++;
    }
    if (s.charAt(i) == 'e' || s.charAt(i) == 'E') {
      i++;
      if (s.charAt(i) == '-' || s.charAt(i) == '+') {
        i++;
      }
      while (Character.isDigit(s.charAt(i))) {
        i++;
      }
    }
    if (s.charAt(i) == 'f' || s.charAt(i) == 'F' || s.charAt(i) == 'd' || s.charAt(i) == 'D' || s.charAt(i) == 'L' || s.charAt(i) == 'l') {
      i++;
    }
  }
  return s.substring(0,i);
}

static String readNumber ( String s ) { int i = 0 ; if ( s . startsWith ( "0x" ) || s . startsWith ( "0X" ) ) { i = 2 ; while ( true ) { char ch = s . charAt ( i ) ; if ( ( ch < '0' || ch > '9' ) && ( ch < 'a' || ch > 'f' ) && ( ch < 'A' || ch > 'F' ) ) { break ; } i ++ ; } if ( s . charAt ( i ) == 'l' || s . charAt ( i ) == 'L' ) { i ++ ; } } else { while ( true ) { char ch = s . charAt ( i ) ; if ( ( ch < '0' || ch > '9' ) && ch != '.' ) { break ; } i ++ ; } if ( s . charAt ( i ) == 'e' || s . charAt ( i ) == 'E' ) { i ++ ; if ( s . charAt ( i ) == '-' || s . charAt ( i ) == '+' ) { i ++ ; } while ( Character . isDigit ( s . charAt ( i ) ) ) { i ++ ; } } if ( s . charAt ( i ) == 'f' || s . charAt ( i ) == 'F' || s . charAt ( i ) == 'd' || s . charAt ( i ) == 'D' || s . charAt ( i ) == 'L' || s . charAt ( i ) == 'l' ) { i ++ ; } } return s . substring ( 0 , i ) ; }
parse a number literal and returns it .
