Actually, it is using a source_reader_t by default. __parse_declarations
invokes __parse_file_by_file, which uses a source_reader_t (line 236) to parse
each file. It then bombs out after parsing all of the files when it calls
_join_class_hierarchy.
I continue to have this issue with various combinations of classes. In other
words, I have headers that work fine with parsed in isolation, but when I try
to build a module containing both, I get the KeyError.
-----Original Message-----
From: Davidson, Josh
Sent: Monday, December 19, 2011 1:07 PM
To: 'Development of Python/C++ integration'
Subject: RE: EXTERNAL: Re: [C++-sig] pygccxml KeyError
May have been a bit too quick to respond. Looks like setting the compilation
mode can be used to have the project_reader_t use a source_reader_t. Sorry
about that.
-----Original Message-----
From: Davidson, Josh
Sent: Monday, December 19, 2011 1:00 PM
To: 'Development of Python/C++ integration'
Subject: RE: EXTERNAL: Re: [C++-sig] pygccxml KeyError
Short of modifying the distribution, I don't see any way within Py++ to change
the type of reader. It seems to be hardcoded to project_reader_t:
def __parse_declarations( self, files, gccxml_config, compilation_mode,
cache, indexing_suite_version ):
if None is gccxml_config:
gccxml_config = parser.config_t()
if None is compilation_mode:
compilation_mode = parser.COMPILATION_MODE.FILE_BY_FILE
start_time = time.clock()
self.logger.debug( 'parsing files - started' )
reader = parser.project_reader_t( gccxml_config, cache,
decl_wrappers.dwfactory_t() )
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
Roman Yakovenko
Sent: Monday, December 19, 2011 12:37 PM
To: Development of Python/C++ integration
Subject: EXTERNAL: Re: [C++-sig] pygccxml KeyError
On Sat, Dec 17, 2011 at 2:23 AM, Davidson, Josh <[email protected]> wrote:
> Hopefully, there's enough information in the traceback, but if not I
> can try to sanitize an example. I'm on rev 1856.
More or less. Sorry for late response, I was pretty busy.
> File
> "c:\Python26\lib\site-packages\pygccxml\parser\project_reader.py",
> line 445, in _join_class_hierarchy
You are using project_reader_t class to parse a set of C++ files. This method
is not reliable and pretty slow. I suggest you to use "source_reader_t" class.
Please read the project documentation, it explains how to start using it.
Regards,
Roman
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig