1

At work, along with the more "typical" languages like Java and Python (for which we have pretty good documentation tools already), we have quite a lot of SAS code as well. The work there to produce common, re-usable SAS macros has been going well, but that means we now have more than our existing manual documentation and training processes can handle. We therefore need to automatically generate browsable documentation for this code, in html format so everyone can view it, and ideally make it searchable too.

For SAS code, the documentation generation options seem pretty limited, with DocItOut (formerly SASDoc) being about the only option, and that hasn't seen updates in a few years. Based on the screenshots, the generation is a bit clunky, the output somewhat dated, and no search. Additionally, we have quite a bit of custom metadata in the file headers we'd like to expose too.

I'm therefore thinking that the easiest option might be to find a good, modern, language-pluggable code documentation system, and then drop in a custom parser for SAS code, including support for our custom header metadata too. Writing a parser should be pretty easy for me, based on work I've already done for parsing SAS code elsewhere, so I just need a framework that's easy to plug new languages into.

What's a good code documentation generation system, with pluggable support for new / custom languages? Bonus marks if it includes search as well

1

I would suggest giving the Sphinx Document Generator a try:

  • Free/Gratis/Open Source
  • Written in Python
  • You can extend the language support by adding a new domain: currently Ada, CoffeeScript, Erlang, HTTP, Lasso, MATLAB, PHP, and Ruby domains. Also available are domains for Common Lisp, dqn, Go, Jinja, Operation, and Scala.
  • Modern, good looking, custom style(s).
  • Multiple documentation type outputs - HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text
  • Automatic indices: general index as well as a language-specific module indices.
  • Automatic highlighting using the Pygments highlighter which is itself extendable usually by adding a regex lexer.
  • Search available in HTML output using a JavaScript-based offline search.
1

Doxygen is a popular, multi-language documentation generator. It is primarily for C++ (probably one of the most complex languages) but includes support for a few others, too.

http://www.doxygen.nl/

It may be the most popular such tool outside of JavaDoc/Python docstrings.

If you only want syntax highlighting, try pygments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.