A sedimentary rock primarily composed of calcium carbonate (limestone) or calcium magnesium carbonate (dolomite).