%token TEMPO "\\tempo"
%token TIMES "\\times"
%token TRANSPOSE "\\transpose"
-%token TRANSPOSITION "\\transposition"
%token TYPE "\\type"
%token UNSET "\\unset"
%token WITH "\\with"
%type <scm> music_function_event
%type <scm> music_function_chord_body
%type <scm> music_function_musicless_prefix
+%type <scm> music_function_musicless_function
%type <scm> bass_figure
%type <scm> figured_bass_modification
%type <scm> br_bass_figure
/*
TODO: use code generation for this
*/
-generic_prefix_music_scm:
+music_function_musicless_function:
MUSIC_FUNCTION {
$$ = scm_list_2 ($1, make_input (@$));
}
| MUSIC_FUNCTION_MARKUP full_markup {
$$ = scm_list_3 ($1, make_input (@$), $2);
}
- | music_function_musicless_prefix music {
- $$ = ly_append2 ($1, scm_list_1 ($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_MUSIC full_markup music {
+ | MUSIC_FUNCTION_MARKUP_MARKUP full_markup full_markup {
$$ = scm_list_4 ($1, make_input (@$), $2, $3);
}
- | MUSIC_FUNCTION_MARKUP_MARKUP full_markup full_markup {
+ ;
+
+/*
+TODO: use code generation for this
+*/
+music_function_musicless_prefix:
+ MUSIC_FUNCTION_MUSIC {
+ $$ = scm_list_2 ($1, make_input (@$));
+ }
+ | MUSIC_FUNCTION_SCM_MUSIC function_scm_argument {
+ $$ = scm_list_3 ($1, make_input (@$), $2);
+ }
+ | MUSIC_FUNCTION_SCM_SCM_MUSIC function_scm_argument function_scm_argument {
$$ = scm_list_4 ($1, make_input (@$), $2, $3);
}
+ | MUSIC_FUNCTION_SCM_SCM_SCM_MUSIC function_scm_argument function_scm_argument function_scm_argument {
+ $$ = scm_list_5 ($1, make_input (@$), $2, $3, $4);
+ }
+ | MUSIC_FUNCTION_SCM_SCM_SCM_SCM_MUSIC function_scm_argument function_scm_argument function_scm_argument function_scm_argument {
+ $$ = scm_list_n ($1, make_input (@$), $2, $3, $4, $5, SCM_UNDEFINED);
+ }
+ | MUSIC_FUNCTION_MARKUP_MUSIC full_markup {
+ $$ = scm_list_3 ($1, make_input (@$), $2);
+ }
+ ;
+
+generic_prefix_music_scm:
+ music_function_musicless_function {
+ $$ = $1;
+ }
+ | music_function_musicless_prefix music {
+ $$ = ly_append2 ($1, scm_list_1 ($2));
+ }
| MUSIC_FUNCTION_MUSIC_MUSIC music music {
$$ = scm_list_4 ($1, make_input (@$), $2, $3);
}
}
;
+
optional_id:
/**/ { $$ = SCM_EOL; }
| '=' simple_string {
;
music_function_chord_body:
- MUSIC_FUNCTION {
- $$ = scm_list_2 ($1, make_input (@$));
+ music_function_musicless_function {
+ $$ = $1;
}
| music_function_musicless_prefix chord_body_element {
$$ = ly_append2 ($1, scm_list_1 ($2));
music_function_musicless_prefix post_event {
$$ = ly_append2 ($1, scm_list_1 ($2));
}
- ;
-
-/*
-TODO: use code generation for this
-*/
-music_function_musicless_prefix:
- MUSIC_FUNCTION_MUSIC {
- $$ = scm_list_2 ($1, make_input (@$));
- }
- | MUSIC_FUNCTION_SCM_MUSIC function_scm_argument {
- $$ = scm_list_3 ($1, make_input (@$), $2);
- }
- | MUSIC_FUNCTION_SCM_SCM_MUSIC function_scm_argument function_scm_argument {
- $$ = scm_list_4 ($1, make_input (@$), $2, $3);
- }
- | MUSIC_FUNCTION_SCM_SCM_SCM_MUSIC function_scm_argument function_scm_argument function_scm_argument {
- $$ = scm_list_5 ($1, make_input (@$), $2, $3, $4);
- }
- | MUSIC_FUNCTION_SCM_SCM_SCM_SCM_MUSIC function_scm_argument function_scm_argument function_scm_argument function_scm_argument {
- $$ = scm_list_n ($1, make_input (@$), $2, $3, $4, $5, SCM_UNDEFINED);
+ | music_function_musicless_function {
+ $$ = $1;
}
;
-
+
command_element:
command_event {
$$ = MAKE_SYNTAX ("bar-check", @$, SCM_UNDEFINED);
}
- | TRANSPOSITION pitch {
- Pitch middle_c;
- Pitch sounds_as_c = pitch_interval (*unsmob_pitch ($2), middle_c);
- $$ = MAKE_SYNTAX ("property-operation", @$, SCM_BOOL_F, ly_symbol2scm ("Staff"), ly_symbol2scm ("PropertySet"), ly_symbol2scm ("instrumentTransposition"), sounds_as_c.smobbed_copy ());
- }
| PARTIAL duration_length {
Moment m = - unsmob_duration ($2)->get_length ();
$$ = MAKE_SYNTAX ("property-operation", @$, SCM_BOOL_F, ly_symbol2scm ("Timing"), ly_symbol2scm ("PropertySet"), ly_symbol2scm ("measurePosition"), m.smobbed_copy ());
$$ = t->unprotect ();
}
| DIGIT {
- Music *t = MY_MAKE_MUSIC ("FingerEvent");
+ Music *t = MY_MAKE_MUSIC ("FingeringEvent");
t->set_property ("digit", scm_from_int ($1));
t->set_spot (@$);
$$ = t->unprotect ();