Current stable version is Mole 3.7
Chicken package by Felix Winkelmann.
SXML-based source code transformation tool
which may be used as Literate Programming or Elucidative Programming tool,
for souce code mining, Extreme Programming, and more.
Mole reads the Scheme source code and parse it to the structural elements using
";====" as chapter separator, ";----" as section start, ";^^^^" as section end
(if necessary) and "; " or "(" at the beginning of the "chunk".
Chunk may be a function, macro, binding, etc. More documentation on the source
code formatted style may be found in
the Mole manual
and in the paper
"Scheme Program Source Code as a Semistructured Data" presented at
2nd Workshop on Scheme and Functional Programming.
Parsed data is represented as the SXML tree.
A number of usefull reports may be generated querying this data. For example,
Mole may be used as a tool for automated documentation generation. For such a
purpose it works as a filter that reads documented Scheme code from the
standard input and produces some kind of hypertext documentation in the HTML
format to the standard output.
Mole-generated Mole documentation
is an example of such a report.
It is generated with a command
mole <mole.scm >mole-doc.html
Use the command
for usage instructions.
Previous Mole version 2.X reads the Scheme source code and parse it to the
elements using ";;;" and ";;;;" comments in accordance with the
Tutorial on Good Lisp Programming
It may be also used for the selection of the specified functions from
the source code file, etc. In the 3.X family this functionality is supported
via custom reports.
Since version 3.4 Mole has an ability to attach a test suite to every
function in documentation which has a test case in a test fixture
file specified with --tf=file option.
If the file name is omitted (an option --tf ), then file xtest-fixture.scm
in subdirectory test is used.
Test cases are
they has to be formatted as follows:
;@ name (optional)
; description (optional)
Please note the closing )
in first position (It's used to detect end of
If the name of the function tested may be not detected automatically,
it has to be specified explicitly using
comment before the test case.
Processing of test fixture file may be controlled using
comment as an explicit end of file. The rest of test fixture will
be not processed by Mole.
For every function with test suite clicable [+]
is included in table of