Re: CComment and problem with ctool.so
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
Bernhard Fischer wrote:
> Hi Stefan,
>
>
> I'm getting an undefined symbol when trying to use the C parser. Source
> was checked out 2005-02-19:
>
> synopsis -v -d -p C -I. -I../../include -I../../../../include -I../../../../include/asm/mach-default -l CComments -Wp,preprocess,cppflags="' '" -o sdp_advt.syn sdp_advt.h
> Unable to import Synopsis.Parsers.C.Parser
> Reason :
> /opt/local/lib/python2.4/site-packages/Synopsis/Parsers/C/ctool.so:
> undefined symbol: _ZN8Synopsis5Trace8my_levelE
> make: *** [sdp_advt.syn] Error 255
>
> Do you have an idea on what i could be doing wrong?
Yes. You aren't doing anything wrong. I have moved the 'Trace' class
without adjusting the ctool parser. I hadn't expected that anybody was
using it :-/
Do you have plans to use synopsis with C code ? If so, may be you are
interested in testing the Cxx parser used in 'C mode'. My plans are
to check in a new python frontend that calls the Cxx parser in C mode
and as soon as that is confirmed to work retire the ctool backend.
Let me know if you are interested in testing it, or want to help in
other ways.
> Attached is a quick C style comment parser. Before applying it, one
> should make the intermittent asterisk optional, though.....
That looks good !
You are right about the asterisk. In fact, I would add the restriction
that the asterisks have to be aligned, i.e.
/*
* ...
*/
would count, but
/* comment showing that
*foobar is the dereferenced foobar.
*/
would not. The asterisk being optional should be expressed using
the usual 'Parameter' idiom used everywhere else in the synopsis
frontend.
Would you mind adjusting your patch ?
Thanks !
Stefan