Generates BNF documentation from a grammar.