[antlr-interest] Antlr to BNF

Terence Parr parrt at cs.usfca.edu
Wed Mar 18 12:22:24 PDT 2009


org.antlr.tool.Strip is better; leaves source formatting.
T
On Mar 18, 2009, at 11:34 AM, Jim Idle wrote:

> Sam Barnett-Cormack wrote:
>>
>> 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).
>>
> The -print option of the ANTLR tool will do that of course.
>
> Jim
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list