diff options
author | David Kastrup <dak@gnu.org> | 2016-06-30 17:26:01 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-07-10 19:44:46 +0200 |
commit | 17378a326b64ebeaeb6f9454cde414923785a470 (patch) | |
tree | 66f6fea8148381b8556e4f86c31124045b0e8338 /lily | |
parent | f587047ea429f72e18b403e930bcf617557dd621 (diff) |
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.
Diffstat (limited to 'lily')
-rw-r--r-- | lily/parser.yy | 16 |
1 files changed, 1 insertions, 15 deletions
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<Music> ($2)) { @@ -1567,11 +1558,6 @@ context_mod_list: if (!SCM_UNBNDP ($2)) unsmob<Context_mod> ($1)->add_context_mod ($2); } - | context_mod_list CONTEXT_MOD_IDENTIFIER { - Context_mod *md = unsmob<Context_mod> ($2); - if (md) - unsmob<Context_mod> ($1)->add_context_mods (md->get_mods ()); - } | context_mod_list context_mod_arg { if (unsmob<Music> ($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<Context_mod> (sid)) { *destination = unsmob<Context_mod> (sid)->smobbed_copy (); - return CONTEXT_MOD_IDENTIFIER; + return SCM_IDENTIFIER; } else if (Music *mus = unsmob<Music> (sid)) { mus = mus->clone (); *destination = mus->self_scm (); |