From 659b1a1576c81ed3b37276a2bccf73574fd59d06 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 16 Oct 2011 17:09:07 +0200 Subject: [PATCH] parser.yy: allow composite_music rather than closed_music in connection with lyrics --- lily/parser.yy | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lily/parser.yy b/lily/parser.yy index 40003772dc..3a51c7035c 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -1035,7 +1035,7 @@ braced_music_list: music: simple_music - | composite_music + | composite_music %prec FUNCTION_ARGUMENTS ; @@ -1119,14 +1119,13 @@ composite_music: | music_bare ; -/* Music that can't be followed by additional events or durations */ +/* Music that can be parsed without lookahead */ closed_music: music_bare | complex_music_prefix closed_music { $$ = FINISH_MAKE_SYNTAX ($1, @$, $2); - } %prec FUNCTION_ARGUMENTS - /* \addlyrics attaches to innermost closed_music */ + } ; music_bare: @@ -1439,7 +1438,7 @@ mode_changing_head_with_context: new_lyrics: ADDLYRICS { PARSER->lexer_->push_lyric_state (); } /*cont */ - closed_music { + composite_music { /* Can also use music at the expensive of two S/Rs similar to \repeat \alternative */ PARSER->lexer_->pop_state (); @@ -1448,16 +1447,16 @@ new_lyrics: } | new_lyrics ADDLYRICS { PARSER->lexer_->push_lyric_state (); - } closed_music { + } composite_music { PARSER->lexer_->pop_state (); $$ = scm_cons ($4, $1); } ; re_rhythmed_music: - closed_music new_lyrics { + composite_music new_lyrics { $$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL)); - } + } %prec FUNCTION_ARGUMENTS | LYRICSTO simple_string { PARSER->lexer_->push_lyric_state (); } music { -- 2.39.2