From: David Kastrup Date: Sat, 16 Nov 2013 12:24:11 +0000 (+0100) Subject: Let a PITCH_IDENTIFIER optionally be followed by octave modifiers X-Git-Tag: release/2.17.96-1~13 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e66e5da1017acb315bdfece931c2494515b10a87;p=lilypond.git Let a PITCH_IDENTIFIER optionally be followed by octave modifiers This makes pitch identifiers more similar to note names. There is no point in keeping the distinction just for triggering syntax errors on music that has no sensible other interpretation. --- diff --git a/lily/parser.yy b/lily/parser.yy index 26c4d8a994..83226fb9bb 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1627,7 +1627,8 @@ function_arglist_backup: { if (scm_is_true (scm_call_1 ($2, $4))) { - $$ = scm_cons ($4, $3); + MYREPARSE (@4, $2, PITCH_IDENTIFIER, $4); + $$ = $3; } else { $$ = scm_cons (loc_on_music (@3, $1), $3); MYBACKUP (PITCH_IDENTIFIER, $4, @4); @@ -2796,7 +2797,14 @@ steno_tonic_pitch: pitch: steno_pitch - | PITCH_IDENTIFIER + | PITCH_IDENTIFIER quotes { + if (!scm_is_eq (SCM_INUM0, $2)) + { + Pitch p = *unsmob_pitch ($1); + p = p.transposed (Pitch (scm_to_int ($2),0,0)); + $$ = p.smobbed_copy (); + } + } ; gen_text_def: