def p_mp_createInstance(p):
    """mp_createInstance : instanceDeclaration"""
    inst = p[1]
    if p.parser.verbose:
        p.parser.log(
            _format("Creating instance of {0!A}.", inst.classname))
    try:
        p.parser.handle.CreateInstance(inst)
    except CIMError as ce:
        if ce.status_code == CIM_ERR_ALREADY_EXISTS:
            if p.parser.verbose:
                p.parser.log(
                    _format("Instance of class {0!A} already exist. "
                            "Modifying...", inst.classname))
            try:
                p.parser.handle.ModifyInstance(inst)
            except CIMError as ce:
                if ce.status_code == CIM_ERR_NOT_SUPPORTED:
                    if p.parser.verbose:
                        p.parser.log(
                            _format("ModifyInstance not supported. "
                                    "Deleting instance of {0!A}: {1}",
                                    inst.classname, inst.path))
                    p.parser.handle.DeleteInstance(inst.path)
                    if p.parser.verbose:
                        p.parser.log(
                            _format("Creating instance of {0!A}.",
                                    inst.classname))
                    p.parser.handle.CreateInstance(inst)
        else:
            ce.file_line = (p.parser.file, p.lexer.lineno)
            raise