private Double readDoubleNumberFromExpression(String expression) throws ParsingException {
  Character c=expression.charAt(expressionIterator);
  Double number=getDoubleDigit(c);
  while (++expressionIterator < expression.length()) {
    c=expression.charAt(expressionIterator);
    if (!Character.isDigit(c)) {
      break;
    }
    number*=10;
    number+=getDoubleDigit(c);
  }
  if (c == '.') {
    if (++expressionIterator == expression.length()) {
      throw new ParsingException(ILLEGAL_POSITION_IN_EXPRESSION + c);
    }
    c=expression.charAt(expressionIterator);
    double placeFactor=10;
    number+=getDoubleDigit(c) / placeFactor;
    if (!Character.isDigit(c)) {
      throw new ParsingException(ILLEGAL_POSITION_IN_EXPRESSION + c);
    }
    while (++expressionIterator < expression.length()) {
      c=expression.charAt(expressionIterator);
      if (!Character.isDigit(c)) {
        break;
      }
      placeFactor*=10;
      number+=getDoubleDigit(c) / placeFactor;
    }
  }
  --expressionIterator;
  return number;
}

private Double readDoubleNumberFromExpression ( String expression ) throws ParsingException { Character c = expression . charAt ( expressionIterator ) ; Double number = getDoubleDigit ( c ) ; while ( ++ expressionIterator < expression . length ( ) ) { c = expression . charAt ( expressionIterator ) ; if ( ! Character . isDigit ( c ) ) { break ; } number *= 10 ; number += getDoubleDigit ( c ) ; } if ( c == '.' ) { if ( ++ expressionIterator == expression . length ( ) ) { throw new ParsingException ( ILLEGAL_POSITION_IN_EXPRESSION + c ) ; } c = expression . charAt ( expressionIterator ) ; double placeFactor = 10 ; number += getDoubleDigit ( c ) / placeFactor ; if ( ! Character . isDigit ( c ) ) { throw new ParsingException ( ILLEGAL_POSITION_IN_EXPRESSION + c ) ; } while ( ++ expressionIterator < expression . length ( ) ) { c = expression . charAt ( expressionIterator ) ; if ( ! Character . isDigit ( c ) ) { break ; } placeFactor *= 10 ; number += getDoubleDigit ( c ) / placeFactor ; } } -- expressionIterator ; return number ; }
read a double number from the expressioniterator position in expression
