[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hi,
If you watch the CVS commits list, you may have seen that I have written
a new makedoc tool in Haskell. It's sitting in the makedoc CVS module.
The idea was to write a relatively clean, declarative (and therefore
easy to modify) parser which could handle most of the constructs used in
existing makedoc documents. The parser turns makedoc documents into a
abstract syntax tree (using sweet-as algebraic datatypes). Backends do
not have to know the details of makedoc syntax _at all_; they only work
with the AST, which is supposed to tell them everything they need to
know. For example, style tags like <em> and even C variable & function
signatures in the '@@' lines are parsed. Haskell won't let you forget
to update a backend when the AST changes, so it's nice for maintenance.
Currently there exist [not completely polished] backends for:
- XML (that matches allegdoc.dtd, modulo extensions like subsections)
- LaTeX
- man pages
- plain text
A DocBook backend is on the way. The parser doesn't handle thanks._tx
or external files yet.
I hope this tool will be taken into consideration if we will be shipping
pregenerated documentation in the future.
Peter