[antlr-interest] Antlr to BNF

Sam Barnett-Cormack s.barnett-cormack at lancaster.ac.uk
Wed Mar 18 11:26:37 PDT 2009


Stevenson, Todd (GE Healthcare, consultant) wrote:
> I am looking for a utility to convert an Antlr grammar to a nice BNF
> document that I can use in my documentation.   Does one exist?  I poked
> around on the antlr site and the internet and couldn't see anything. I
> don't want to have to build one if I don't have to.

Well, strip out all the tree building, actions, etc, and you've got a
plain text version of the EBNF grammar... then you could just use a tool
to prettify it (convert it to whatever you like to do such things in -
LaTeX or whatever).

Of course, if you want pure BNF rather than EBNF, it's a bigger job...

Sam


More information about the antlr-interest mailing list