1   
 2   
 3   
 4   
 5   
 6  """Parser sub-package. 
 7  """ 
 8   
 9  from config import config_t 
10  from config import gccxml_configuration_t 
11   
12  from project_reader import COMPILATION_MODE 
13  from project_reader import project_reader_t 
14  from project_reader import file_configuration_t 
15  from project_reader import create_text_fc 
16  from project_reader import create_source_fc 
17  from project_reader import create_gccxml_fc 
18  from project_reader import create_cached_source_fc 
19   
20  from source_reader import source_reader_t 
21  from source_reader import gccxml_runtime_error_t 
22  from declarations_cache import cache_base_t 
23  from declarations_cache import file_cache_t 
24  from declarations_cache import dummy_cache_t 
25  from directory_cache import directory_cache_t 
26   
27  CONTENT_TYPE = file_configuration_t.CONTENT_TYPE 
28   
29   
34      """Parse header files. 
35   
36      @param files: The header files that should be parsed 
37      @type files: list of str 
38      @param config: Configuration object or None 
39      @type config: L{config_t} 
40      @param compilation_mode: Determines whether the files are parsed individually or as one single chunk 
41      @type compilation_mode: L{COMPILATION_MODE} 
42      @param cache: Declaration cache (None=no cache) 
43      @type cache: L{cache_base_t} or str 
44      @returns: Declarations 
45      """ 
46           
47      if not config: 
48          config = config_t() 
49      parser = project_reader_t( config=config, cache=cache ) 
50      answer = parser.read_files(files, compilation_mode) 
51      return answer 
 52   
58   
62