Re: [pygccxml-development] What am I doing wrong?
Brought to you by:
mbaas,
roman_yakovenko
From: Neal B. <ndb...@gm...> - 2006-04-18 10:56:56
|
On Tuesday 18 April 2006 4:10 am, Roman Yakovenko wrote: > Neal, I found the problem. > Description: GCC-XML changed serialization of unnamed declarations ( > enums + namespaces ) > In previous version of GCC-XML, an element, that describes the > declaration has attribute "name" with some content. Now it does not > have this attribute. > > By the way, it was nothing wrong with SAX, but with my code. pygccxml > uses SAX to > parse XML files. It gaves huge speed improvement. > > The fix is simple: > file pygccxml/parser/scanner.py > > search and replace next string > attrs[ XML_AN_NAME ] > with > attrs.get( XML_AN_NAME, '' ) > > Or you can replace the file with one I attach with this mail. > Thanks! I replaced scanner.py in pygccxml source, ran python setup.py build + install, but the same problem is still there. I confirmed that scanner.py is updated. parsing files - started Reading project files: file by file Reading source file: [hello_world.hpp]. File has not been found in cache, parsing... Command line for GCC-XML: /usr/bin/gccxml -I"." -I"/usr/local/src/boost.cvs" "hello_world.hpp" -fxml="/tmp/tmpDRYXEY.xml" Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/tmp/python-4tAz49.py", line 17, in ? mb = module_builder.module_builder_t( File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py", line 76, in __init__ , cache ) File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py", line 101, in __parse_declarations decls = reader.read_files( files, compilation_mode ) File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 149, in read_files return self.__parse_file_by_file(files) File "/usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py", line 172, in __parse_file_by_file decls = reader.read_file( header ) File "/usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py", line 164, in read_file raise error KeyError: 'name' |