Re: [Epydoc-devel] Docstring parsing shortcomings
Brought to you by:
edloper
|
From: Hans M. <me...@in...> - 2007-05-18 14:29:01
|
Hi Edward!
Am Freitag, 11. Mai 2007 00:38:02 schrieb Edward Loper:
> Perhaps boost and/or sip could be encouraged to include some
> introspectable value that can be used to find the signature? Either
> by automatically including a signature at the beginning of the
> __doc__ attribute, or by adding a new attribute to the object? If
> they did that, I'd be happy to add support to epydoc for reading it.
I wrote a parser for the C++ signatures, using pyparsing.[*]
Even if the BPL people would not implement other support, that could bring
users a working solution now, with boost 1.34.0 (CVS or beta, widely used).
I attach the code for you consideration; the epydoc_*.diff for
docstringparser.py is far from finished, but hopefully shows what I mean.
[*] Of course, pyparsing would be a new dependency, but C++ signatures cannot
be parsed with regular expressions at all, IMO. I tried to make pyparsing be
only loaded if epydoc is ran on code with C++ signatures embedded, so there
could be a "pyparsing missing" warning just in that case.
--
Ciao, / /
/--/
/ / ANS
|