From: David Kastrup Date: Sat, 29 Oct 2011 10:44:15 +0000 (+0200) Subject: Move priority of \addlyrics and composite music below function arguments. X-Git-Tag: release/2.15.17-1~14 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=50bc6c738a1f5a4d7426b48e041a80a83a35ae9a;p=lilypond.git Move priority of \addlyrics and composite music below function arguments. Needed in order to make closed_music a subset of music recognizable without lookahead. --- diff --git a/lily/parser.yy b/lily/parser.yy index 1e693c89c0..dee6893ce3 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -56,6 +56,14 @@ or \repeat { \repeat } \alternative */ +%nonassoc COMPOSITE +%left ADDLYRICS + + /* ADDLYRICS needs to have lower precedence than FUNCTION_ARGUMENTS, + * or we won't be able to tell music apart from closed_music without + * lookahead in the context of function calls. + */ + %right FUNCTION_ARGUMENTS MARKUP LYRICS_STRING MARKUP_IDENTIFIER STRING STRING_IDENTIFIER MARKUPLIST WITH CONTEXT_MOD_IDENTIFIER MARKUPLIST_IDENTIFIER @@ -70,7 +78,6 @@ or /* The above are the symbols that can start function arguments */ -%left ADDLYRICS %left PREC_TOP @@ -1085,7 +1092,7 @@ braced_music_list: music: simple_music - | composite_music %prec FUNCTION_ARGUMENTS + | composite_music %prec COMPOSITE ; @@ -1485,7 +1492,7 @@ new_lyrics: re_rhythmed_music: composite_music new_lyrics { $$ = MAKE_SYNTAX ("add-lyrics", @$, $1, scm_reverse_x ($2, SCM_EOL)); - } %prec FUNCTION_ARGUMENTS + } %prec COMPOSITE | LYRICSTO simple_string { PARSER->lexer_->push_lyric_state (); } music {