From: David Kastrup Date: Wed, 30 Oct 2013 20:01:39 +0000 (+0100) Subject: Permit event functions to use a non-closed argument list. X-Git-Tag: release/2.19.0-1~69^2~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2a984a02e2d85732e92eb1fd95cc0a73fc40c60d;p=lilypond.git Permit event functions to use a non-closed argument list. --- diff --git a/lily/parser.yy b/lily/parser.yy index e0019a23c6..9e257060ae 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -81,7 +81,7 @@ or %left ADDLYRICS %right ':' UNSIGNED REAL E_UNSIGNED EVENT_IDENTIFIER EVENT_FUNCTION '^' '_' - HYPHEN EXTENDER DURATION_IDENTIFIER + HYPHEN EXTENDER DURATION_IDENTIFIER '!' /* The above are needed for collecting tremoli and other items (that could otherwise be interpreted as belonging to the next function @@ -2750,7 +2750,7 @@ music_function_call_closed: ; event_function_event: - EVENT_FUNCTION function_arglist_closed { + EVENT_FUNCTION function_arglist { $$ = MAKE_SYNTAX ("music-function", @$, $1, $2); } @@ -2797,7 +2797,7 @@ post_event_nofinger: direction_less_event { $$ = $1; } - | script_dir music_function_call_closed { + | script_dir music_function_call { $$ = $2; if (!unsmob_music ($2)->is_mus_type ("post-event")) { parser->parser_error (@2, _ ("post-event expected")); @@ -3499,7 +3499,13 @@ exclamations: ; questions: - { $$ = SCM_UNDEFINED; } +// This precedence rule is rather weird. It triggers when '!' is +// encountered after a pitch, and is used for deciding whether to save +// this instead for a figure modification. This should not actually +// occur in practice as pitches and figures are generated in different +// modes. Using a greedy (%right) precedence makes sure that we don't +// get stuck in a wrong interpretation. + { $$ = SCM_UNDEFINED; } %prec ':' | questions '?' { if (SCM_UNBNDP ($1))