lilypond-user
[Top][All Lists]
Advanced

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

Re: BNF grammar


From: Bertalan Fodor (LilyPondTool)
Subject: Re: BNF grammar
Date: Fri, 12 Dec 2008 11:59:55 +0100
User-agent: Thunderbird 2.0.0.18 (Windows/20081105)

As LilyPond is based heavily on context-dependent parsing, I doubt there is a useful pure EBNF grammar. Anyway, if you look at the new antlr grammar work in progress for LilyPondTool http://lily4jedit.svn.sourceforge.net/viewvc/lily4jedit/trunk/LilyPondTool/src/lilytool/parser/lilypond/LilyPond.g3?revision=729&view=markup
you may have a clearer view on it.

Bert

Francisco Vila wrote:
2008/12/12 Dennis Harmath <address@hidden>:
  
Greetings,
I would like to get the pure (E)BNF grammar of the LilyPond language. I looked
for it in the package, but only found the bison parser code. Is it available
anywhere, or could it be generated somehow?
    

I once asked this and this was the answer:

http://www.nabble.com/Atomic-_expression_--to12995140.html#a13006974

I don't really know the internals in detail, but I think the LilyPond
language is complex because it mixes the expansion language Scheme
along with notes+lyrics+chords modes, and at the same time it
conserves the simplicity needed for everyday scores trhough a number
of implicit constructs. Probably this is where the word 'dirty' comes
from.

Yes, I'd also like to see those nice Pascal language diagrams I had to
learn years ago. A perfectly clean syntax would be desirable to ease
the development of third party plugins for editors etc.

  


reply via email to

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