code: public Object eval( CallStack callstack, Interpreter interpreter )
          throws EvalError
      {
          SimpleNode child = (SimpleNode)jjtGetChild(0);
  
          /*
              Child is array initializer.  Evaluate it and fill in the
              dimensions it returns.  Initialized arrays are always fully defined
              (no undefined dimensions to worry about).
              The syntax uses the undefinedDimension count.
              e.g. int [][] { 1, 2 };
          */
          if (child instanceof BSHArrayInitializer)
          {
              Object initValue = ((BSHArrayInitializer) child).eval(
                  baseType, numUndefinedDims, callstack, interpreter);
              definedDimensions = BshArray.dimensions(initValue);
  
              // loose typed array inferred dimensions
              if ( -1 == numUndefinedDims )
                  numUndefinedDims = definedDimensions.length;
  
              // Compare with number of dimensions actually created with the
              // number specified (syntax uses the undefined ones here)
              if ( definedDimensions.length != numUndefinedDims )
                  throw new EvalError(
                  "Incompatible initializer. Allocation calls for a " +
                  numUndefinedDims+ " dimensional array, but initializer is a " +
                  definedDimensions.length + " dimensional array", this, callstack );
  
              return initValue;
          }
          else
          // Evaluate the defined dimensions of the array
          {
              definedDimensions = new int[ numDefinedDims ];
  
              for(int i = 0; i < numDefinedDims; i++)
              {
                  try {
                      Object length = ((SimpleNode)jjtGetChild(i)).eval(
                          callstack, interpreter);
                      definedDimensions[i] = ((Primitive)length).intValue();
                  }
                  catch(Exception e)
                  {
                      throw new EvalError(
                          "Array index: " + i +
                          " does not evaluate to an integer", this, callstack );
                  }
              }
          }
  
          return Primitive.VOID;
      }
docs: Evaluate the structure of the array in one of two ways:
  
  a) an initializer exists, evaluate it and return
  the fully constructed array object, also record the dimensions
  of that array
  
  b) evaluate and record the lengths in each dimension and
  return void.
  
  The structure of the array dims is maintained in dimensions.