From: David Kastrup Date: Thu, 30 Jun 2016 15:26:01 +0000 (+0200) Subject: Issue 4911/3: Don't treat context modification identifiers special X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=17378a326b64ebeaeb6f9454cde414923785a470;p=lilypond.git Issue 4911/3: Don't treat context modification identifiers special This requires using \with before context modifications like \RemoveEmptyStaves in order to make the syntax get along with fewer special cases and exceptions. --- diff --git a/lily/parser.yy b/lily/parser.yy index 3601ea8f6a..2accdb1eb7 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -346,7 +346,6 @@ If we give names, Bison complains. %token BOOK_IDENTIFIER %token CHORD_MODIFIER %token CHORD_REPETITION -%token CONTEXT_MOD_IDENTIFIER %token DRUM_PITCH /* Artificial token for durations in argument lists */ %token DURATION_ARG @@ -1494,14 +1493,6 @@ context_modification: parser->lexer_->pop_state (); $$ = $4; } - | WITH CONTEXT_MOD_IDENTIFIER - { - $$ = $2; - } - | CONTEXT_MOD_IDENTIFIER - { - $$ = $1; - } | WITH context_modification_arg { if (unsmob ($2)) { @@ -1567,11 +1558,6 @@ context_mod_list: if (!SCM_UNBNDP ($2)) unsmob ($1)->add_context_mod ($2); } - | context_mod_list CONTEXT_MOD_IDENTIFIER { - Context_mod *md = unsmob ($2); - if (md) - unsmob ($1)->add_context_mods (md->get_mods ()); - } | context_mod_list context_mod_arg { if (unsmob ($2)) { SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler"); @@ -4088,7 +4074,7 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid) return SCM_IDENTIFIER; } else if (unsmob (sid)) { *destination = unsmob (sid)->smobbed_copy (); - return CONTEXT_MOD_IDENTIFIER; + return SCM_IDENTIFIER; } else if (Music *mus = unsmob (sid)) { mus = mus->clone (); *destination = mus->self_scm ();