-/*
-TODO: use code generation for this
-*/
-music_function_musicless_function:
- MUSIC_FUNCTION {
- $$ = scm_list_2 ($1, make_input (@$));
- }
- | MUSIC_FUNCTION_SCM function_scm_argument {
- $$ = scm_list_3 ($1, make_input (@$), $2);
- }
- | MUSIC_FUNCTION_MARKUP full_markup {
- $$ = scm_list_3 ($1, make_input (@$), $2);
- }
- | MUSIC_FUNCTION_SCM_SCM function_scm_argument function_scm_argument {
- $$ = scm_list_4 ($1, make_input (@$), $2, $3);
- }
- | MUSIC_FUNCTION_SCM_SCM_SCM function_scm_argument function_scm_argument function_scm_argument {
- $$ = scm_list_5 ($1, make_input (@$), $2, $3, $4);
- }
- | MUSIC_FUNCTION_MARKUP_MARKUP full_markup full_markup {
- $$ = scm_list_4 ($1, make_input (@$), $2, $3);
+/* An argument list. If a function \foo expects scm scm music, then the lexer expands \foo into the token sequence:
+ MUSIC_FUNCTION EXPECT_MUSIC EXPECT_SCM EXPECT_SCM
+and this rule returns the reversed list of arguments. */
+
+function_arglist_music_last:
+ EXPECT_MUSIC function_arglist music {
+ $$ = scm_cons ($3, $2);