Re: [PATCH 4/6] autodoc: add a sphinx c:autodoc directive for the extracted doc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 15, 2018 at 11:45:47AM +0300, Jani Nikula wrote:
> On Mon, 14 May 2018, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote:
> > Add a sphinx extension for the c:autodoc directive which will
> > extract the doc and inject it into the document tree.
> >
> > This part is based on Jani Nikula's project: hawkmoth [1]
> > which has exactly the same goal as this series but which
> > use clang to parse the C code and extract the bloc-coments.
> 
> PS. My primary goal from the start was to reuse a real C language parser
> instead of writing yet another regexp based parser in the style of
> kernel-doc the perl script. The project would never have seen the light
> of day otherwise. I looked into gcc, sparse, and some other parsers
> before settling on python-clang. The codebase is just a few hundred
> lines of python.
> 
> Which brings us to the secondary goal of minimalism. There's already
> Doxygen, with Breathe to bridge the gap to Sphinx, but they're huge
> projects with creeping featurism. I don't want any of that. I offload as
> much as possible to python-clang and Sphinx, with minimal glue in
> between. Granted, Hawkmoth is nowhere near complete, but I aim for the
> sweet spot of enough features with a minimal codebase, sane defaults
> with minimal configuration, good enough for documenting most C projects.
> 
> I do understand some folks don't really appreciate the clang
> dependency. Folks like other compiler developers. ;)

Yes, I agree. kernel-doc or any other regexp 'parsing' doesn't seem a
good idea to me and it's already quite big, doxygen is too big and too
fragile, and using clang and its python binding is good/natural choice.
I would have prefered to simply reuse your hawkmoth as-is but:
*) in sparse's context it's a bit strange to use clang
*) I prefer to have as few dependencies as possible.

Best regards,
-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux