[Gambas-devel] Extracting Gambas documentation from C/C++ sources

Tobias Boege tobias at ...692...
Wed May 1 17:24:43 CEST 2013


Hi,

with reference to [0] from Nov 2012, I sat down today and wrote a bunch of
scripts to get Benoit's idea to reality. The project is attached together
with a sample component to test it.

The suite of programs takes C/C++ source files, extracts documentation
comments and merges them into an ordinary .info file from gbi3.

Currently, I think, methods and properties are supported, i.e. everything
that has a corresponding BEGIN_* line in the C/C++ source code. This means
no constants for now but that can easily be added with a little hack, I
think.

I grep'd through trunk and came to the conclusion that /** can't be used as
a starter for the documentation and */ can't be the end because this pattern
is used sometimes for C/C++ function documentation.

I freely added a 'G' flag and another asterisk respectively, so that
documentation that shall go into the .info file must be like:

/**G
 * ## Description ##
 * Self-destruct
 **/
BEGIN_METHOD_VOID(SomeClass_Func)

	//...

END_METHOD

The documentation refers to the next line that begins with BEGIN_*.

NOTE that I only deduced the .info format from the gb.map.info file. I may
actually be wrong with my interpretation :-)

I already spoke with Sebastian about the .info -> wiki import functionality
but he's busy. Without the import facility, I don't see any great use of
committing the code up and it's 12K. Small enough for a mail attachment.

Regards,
Tobi

[0] http://sourceforge.net/mailarchive/message.php?msg_id=30152060
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gb-help.tar.gz
Type: application/octet-stream
Size: 11449 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20130501/a9ceed99/attachment.obj>


More information about the Devel mailing list