protected Double readReal() throws IOException, HsqlException {

    String s = readNumberField();

    if (s == null) {
      return null;
    }

    double i = JavaSystem.parseDouble(s);

    if (tokenizer.isGetThis(Token.T_DIVIDE)) {
      s = tokenizer.getString();

      // parse simply to ensure it's a number
      double ii = JavaSystem.parseDouble(s);

      if (i == 0E0) {
        i = Double.NaN;
      } else if (i == -1E0) {
        i = Double.NEGATIVE_INFINITY;
      } else if (i == 1E0) {
        i = Double.POSITIVE_INFINITY;
      }
    }

    return ValuePool.getDouble(Double.doubleToLongBits(i));
  }
  public void setSource(String text) throws HsqlException {

    tokenizer.reset(text);

    statementType = ScriptReaderBase.ANY_STATEMENT;

    String s = tokenizer.getString();

    if (s.equals(Token.T_INSERT)) {
      statementType = ScriptReaderBase.INSERT_STATEMENT;

      tokenizer.getString();

      tableName = tokenizer.getString();

      tokenizer.getString();
    } else if (s.equals(Token.T_DELETE)) {
      statementType = ScriptReaderBase.DELETE_STATEMENT;

      tokenizer.getString();

      tableName = tokenizer.getString();
    } else if (s.equals(Token.T_COMMIT)) {
      statementType = ScriptReaderBase.COMMIT_STATEMENT;
    } else if (s.equals(Token.T_SET)) {
      if (tokenizer.isGetThis(Token.T_SCHEMA)) {
        schemaName = tokenizer.getSimpleName();
        statementType = ScriptReaderBase.SCHEMA_STATEMENT;
      }
    }
  }
  protected String readField() throws IOException {

    try {
      tokenizer.getString();

      if (statementType == ScriptReaderBase.DELETE_STATEMENT) {
        tokenizer.getString();
        tokenizer.getString();
      }

      String s = tokenizer.getString();

      if (tokenizer.getType() == Types.SQL_ALL_TYPES) {
        s = null;
      }

      return s;
    } catch (HsqlException e) {
      throw new IOException(e.getMessage());
    }
  }