fredag den 2. juni 2006

SableCCDoc

As part of the SIMAP project I am developing a programming language for secure multiparty computation. The programming language should of cause be documented in an approriate way, so the other participants can use the language for writing cool programs, but maintaning documentation is boring and tedious so I wanted to auto generate a description of the language from the grammar used by SableCC 3.2 parser generator we use. Furtunately Roger Keays have had a similar idea and created the HtmlPrinter class for SableCC 2.0. Based on the HtmlPrinter class I have updated it to version 3.2 and furthermore hacked the SableCC 3.2 grammar to recognize a special kind of comments, information tags, on productions which can be used to generate comments displayed with the productions in the resulting html page. Furthermore the new AST section use a namespaceseparate from the productions namespace, an ast node may have the same name as a production, so links can not be resolved uniquely by their names.

The new updated HtmlPrinter class has been wrapped into the SableCCDoc program which is available as tar-ball which contains a nice jar file and bash script for quick execution.

Ingen kommentarer:

Send en kommentar