[antlr-interest] How do you document your grammars?

Ana Nelson nelson.ana at gmail.com
Fri Mar 14 08:45:34 PDT 2008


Hi, Ralf,

HTML might be simpler to generate than LaTeX, plus it's a more natural
choice if you want to hyperlink things. :-)

It seems like this should be a straightforward (and interesting) thing to
do, parsing your grammar file itself and then generating HTML. (Of course,
I'm saying that without having tried it.) Have you tried an approach like
this or did you do something else?

If you have unit tests for your grammar with descriptive names that can also
be a nice way to generate documentation.

Regards,
Ana


On 12/03/2008, Ralf Cremerius <ralf_c at web.de> wrote:
>
> Hello,
>
> I've got to build some documentation for my ANTLR project now and found
> the question, how to do this efficiently, to be very common?
> In my case, nothing absolutely magical (like complex actions, etc.)
> happens inside the ANTLR grammar, so the EBNF-notation seems to be very
> suitable to document the recognized language.
> Moreover it would be very practical to have a EBNF-grammar with clickable
> hyperlinks between rule occurences and their respective definitions.
> I tried to do this with LaTeX, but it is a tedious and error prone task.
> Has anyone a better solution, how to do it (ideally generating some of the
> contents)?
>
> Of course, ANTLRWorks would theoretically have the capabilities to
> accomplish this - but it isn't made to generate hyperlinked EBNFs.  ;-)
>
> Best regards,
>   Ralf
> _______________________________________________________________
> Schon gehört? Der neue WEB.DE MultiMessenger kann`s mit allen:
> http://www.produkte.web.de/messenger/?did=3015
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080314/7af5fabc/attachment.html 


More information about the antlr-interest mailing list