[antlr-interest] Documenting grammars

Sam Barnett-Cormack s.barnett-cormack at lancaster.ac.uk
Mon Mar 23 07:24:36 PDT 2009


Hi all,

So, we use doc-comments (/** */) in our grammars. However, as far as I
can tell, there's no way to auto-process these and generate nice docs.
Does anyone know of one?

*If* the answer is no, I'm interested in using some of my spare time to
create one. I've already looked into adapting the GPL source for javadoc
and the standard doclet. It wouldn't work with alternate doclets until
they were adapted as well, but it wouldn't be too hard to usurp the
framework of javadoc to work with grammars and rules - either new
doctypes and add handlers to the standard doclet, or amend the doclet to
use different words and so on. Oh, and create an antlrdoc tool based on
the javadoc tool source that parses grammars rather than java files.

This would have the nice advantage (for Java developers) of leading to
cross-compatible linking and so forth.

If there's no current way, or no satisfactory one, what support could I
get for developing this? Either other people contributing, or hosting
with the core stuff (as I think it'd be a damnuseful tool), or whatever?
 I assume there's an ANTLR grammar for ANTLR itself that I can base the
parser on...

Sam


More information about the antlr-interest mailing list