That would be cool, but just dumping a BNF somewhere is a bit
half-baked. Wouldn't it be better to make a "literate Yacc", where we
intersperse explanations of the grammar (in texinfo format, so it can be
integrated with the program reference manual) with the BNF itself?
Yes, this would be better. But it would require more development time
for me than I want to put into the project. I'd like to use my limited
development time to get a FretDiagram context into lilypond. That's why
I used python to make a hack that was quick and dirty.
Just out of curiousity, what kind of texinfo information would you like
to put in a Yacc/Bison source file by way of grammar explanation?
* The current script doesn't strip /* */ comments.
That was a conscious decision on my part (but maybe not the best
decision). I'll be happy to change the script to strip the /* */
comments, if you think it's useful for lilypond. If not, I'll just use
it for my benefit.