Multi Language Documentation

Commenting Wrappers
Manual Pages for Lisp
Manual Pages for Ruby
Manual Pages for Python

The wrapper code generation uses »startcommentary«, »startproc« and »endproc« to copy the comment into the generated wrapper code. See Example 9.18, “Lisp Wrapper Commented”.

The default values for the parameters are stated in the generated comment.


The generated Python comments support pydoc .

The generated Ruby comments support rdoc, .

Jeszra currently supports Tcl/Tk as the sole project types. Jeszra’s own design is in principal open for other languages and toolkits.

The most important factor for language and toolkit independence is the separation between parser and composer. The same approach applies for the DocBook generation as-well.

As a consequence Jeszra can be tricked into generating documentation for other languages, based on Tcl/Tk projects. These mechanism was employed to generate DocBook refentry documents for the Lisp, Ruby and Python wrapper classes.

# Defines the project type,
# and the programming language
# added to the embedded examples:
proc vgfile::getType {} { return "lisp"}
proc vgfile::docbookLanguage {} {
   return lisp }

# Language specific »signatures« and usage:
proc dumper::docbook::generalForm t
proc dumper::docbook::cgetForm t
proc dumper::docbook::configureForm t
proc dumper::docbook::signatureOf {t c _}
proc dumper::docbook::synopsisOf t
        

Through getType retrieves the file extension of the project, in the case of Lisp : »lisp« for .lisp.

docbookLanguage is only being used by the DocBook generation. This procedure returns the name of the programming language; which is then used as a language attribute, to select the proper syntax highlighting. An example for Ruby is shown in Example 9.20, “Generated Ruby”


The code presented inside Example 9.19, “Customized Lisp Refentry” is bundled in a separate package lispDocbook implemented in module lispdocbook.tcl.

All these alterations are to be applied on the project itself –for example inside the shell, on the Local: prompt, to alter the assumed type of a given project. Do not apply these modifications on a modified project, because the modification will be lost.

Jeszra: +-
Local :package require lispDocbook
        

The mechanism for Ruby wrapper manual pages is identical to Lisp.

The Example 9.20, “Generated Ruby” shows the language attribute for a programlisting, as specified by: vgfile::docbookLanguage.


A separate package rubyDocbook performs the customization on a given project.

The mechanism for Python wrapper manual pages is identical to Lisp.

A separate package pythonDocbook performs the customization on a given project.