%lex-param {Lily_parser *parser}
/* We use SCMs to do strings, because it saves us the trouble of
-deleting them. Let's hope that a stack overflow doesnt trigger a move
+deleting them. Let's hope that a stack overflow doesn't trigger a move
of the parse stack onto the heap. */
%left PREC_BOT
event_chord:
simple_element post_events {
// Let the rhythmic music iterator sort this mess out.
- unsmob_music ($1)->set_property ("articulations",
- scm_reverse_x ($2, SCM_EOL));
+ if (scm_is_pair ($2))
+ unsmob_music ($1)->set_property ("articulations",
+ scm_reverse_x ($2, SCM_EOL));
}
| simple_chord_elements post_events {
SCM elts = ly_append2 ($1, scm_reverse_x ($2, SCM_EOL));
}
| music_function_chord_body
{
- if (!unsmob_music ($$)->is_mus_type ("rhythmic-event")) {
+ Music *m = unsmob_music ($1);
+
+ while (m && m->is_mus_type ("music-wrapper-music")) {
+ $$ = m->get_property ("element");
+ m = unsmob_music ($$);
+ }
+
+ if (!(m && m->is_mus_type ("rhythmic-event"))) {
parser->parser_error (@$, _ ("not a rhythmic event"));
$$ = SCM_UNDEFINED;
}
lyric_element
| lyric_element multiplied_duration post_events {
$$ = MAKE_SYNTAX ("lyric-event", @$, $1, $2);
- unsmob_music ($$)->set_property
- ("articulations", scm_reverse_x ($3, SCM_EOL));
+ if (scm_is_pair ($3))
+ unsmob_music ($$)->set_property
+ ("articulations", scm_reverse_x ($3, SCM_EOL));
}
| lyric_element post_event post_events {
$$ = MAKE_SYNTAX ("lyric-event", @$, $1,
}
| LYRIC_ELEMENT optional_notemode_duration post_events {
$$ = MAKE_SYNTAX ("lyric-event", @$, $1, $2);
- unsmob_music ($$)->set_property
- ("articulations", scm_reverse_x ($3, SCM_EOL));
+ if (scm_is_pair ($3))
+ unsmob_music ($$)->set_property
+ ("articulations", scm_reverse_x ($3, SCM_EOL));
}
;
lyric_element_music:
lyric_element optional_notemode_duration post_events {
$$ = MAKE_SYNTAX ("lyric-event", @$, $1, $2);
- unsmob_music ($$)->set_property
- ("articulations", scm_reverse_x ($3, SCM_EOL));
+ if (scm_is_pair ($3))
+ unsmob_music ($$)->set_property
+ ("articulations", scm_reverse_x ($3, SCM_EOL));
}
;