lilypond-devel
[Top][All Lists]
Advanced

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

Re: Question on commit c478396f Move all doc building logic to Documenta


From: David Kastrup
Subject: Re: Question on commit c478396f Move all doc building logic to Documentation/GNUmakefile
Date: Thu, 30 Sep 2021 01:32:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

John Wheeler <wheelerwjx9@runbox.com> writes:

> On 9/29/2021 3:35 PM, David Kastrup wrote:
>> John Wheeler <wheelerwjx9@runbox.com> writes:
>>
>>> Hello,
>>>
>>> Would someone please help me understand the reasoning behind removing
>>> the grammar from the Contributor's Guide?  Was there a licensing
>>> issue?
>> It was more of a matter of it having become comparatively uninformative
>> due to lots of LilyPond functionality getting moved into music
>> functions, and music function parsing governed to a significant degree
>> by actions generating synthetic tokens in addition to rules of the
>> grammar, making large parts of the printed grammar (which only reflects
>> the rules) comparatively unsuitables for figuring out what music
>> constructs may or may not end up being valid.
>>
>> So it was more of a point of "nobody uses this anyway" in connection
>> with "and good luck if they tried" I think.
>>
> Thank you to both you and Jean.
>
> I must be the one exception to "nobody uses this", I appreciate the
> "good luck" wish.
>
> I did wonder why the lexer state was so tightly linked to the parser.

4 can be a number.  It can be a duration.  It can be a music expression
(a pitchless note).  -4 can be a number.  It can also be a fingering
expression.

The syntax disambiguated what it was, but music functions intended to be
flexible have to be able to take all that.  This requires music
functions to be able to drive the syntactical interpretation depending
on what kind of expression they are prepared to accept.

There is, obviously, a cost in that kind of ambiguity regarding how to
reliably read and interpret LilyPond input with other tools: syntax
highlighters, editors with dedicated LilyPond modes, convert-ly,
converters into other formats...

And also in how useful the grammar is to human readers when common
constructs like \time, \key, \transpose, \relative and others just
disappear from view because they are implemented as music functions and
new constructs like \voices 2,3,4 are added without being reflected in
the grammar.
-- 
David Kastrup



reply via email to

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