← Back to team overview

dolfin team mailing list archive

C++ header parser for generation of documentation

 

Hello!

Kristian implemented our own C++ header parser in python to extract documentation and signatures. It is slow and for all I know not complete.

I just found a recent python library, which seems to be fast (based on David Beazely's ply implementation of a lex/yacc parser) and pretty complete.

  http://sourceforge.net/projects/cppheaderparser

While I do not see any urgent need to re-implement Kristian's hard work of extracting signatures and documentation to be piped to Sphinx I think it should be considered for possible future work.

For a fast intro of the capability:

sudo apt-get install python-lex python-pip
pip install CppHeaderParser

cd $DOLFIN_DIR
python -c 'import CppHeaderParser; CppHeaderParser.CppHeader("dolfin/mesh/Mesh.h").show()'

All classes and methods with documentation and complete signatures are iterable.

Johan


Follow ups