Carl Sorensen <[EMAIL PROTECTED]> writes: > Almost a year ago, Pedro Kroger was working on a bnf description of > lilypond. (see http://lists.gnu.org/archive/html/lilypond- > devel/2004-10/msg00074.html). Han-Wen suggested hacking Bison so that > it would produce the BNF directly from the .yy file. > > I went a different direction, and produced a python script that ignores > all the C++ stuff in parser.yy, resulting in a BNF description of > lilypond that is generated directly from the parser. > > I've attached the script (yy2bnf.py), along with the result of running > the script on the current CVS version of parser.yy (lilypond.bnf). > > I'd like to suggest that lilypond.bnf be added to the documentation, to > be automatically generated as part of the make process, using yy2bnf.py. > > Thanks, > > Carl Sorensen
It might be a good idea to process the output of `bison -v parser.yy`: parser.output contains the rules, and lists terminals and non-terminals, with references to the rules where they appear (and some more informations). nicolas _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
