This is a rather straightforward patch to take \relative out of the grammar and let ...
12 years, 7 months ago
(2011-09-24 23:00:08 UTC)
#1
This is a rather straightforward patch to take \relative out of the grammar and
let it be implemented as a music function.
I have copied some code from parser.yy straight to music-scheme.cc to make
ly:make-music-relative!. This code keeps the original indentation so that git
blame -C will recognize its origin. If desired, the indentation can be fixed
with a separate commit instead.
I have not touched the lily_1_8_relative wart when working on this. So there
are a few likely changes offering themselves, but it seems to be cleaner to me
if they are in a separate commit.
One surprise was that I got 18 additional shift/reduce conflicts when removing
\relative that needed to get fixed by augmenting the operator list.
This suggests that it might be possible to introduce some artificial terminal
symbols and corresponding rules (taking the old place of RELATIVE and more in
the grammar) not actually produced by the lexer to cut down on the number of
symbols needing operator priorities.
Interesting.
Regtests pass with good visuals on my system (I think), so I am pushing this to
dev/staging. It seems like a reasonably solid change to me, and in good shape.
Since there will be almost no documents not going through the new code paths, it
should move to master only after a full check including DOC builds on clean
systems.
Issue 5123043: parser.yy et al: Make \relative a music function.
(Closed)
Created 12 years, 7 months ago by dak
Modified 12 years, 7 months ago
Reviewers:
Base URL:
Comments: 0