def parse_xcodebuild_list(output_string):
    """Decompose xcode -list output to lists"""
    lines = output_string.splitlines()
    gathering = ''
    target_list = []
    configurations_list = []
    schemes_list = []
    for line in lines:
        if line == '    Targets:':
            gathering = 'targets'
        elif line == '    Build Configurations:':
            gathering = 'configurations'
        elif line == '    Schemes:':
            gathering = 'schemes'
        elif not line:
            gathering = ''
        elif gathering:
            if gathering == 'targets':
                target_list.append(line.strip())
            elif gathering == 'configurations':
                configurations_list.append(line.strip())
            elif gathering == 'schemes':
                schemes_list.append(line.strip())
    return target_list, configurations_list, schemes_list
