code: private static int compareObject(Object a, Object b, final ASTNode node1, final ASTNode node2, String type)
  	{
  		if (a instanceof Comparable && b instanceof Comparable)
  		{
  			Comparable ac = (Comparable) a;
  			try
  			{
  				int result = ac.compareTo(b);
  				if (result > 0)
  					return 1;
  				else if (result < 0)
  					return -1;
  				return result;
  			}
  
  			catch (RuntimeException e)
  			{
  				BeetlException ex = new BeetlException(BeetlException.EXPRESSION_NOT_COMPATIBLE, e);
  				GrammarToken token = GrammarToken.createToken(node1.token.text + " " + node2.token.text,
  						node1.token.line);
  				ex.pushToken(token);
  				throw ex;
  			}
  
  		}
  		else
  		{
  			return -2;
  		}
  	}
docs: *******************