'Validate and parse a given application configuration from fig\'s
configuration format.
:raises ConfigurationError: if there are validation errors.
:returns: A ``dict`` mapping application names to ``Application``
instances.'

def _parse(self):

    for (application_name, config) in self._application_configuration.items():
        try:
            self._validate_application_keys(application_name, config)
            _check_type(config[u'image'], (str, unicode), u"'image'    must    be    a    string", application_name)
            image_name = config[u'image']
            image = DockerImage.from_string(image_name)
            environment = None
            ports = []
            volume = None
            mem_limit = None
            self._application_links[application_name] = []
            if (u'environment' in config):
                environment = self._parse_app_environment(application_name, config[u'environment'])
            if (u'volumes' in config):
                volume = self._parse_app_volumes(application_name, config[u'volumes'])
            if (u'ports' in config):
                ports = self._parse_app_ports(application_name, config[u'ports'])
            if (u'links' in config):
                self._parse_app_links(application_name, config[u'links'])
            if (u'mem_limit' in config):
                mem_limit = self._parse_mem_limit(application_name, config[u'mem_limit'])
            self._applications[application_name] = Application(name=application_name, image=image, volume=volume, ports=frozenset(ports), links=frozenset(), environment=environment, memory_limit=mem_limit)
        except ValueError as e:
            raise ConfigurationError(u"Application    '{application_name}'    has    a    config    error.    {message}".format(application_name=application_name, message=e.message))
    self._link_applications()
