예제 #1
0
파일: __init__.py 프로젝트: Niner10/ITK
def parse(files, config=None, compilation_mode=COMPILATION_MODE.FILE_BY_FILE, cache=None):
    """Parse header files.

    @param files: The header files that should be parsed
    @type files: list of str
    @param config: Configuration object or None
    @type config: L{config_t}
    @param compilation_mode: Determines whether the files are parsed individually or as one single chunk
    @type compilation_mode: L{COMPILATION_MODE}
    @param cache: Declaration cache (None=no cache)
    @type cache: L{cache_base_t} or str
    @returns: Declarations
    """

    if not config:
        config = config_t()
    parser = project_reader_t(config=config, cache=cache)
    answer = parser.read_files(files, compilation_mode)
    return answer
예제 #2
0
def parse( files
           , config=None
           , compilation_mode=COMPILATION_MODE.FILE_BY_FILE
           , cache=None ):
    """
    Parse header files.

    :param files: The header files that should be parsed
    :type files: list of str
    :param config: Configuration object or None
    :type config: :class:`parser.config_t`
    :param compilation_mode: Determines whether the files are parsed individually or as one single chunk
    :type compilation_mode: :class:`parser.COMPILATION_MODE`
    :param cache: Declaration cache (None=no cache)
    :type cache: :class:`parser.cache_base_t` or str
    :rtype: list of :class:`declarations.declaration_t`
    """
    if not config:
        config = config_t()
    parser = project_reader_t( config=config, cache=cache )
    answer = parser.read_files(files, compilation_mode)
    return answer
예제 #3
0
def parse(files,
          config=None,
          compilation_mode=COMPILATION_MODE.FILE_BY_FILE,
          cache=None):
    """Parse header files.

    @param files: The header files that should be parsed
    @type files: list of str
    @param config: Configuration object or None
    @type config: L{config_t}
    @param compilation_mode: Determines whether the files are parsed individually or as one single chunk
    @type compilation_mode: L{COMPILATION_MODE}
    @param cache: Declaration cache (None=no cache)
    @type cache: L{cache_base_t} or str
    @returns: Declarations
    """

    if not config:
        config = config_t()
    parser = project_reader_t(config=config, cache=cache)
    answer = parser.read_files(files, compilation_mode)
    return answer
예제 #4
0
def parse(files,
          config=None,
          compilation_mode=COMPILATION_MODE.FILE_BY_FILE,
          cache=None):
    """
    Parse header files.

    :param files: The header files that should be parsed
    :type files: list of str
    :param config: Configuration object or None
    :type config: :class:`parser.config_t`
    :param compilation_mode: Determines whether the files are parsed individually or as one single chunk
    :type compilation_mode: :class:`parser.COMPILATION_MODE`
    :param cache: Declaration cache (None=no cache)
    :type cache: :class:`parser.cache_base_t` or str
    :rtype: list of :class:`declarations.declaration_t`
    """
    if not config:
        config = config_t()
    parser = project_reader_t(config=config, cache=cache)
    answer = parser.read_files(files, compilation_mode)
    return answer
예제 #5
0
def parse_string(content, config=None):
    if not config:
        config = config_t()
    parser = project_reader_t(config )
    return parser.read_string(content)
예제 #6
0
def parse_string(content, config=None):
    if not config:
        config = config_t()
    parser = project_reader_t(config)
    return parser.read_string(content)