corba/src/share/classes/com/sun/tools/corba/se/idl/constExpr/Expression.java
author andrew
Sat, 16 Jan 2010 01:04:04 +0000
changeset 4623 e3aaa29eff65
parent 4 02bb8761fcce
child 5555 b2b5ed3f0d0d
permissions -rw-r--r--
6917485: Corba doc warnings Summary: Fix warnings generated by javadoc Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
02bb8761fcce Initial load
duke
parents:
diff changeset
     1
/*
02bb8761fcce Initial load
duke
parents:
diff changeset
     2
 * Copyright 1999 Sun Microsystems, Inc.  All Rights Reserved.
02bb8761fcce Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02bb8761fcce Initial load
duke
parents:
diff changeset
     4
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
02bb8761fcce Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
02bb8761fcce Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Sun designates this
02bb8761fcce Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
02bb8761fcce Initial load
duke
parents:
diff changeset
     9
 * by Sun in the LICENSE file that accompanied this code.
02bb8761fcce Initial load
duke
parents:
diff changeset
    10
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
02bb8761fcce Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02bb8761fcce Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02bb8761fcce Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
02bb8761fcce Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
02bb8761fcce Initial load
duke
parents:
diff changeset
    16
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
02bb8761fcce Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
02bb8761fcce Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02bb8761fcce Initial load
duke
parents:
diff changeset
    20
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    21
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
02bb8761fcce Initial load
duke
parents:
diff changeset
    22
 * CA 95054 USA or visit www.sun.com if you need additional information or
02bb8761fcce Initial load
duke
parents:
diff changeset
    23
 * have any questions.
02bb8761fcce Initial load
duke
parents:
diff changeset
    24
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    25
/*
02bb8761fcce Initial load
duke
parents:
diff changeset
    26
 * COMPONENT_NAME: idl.parser
02bb8761fcce Initial load
duke
parents:
diff changeset
    27
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    28
 * ORIGINS: 27
02bb8761fcce Initial load
duke
parents:
diff changeset
    29
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    30
 * Licensed Materials - Property of IBM
02bb8761fcce Initial load
duke
parents:
diff changeset
    31
 * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
02bb8761fcce Initial load
duke
parents:
diff changeset
    32
 * RMI-IIOP v1.0
02bb8761fcce Initial load
duke
parents:
diff changeset
    33
 *
02bb8761fcce Initial load
duke
parents:
diff changeset
    34
 */
02bb8761fcce Initial load
duke
parents:
diff changeset
    35
02bb8761fcce Initial load
duke
parents:
diff changeset
    36
package com.sun.tools.corba.se.idl.constExpr;
02bb8761fcce Initial load
duke
parents:
diff changeset
    37
02bb8761fcce Initial load
duke
parents:
diff changeset
    38
// NOTES:
02bb8761fcce Initial load
duke
parents:
diff changeset
    39
02bb8761fcce Initial load
duke
parents:
diff changeset
    40
import java.math.BigInteger;
02bb8761fcce Initial load
duke
parents:
diff changeset
    41
02bb8761fcce Initial load
duke
parents:
diff changeset
    42
public abstract class Expression
02bb8761fcce Initial load
duke
parents:
diff changeset
    43
{
02bb8761fcce Initial load
duke
parents:
diff changeset
    44
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    45
   * Compute the value of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    46
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    47
  public abstract Object evaluate () throws EvaluationException;
02bb8761fcce Initial load
duke
parents:
diff changeset
    48
02bb8761fcce Initial load
duke
parents:
diff changeset
    49
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    50
   * Set the value of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    51
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    52
  public void value (Object value)
02bb8761fcce Initial load
duke
parents:
diff changeset
    53
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    54
    _value = value;
02bb8761fcce Initial load
duke
parents:
diff changeset
    55
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
    56
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    57
   * Get the value of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    58
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    59
  public Object value ()
02bb8761fcce Initial load
duke
parents:
diff changeset
    60
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    61
    return _value;
02bb8761fcce Initial load
duke
parents:
diff changeset
    62
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
    63
02bb8761fcce Initial load
duke
parents:
diff changeset
    64
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    65
   * Set the representation of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    66
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    67
  public void rep (String rep)
02bb8761fcce Initial load
duke
parents:
diff changeset
    68
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    69
    _rep = rep;
02bb8761fcce Initial load
duke
parents:
diff changeset
    70
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
    71
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    72
   * Get the representation of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    73
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    74
  public String rep ()
02bb8761fcce Initial load
duke
parents:
diff changeset
    75
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    76
    return _rep;
02bb8761fcce Initial load
duke
parents:
diff changeset
    77
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
    78
02bb8761fcce Initial load
duke
parents:
diff changeset
    79
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    80
   * Set the target type of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    81
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    82
  public void type (String type)
02bb8761fcce Initial load
duke
parents:
diff changeset
    83
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    84
    _type = type;
02bb8761fcce Initial load
duke
parents:
diff changeset
    85
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
    86
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    87
   * Get the target type of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
    88
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    89
  public String type ()
02bb8761fcce Initial load
duke
parents:
diff changeset
    90
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    91
    return _type;
02bb8761fcce Initial load
duke
parents:
diff changeset
    92
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
    93
02bb8761fcce Initial load
duke
parents:
diff changeset
    94
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
    95
   * Return the default computation type for the given target type.
02bb8761fcce Initial load
duke
parents:
diff changeset
    96
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
    97
  protected static String defaultType (String targetType)
02bb8761fcce Initial load
duke
parents:
diff changeset
    98
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
    99
    return (targetType == null) ? new String ("") : targetType;
02bb8761fcce Initial load
duke
parents:
diff changeset
   100
  } // defaultType
02bb8761fcce Initial load
duke
parents:
diff changeset
   101
02bb8761fcce Initial load
duke
parents:
diff changeset
   102
  // BigInteger is a multi-precision number whose representation contains
02bb8761fcce Initial load
duke
parents:
diff changeset
   103
  // a signum (sign-number = 1, -1) and a magnitude.  To support "long long",
02bb8761fcce Initial load
duke
parents:
diff changeset
   104
  // all integer expressions are now performed over BigInteger and stored as
02bb8761fcce Initial load
duke
parents:
diff changeset
   105
  // such.  During the evaluation of an integer expression, the signum of its
02bb8761fcce Initial load
duke
parents:
diff changeset
   106
  // value may toggle, which may cause the value of an expression to conflict
02bb8761fcce Initial load
duke
parents:
diff changeset
   107
  // with its target type: [Case 1] If the resulting value is negative
02bb8761fcce Initial load
duke
parents:
diff changeset
   108
  // (signum=-1) and the target type is unsigned; or [Case 2] if the resulting
02bb8761fcce Initial load
duke
parents:
diff changeset
   109
  // value is positive (signum=1) and greater than 2**(target-type-length - 1),
02bb8761fcce Initial load
duke
parents:
diff changeset
   110
  // and the target type is signed, then the resulting value will be out of
02bb8761fcce Initial load
duke
parents:
diff changeset
   111
  // range.  However, this value is correct and must be coerced to the target
02bb8761fcce Initial load
duke
parents:
diff changeset
   112
  // type.  E.G., After appying "not" to a BigInteger, the result is
02bb8761fcce Initial load
duke
parents:
diff changeset
   113
  // a BigInteger that represents its 2's-complement (~5 => -6 in a byte-space).
02bb8761fcce Initial load
duke
parents:
diff changeset
   114
  // In this example, the signum toggles and the magnatude is 6.  If the target
02bb8761fcce Initial load
duke
parents:
diff changeset
   115
  // type of this value were unsigned short, it must be coerced to a positive
02bb8761fcce Initial load
duke
parents:
diff changeset
   116
  // number whose bits truly represent -6 in 2's-complement (250 in a byte-space).
02bb8761fcce Initial load
duke
parents:
diff changeset
   117
  //
02bb8761fcce Initial load
duke
parents:
diff changeset
   118
  // Also, floating types may now be intialized with any integer expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
   119
  // The result must be coerced to Double.
02bb8761fcce Initial load
duke
parents:
diff changeset
   120
  //
02bb8761fcce Initial load
duke
parents:
diff changeset
   121
  // Use the following routines to coerce this expression's value to its
02bb8761fcce Initial load
duke
parents:
diff changeset
   122
  // "target" type.
02bb8761fcce Initial load
duke
parents:
diff changeset
   123
02bb8761fcce Initial load
duke
parents:
diff changeset
   124
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   125
   * Coerces a number to the target type of this expression.
4623
e3aaa29eff65 6917485: Corba doc warnings
andrew
parents: 4
diff changeset
   126
   * @param  obj  The number to coerce.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   127
   * @return  the value of number coerced to the (target) type of
02bb8761fcce Initial load
duke
parents:
diff changeset
   128
   *  this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
   129
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   130
  public Object coerceToTarget (Object obj)
02bb8761fcce Initial load
duke
parents:
diff changeset
   131
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   132
    if (obj instanceof BigInteger)
02bb8761fcce Initial load
duke
parents:
diff changeset
   133
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   134
      if (type ().indexOf ("unsigned") >= 0)
02bb8761fcce Initial load
duke
parents:
diff changeset
   135
        return toUnsignedTarget ((BigInteger)obj);
02bb8761fcce Initial load
duke
parents:
diff changeset
   136
      else
02bb8761fcce Initial load
duke
parents:
diff changeset
   137
        return toSignedTarget ((BigInteger)obj);
02bb8761fcce Initial load
duke
parents:
diff changeset
   138
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   139
    return obj;
02bb8761fcce Initial load
duke
parents:
diff changeset
   140
  } // coerceToTarget
02bb8761fcce Initial load
duke
parents:
diff changeset
   141
02bb8761fcce Initial load
duke
parents:
diff changeset
   142
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   143
   * Coerces an integral value (BigInteger) to its corresponding unsigned
02bb8761fcce Initial load
duke
parents:
diff changeset
   144
   * representation, if the target type of this expression is unsigned.
4623
e3aaa29eff65 6917485: Corba doc warnings
andrew
parents: 4
diff changeset
   145
   * @param b The BigInteger to be coerced.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   146
   * @return the value of an integral type coerced to its corresponding
02bb8761fcce Initial load
duke
parents:
diff changeset
   147
   *  unsigned integral type, if the target type of this expression is
02bb8761fcce Initial load
duke
parents:
diff changeset
   148
   *  unsigned.
02bb8761fcce Initial load
duke
parents:
diff changeset
   149
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   150
  protected BigInteger toUnsignedTarget (BigInteger b)
02bb8761fcce Initial load
duke
parents:
diff changeset
   151
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   152
    if (type ().equals ("unsigned short")) // target type of this expression
02bb8761fcce Initial load
duke
parents:
diff changeset
   153
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   154
      if (b != null && b.compareTo (zero) < 0) // error if value < min = -(2**(l-1)).
02bb8761fcce Initial load
duke
parents:
diff changeset
   155
        return b.add (twoPow16);
02bb8761fcce Initial load
duke
parents:
diff changeset
   156
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   157
    else if (type ().equals ("unsigned long"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   158
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   159
      if (b != null && b.compareTo (zero) < 0)
02bb8761fcce Initial load
duke
parents:
diff changeset
   160
        return b.add (twoPow32);
02bb8761fcce Initial load
duke
parents:
diff changeset
   161
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   162
    else if (type ().equals ("unsigned long long"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   163
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   164
      if (b != null && b.compareTo (zero) < 0)
02bb8761fcce Initial load
duke
parents:
diff changeset
   165
        return b.add (twoPow64);
02bb8761fcce Initial load
duke
parents:
diff changeset
   166
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   167
    return b;
02bb8761fcce Initial load
duke
parents:
diff changeset
   168
  } // toUnsignedTarget
02bb8761fcce Initial load
duke
parents:
diff changeset
   169
02bb8761fcce Initial load
duke
parents:
diff changeset
   170
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   171
   * Coerces an integral value (BigInteger) to its corresponding signed
02bb8761fcce Initial load
duke
parents:
diff changeset
   172
   * representation, if the target type of this expression is signed.
4623
e3aaa29eff65 6917485: Corba doc warnings
andrew
parents: 4
diff changeset
   173
   * @param  b  The BigInteger to be coerced.
4
02bb8761fcce Initial load
duke
parents:
diff changeset
   174
   * @return  the value of an integral type coerced to its corresponding
02bb8761fcce Initial load
duke
parents:
diff changeset
   175
   *  signed integral type, if the target type of this expression is
02bb8761fcce Initial load
duke
parents:
diff changeset
   176
   *  signed.
02bb8761fcce Initial load
duke
parents:
diff changeset
   177
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   178
  protected BigInteger toSignedTarget (BigInteger b)
02bb8761fcce Initial load
duke
parents:
diff changeset
   179
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   180
    if (type ().equals ("short"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   181
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   182
      if (b != null && b.compareTo (sMax) > 0)
02bb8761fcce Initial load
duke
parents:
diff changeset
   183
        return b.subtract (twoPow16);
02bb8761fcce Initial load
duke
parents:
diff changeset
   184
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   185
    else if (type ().equals ("long"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   186
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   187
      if (b != null && b.compareTo (lMax) > 0)
02bb8761fcce Initial load
duke
parents:
diff changeset
   188
        return b.subtract (twoPow32);
02bb8761fcce Initial load
duke
parents:
diff changeset
   189
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   190
    else if (type ().equals ("long long"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   191
    {
02bb8761fcce Initial load
duke
parents:
diff changeset
   192
      if (b != null && b.compareTo (llMax) > 0)
02bb8761fcce Initial load
duke
parents:
diff changeset
   193
        return b.subtract (twoPow64);
02bb8761fcce Initial load
duke
parents:
diff changeset
   194
    }
02bb8761fcce Initial load
duke
parents:
diff changeset
   195
    return b;
02bb8761fcce Initial load
duke
parents:
diff changeset
   196
  } // toSignedTarget
02bb8761fcce Initial load
duke
parents:
diff changeset
   197
02bb8761fcce Initial load
duke
parents:
diff changeset
   198
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   199
   * Return the unsigned value of a BigInteger.
02bb8761fcce Initial load
duke
parents:
diff changeset
   200
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   201
  protected BigInteger toUnsigned (BigInteger b)
02bb8761fcce Initial load
duke
parents:
diff changeset
   202
  {
02bb8761fcce Initial load
duke
parents:
diff changeset
   203
    if (b != null && b.signum () == -1)
02bb8761fcce Initial load
duke
parents:
diff changeset
   204
      if (type ().equals ("short"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   205
        return b.add (twoPow16);
02bb8761fcce Initial load
duke
parents:
diff changeset
   206
      else if (type ().equals ("long"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   207
        return b.add (twoPow32);
02bb8761fcce Initial load
duke
parents:
diff changeset
   208
      else if (type ().equals ("long long"))
02bb8761fcce Initial load
duke
parents:
diff changeset
   209
        return b.add (twoPow64);
02bb8761fcce Initial load
duke
parents:
diff changeset
   210
    return b;
02bb8761fcce Initial load
duke
parents:
diff changeset
   211
  }
02bb8761fcce Initial load
duke
parents:
diff changeset
   212
02bb8761fcce Initial load
duke
parents:
diff changeset
   213
  // Integral-type boundaries.
02bb8761fcce Initial load
duke
parents:
diff changeset
   214
02bb8761fcce Initial load
duke
parents:
diff changeset
   215
  public static final BigInteger negOne = BigInteger.valueOf (-1);
02bb8761fcce Initial load
duke
parents:
diff changeset
   216
  public static final BigInteger zero   = BigInteger.valueOf (0);
02bb8761fcce Initial load
duke
parents:
diff changeset
   217
  public static final BigInteger one    = BigInteger.valueOf (1);
02bb8761fcce Initial load
duke
parents:
diff changeset
   218
  public static final BigInteger two    = BigInteger.valueOf (2);
02bb8761fcce Initial load
duke
parents:
diff changeset
   219
02bb8761fcce Initial load
duke
parents:
diff changeset
   220
  public static final BigInteger twoPow15 = two.pow (15);
02bb8761fcce Initial load
duke
parents:
diff changeset
   221
  public static final BigInteger twoPow16 = two.pow (16);
02bb8761fcce Initial load
duke
parents:
diff changeset
   222
  public static final BigInteger twoPow31 = two.pow (31);
02bb8761fcce Initial load
duke
parents:
diff changeset
   223
  public static final BigInteger twoPow32 = two.pow (32);
02bb8761fcce Initial load
duke
parents:
diff changeset
   224
  public static final BigInteger twoPow63 = two.pow (63);
02bb8761fcce Initial load
duke
parents:
diff changeset
   225
  public static final BigInteger twoPow64 = two.pow (64);
02bb8761fcce Initial load
duke
parents:
diff changeset
   226
02bb8761fcce Initial load
duke
parents:
diff changeset
   227
  public static final BigInteger sMax = BigInteger.valueOf (Short.MAX_VALUE);
02bb8761fcce Initial load
duke
parents:
diff changeset
   228
  public static final BigInteger sMin = BigInteger.valueOf (Short.MAX_VALUE);
02bb8761fcce Initial load
duke
parents:
diff changeset
   229
02bb8761fcce Initial load
duke
parents:
diff changeset
   230
  public static final BigInteger usMax = sMax.multiply (two).add (one);
02bb8761fcce Initial load
duke
parents:
diff changeset
   231
  public static final BigInteger usMin = zero;
02bb8761fcce Initial load
duke
parents:
diff changeset
   232
02bb8761fcce Initial load
duke
parents:
diff changeset
   233
  public static final BigInteger lMax = BigInteger.valueOf (Integer.MAX_VALUE);
02bb8761fcce Initial load
duke
parents:
diff changeset
   234
  public static final BigInteger lMin = BigInteger.valueOf (Integer.MAX_VALUE);
02bb8761fcce Initial load
duke
parents:
diff changeset
   235
02bb8761fcce Initial load
duke
parents:
diff changeset
   236
  public static final BigInteger ulMax = lMax.multiply (two).add (one);
02bb8761fcce Initial load
duke
parents:
diff changeset
   237
  public static final BigInteger ulMin = zero;
02bb8761fcce Initial load
duke
parents:
diff changeset
   238
02bb8761fcce Initial load
duke
parents:
diff changeset
   239
  public static final BigInteger llMax = BigInteger.valueOf (Long.MAX_VALUE);
02bb8761fcce Initial load
duke
parents:
diff changeset
   240
  public static final BigInteger llMin = BigInteger.valueOf (Long.MIN_VALUE);
02bb8761fcce Initial load
duke
parents:
diff changeset
   241
02bb8761fcce Initial load
duke
parents:
diff changeset
   242
  public static final BigInteger ullMax = llMax.multiply (two).add (one);
02bb8761fcce Initial load
duke
parents:
diff changeset
   243
  public static final BigInteger ullMin = zero;
02bb8761fcce Initial load
duke
parents:
diff changeset
   244
02bb8761fcce Initial load
duke
parents:
diff changeset
   245
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   246
   * Value of this expression: Boolean, Char, Byte, BigInteger, Double,
02bb8761fcce Initial load
duke
parents:
diff changeset
   247
   * String, Expression, ConstEntry.
02bb8761fcce Initial load
duke
parents:
diff changeset
   248
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   249
  private Object _value = null;
02bb8761fcce Initial load
duke
parents:
diff changeset
   250
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   251
   * String representation of this expression.
02bb8761fcce Initial load
duke
parents:
diff changeset
   252
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   253
  private String _rep   = null;
02bb8761fcce Initial load
duke
parents:
diff changeset
   254
  /**
02bb8761fcce Initial load
duke
parents:
diff changeset
   255
   * Computation type of this (sub)expression = Target type for now.
02bb8761fcce Initial load
duke
parents:
diff changeset
   256
   **/
02bb8761fcce Initial load
duke
parents:
diff changeset
   257
  private String _type  = null;
02bb8761fcce Initial load
duke
parents:
diff changeset
   258
} // abstract class Expression