def _parse_document(document: Path, system: System = None, profile=EProfile.FULL):
        """Parses a document and returns the resulting domain system

        :param path: document path to parse
        :param system: system to be used (optional)
        """
        logger.debug('parse document: {0}'.format(document))
        stream = FileStream(str(document), encoding='utf-8')
        system = FileSystem._parse_stream(stream, system, document, profile)
        FileSystem.merge_annotations(system, document.stripext() + '.yaml')
        return system
def _parse_document ( document : Path , system : System = None , profile = EProfile . FULL ) : logger . debug ( 'parse document: {0}' . format ( document ) ) stream = FileStream ( str ( document ) , encoding = 'utf-8' ) system = FileSystem . _parse_stream ( stream , system , document , profile ) FileSystem . merge_annotations ( system , document . stripext ( ) + '.yaml' ) return system
Parses a document and returns the resulting domain system

        :param path: document path to parse
        :param system: system to be used (optional)