[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lilypond BNF

From: Carl Sorensen
Subject: Re: Lilypond BNF
Date: Tue, 26 Jul 2005 17:46:29 -0600

> 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? 

>  Also, 
> a couple of nitpicks
>   * BNF usually uses a slightly different syntax
>    <nonterminal> ::=  <nt1> <nt2>
> I believe. But frankly, I don't care about

I realize that Yacc syntax isn't standard BNF syntax.  I wasn't too
concerned about getting it into standard BNF.  I just wanted to get
something that would allow me to see what goes where in a lilypond input
file.  This means that when I have a question, I can do something other
than just search out an example, and hope that my modifications to it
work.  Perhaps I should have called it a simplified Yacc syntax (or
code-free Yacc syntax) rather than a BNF format.

>   * 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.


Carl Sorensen <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]