%type <outputdef> output_def
%type <scm> lilypond_header lilypond_header_body
-%type <music> open_event_parens close_event_parens open_event close_event
-%type <music> event_with_dir event_that_take_dir verbose_event
+%type <music> open_event close_event
%type <i> sub_quotes sup_quotes
%type <music> simple_element event_chord command_element Simple_music Composite_music
%type <music> Repeated_music
%type <scm> verbose_duration
%type <scm> post_events
-%type <music> gen_text_def
+%type <music> gen_text_def direction_less_event direction_reqd_event
%type <scm> steno_pitch pitch absolute_pitch pitch_also_in_chords
%type <scm> explicit_pitch steno_tonic_pitch
%type <music> command_req verbose_command_req
%type <music> extender_req
%type <music> hyphen_req
-%type <music> string_event
+%type <music> string_number_event
%type <scm> string bare_number number_expression number_term number_factor
%type <score> score_block score_body
scm_gc_unprotect_object (p->self_scm ());
- $$->set_mus_property ("last-pitch", p->to_relative_octave (pit).smobbed_copy ());
+ if (lily_1_8_relative)
+ $$->set_mus_property ("last-pitch", p->to_relative_octave (pit).smobbed_copy ());
}
;
| hyphen_req {
$$ = $1;
}
- | '~' {
- $$ = MY_MAKE_MUSIC("TieEvent");
- }
- | '[' {
- Music *b= MY_MAKE_MUSIC("BeamEvent");
- b->set_mus_property ("span-direction", gh_int2scm (START));
- $$ = b;
-
- THIS->last_beam_start_ = b->self_scm ();
- }
- | ']' {
- Music *b= MY_MAKE_MUSIC("BeamEvent");
- b->set_mus_property ("span-direction", gh_int2scm (STOP));
- $$ = b;
- }
| BREATHE {
$$ = MY_MAKE_MUSIC("BreathingSignEvent");
}
}
;
+
+
post_event:
- verbose_event
- | event_with_dir
- | close_event
- | string_event
+ direction_less_event {
+ $$ = $1;
+ }
+ | script_dir direction_reqd_event {
+ $2->set_mus_property ("direction", gh_int2scm ($1));
+ $$ = $2;
+ }
+ | script_dir direction_less_event {
+ $2->set_mus_property ("direction", gh_int2scm ($1));
+ $$ = $2;
+ }
+ | string_number_event
;
-string_event:
+string_number_event:
E_UNSIGNED {
Music * s = MY_MAKE_MUSIC("StringNumberEvent");
s->set_mus_property ("string-number", gh_int2scm($1));
;
-event_that_take_dir:
- gen_text_def
- | verbose_event
- | close_event
- | open_event
- | '[' {
+direction_less_event:
+ '[' {
/*
m->set_spot (THIS->here_input());
$$ = m;
}
- | script_abbreviation {
- SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1));
- Music *a = MY_MAKE_MUSIC("ArticulationEvent");
- if (gh_string_p (s))
- a->set_mus_property ("articulation-type", s);
- else THIS->parser_error (_ ("Expecting string as script definition"));
- $$ = a;
+ | close_event {
+ $$ = $1;
+ dynamic_cast<Music *> ($$)->set_mus_property ("span-direction", gh_int2scm (START));
}
- ;
-
-event_with_dir:
- script_dir event_that_take_dir {
- $2->set_mus_property ("direction", gh_int2scm ($1));
- $$ = $2;
+ | open_event {
+ $$ = $1;
+ dynamic_cast<Music *> ($$)->set_mus_property ("span-direction", gh_int2scm (STOP))
}
- ;
-
-verbose_event:
- EVENT_IDENTIFIER {
+ | EVENT_IDENTIFIER {
$$ = unsmob_music ($1);
}
| tremolo_type {
a->set_mus_property ("tremolo-type", gh_int2scm ($1));
$$ = a;
}
+ ;
+
+direction_reqd_event:
+ gen_text_def {
+ $$ = $1;
+ }
+ | script_abbreviation {
+ SCM s = THIS->lexer_->lookup_identifier ("dash" + ly_scm2string ($1));
+ Music *a = MY_MAKE_MUSIC("ArticulationEvent");
+ if (gh_string_p (s))
+ a->set_mus_property ("articulation-type", s);
+ else THIS->parser_error (_ ("Expecting string as script definition"));
+ $$ = a;
+ }
;
-
+
sup_quotes:
'\'' {
$$ = 1;
;
close_event:
- close_event_parens {
- $$ = $1;
- dynamic_cast<Music *> ($$)->set_mus_property ("span-direction", gh_int2scm (START))
-;
- }
- ;
-
-close_event_parens:
'(' {
Music * s= MY_MAKE_MUSIC("SlurEvent");
$$ = s;
open_event:
- open_event_parens {
- $$ = $1;
- dynamic_cast<Music *> ($$)->set_mus_property ("span-direction", gh_int2scm (STOP))
-;
- }
- ;
-
-open_event_parens:
E_EXCLAMATION {
Music *s = MY_MAKE_MUSIC("CrescendoEvent");
s->set_spot (THIS->here_input());
;
gen_text_def:
- embedded_scm {
- Music *t = MY_MAKE_MUSIC("TextScriptEvent");
- t->set_mus_property ("text", $1);
- t->set_spot (THIS->here_input ());
- $$ = t;
- }
- | full_markup {
+ full_markup {
Music *t = MY_MAKE_MUSIC("TextScriptEvent");
t->set_mus_property ("text", $1);
t->set_spot (THIS->here_input ());