RE: Problems with templates ???
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <20DCDD8F0FCED411AC4D001083CF504501AA988F@MTL-EXCHANGE> |
> From: Serge Iovleff [mailto:[email protected]] > Stefan Seefeld a écrit : > > Hi Serge, > > > > Here are two little issues with your makefile, though > > I doubt they cause the error you are seeing: > > > > > >># -Wp,-t means the parser store trailing comments in dummy > >># -Wp,-b,dir means the parser is using the dir as basename > > > > > > there is no '-Wp,-t' nor a '-Wp,-b' option. (As I said, calling > > conventions changed rather dramatically after 0.5) > > > > Sorry, I don't read the doc with care... > > An other bug to solve : > > synopsis -p Cxx -l JavaComments,JavaTags,SSComments,Previous > -Wp,-I../include/ -Wp,--base_path,../include/ -o > ../doc/STK_Index.h.syn ../include/STK_Index.h > Traceback (most recent call last): > File "/usr/bin/synopsis", line 181, in ? > main() > File "/usr/bin/synopsis", line 178, in main > processor.process(AST.AST()) > File > "/usr/lib/python2.3/site-packages/Synopsis/Processor.py", > line 152, in process > ast = self.processors[0].process(ast, **my_kwds) > File > "/usr/lib/python2.3/site-packages/Synopsis/Parsers/Cxx/Parser. > py", line 62, in process > debug = self.debug) > File > "/usr/lib/python2.3/site-packages/Synopsis/Parsers/Cpp/Parser. > py", line 33, in process > base_path = self.base_path and > os.path.abspath(self.base_path) + os.sep or '' > File "/usr/lib/python2.3/posixpath.py", line 395, in abspath > if not isabs(path): > File "/usr/lib/python2.3/posixpath.py", line 49, in isabs > return s.startswith('/') > AttributeError: 'bool' object has no attribute 'startswith' ok, that was my fault as I told you the wrong argument syntax. Calling '-Wp,aaa,bbb,ccc' will result in the parser being called with arguments 'aaa', 'bbb', and 'ccc'. The argument you want to pass is '--base_path=dir', and so you should call '-Wp,--base_path=dir'. In the above case the parser received the arguments '--base_path' and 'dir', i.e. two arguments, not a name/value pair. Any argument that doesn't have a value gets set to 'True', hence the confusion when python tries to apply the 'startswith' method to it (expecting it to be a string). I admit that this is quite complex, but that's what you end up with if you want to fine-tune a tool all via command line args ('see, I told you !' ;-) May be the situation could be enhanced a bit by letting individual processors check that the arguments have the expected type before using them... Regards, Stefan