Re: Bug in \relative parsing?
David Kastrup <[email protected]>
| Newsgroups | gmane.comp.gnu.lilypond.devel |
|---|---|
| Organization | Organization?!? |
| Message-ID | <[email protected]> |
Luca Fascione <[email protected]> writes: > I think the explanation could be something like this, adjust the tone as > you see fit to better match your overall style: > > ++++++++++ > A word about syntax: > The fact that startpitch is optional introduces an ambiguity in the > grammar, when parsing music that doesn't have braces around it. The > lilypond front end is somewhat eager when parsing what follows `\relative`, > and it will try fairly hard to gather a `startpitch` as much as it can. > This can be confusing when blocks are not delimited by curly braces, as we > were saying. For example if you had `b \relative c4 d` this would be parsed > as `b \relative c { 4 } d` where the "freestanding" 4 will reproduce the > `b` note standing before the `\relative` block. Note that this implicit > repeated note would _not_ undergo "relativization": if you had `b \relative > c''4 d` you would get the effect of `b \relative c'' { 4 } d` which means `b > \relative c { b4 } d e` and not `b \relative c'' { b4 } d`. Consistent use > of braces around the music and not around startpitch avoids this issue > entirely. > ++++++++++ The manual does not suggest omitting the braces, so that bit of verbiage is only helpful to those few people who don't actually follow the presented style. The NR already is something like 600 pages. It would become unreadable if we tried going to that depth. -- David Kastrup