#include "file-path.hh"
#include "debug.hh"
#include "dimensions.hh"
-#include "identifier.hh"
#include "command-request.hh"
#include "musical-request.hh"
#include "my-lily-parser.hh"
#include "repeated-music.hh"
#include "lilypond-input-version.hh"
#include "grace-music.hh"
-#include "auto-change-music.hh"
#include "part-combine-music.hh"
+#include "scm-hash.hh"
+#include "auto-change-iterator.hh"
#include "chord.hh"
%union {
Link_array<Request> *reqvec;
- Identifier *id;
String * string;
Music *music;
Score *score;
Scope *scope;
-
+ Scheme_hash_table *scmhash;
Musical_req* musreq;
Music_output_def * outputdef;
%token MEASURES
%token MIDI
%token MM_T
-%token MUSICAL_PITCH
+%token PITCH
%token NAME
%token PITCHNAMES
%token NOTES
%token <id> IDENTIFIER
-%token <id> SCORE_IDENTIFIER
-%token <id> MUSIC_OUTPUT_DEF_IDENTIFIER
+%token <scm> SCORE_IDENTIFIER
+%token <scm> MUSIC_OUTPUT_DEF_IDENTIFIER
%token <scm> NUMBER_IDENTIFIER
%token <scm> REQUEST_IDENTIFIER
%token <real> REAL
%type <outputdef> output_def
-%type <scope> lilypond_header lilypond_header_body
+%type <scmhash> lilypond_header lilypond_header_body
%type <request> open_request_parens close_request_parens open_request close_request
%type <request> request_with_dir request_that_take_dir verbose_request
%type <i> sub_quotes sup_quotes
%type <reqvec> pre_requests post_requests
%type <request> gen_text_def
-%type <scm> steno_musical_pitch musical_pitch absolute_musical_pitch
-%type <scm> steno_tonic_pitch
+%type <scm> steno_pitch pitch absolute_pitch
+%type <scm> explicit_pitch steno_tonic_pitch
%type <scm> chord_additions chord_subtractions chord_notes chord_step
%type <music> chord
THIS->lexer_p_->chordmodifier_tab_ = $1;
}
| lilypond_header {
- delete header_global_p;
- header_global_p = $1;
+ if (global_header_p)
+ scm_unprotect_object (global_header_p->self_scm ());
+ global_header_p = $1;
}
| score_block {
score_global_array.push ($1);
+
}
| output_def {
- Identifier * id = new
- Music_output_def_identifier ($1, MUSIC_OUTPUT_DEF_IDENTIFIER);
if (dynamic_cast<Paper_def*> ($1))
- THIS->lexer_p_->set_identifier ("$defaultpaper", id->self_scm ());
+ THIS->lexer_p_->set_identifier ("$defaultpaper", $1->self_scm ());
else if (dynamic_cast<Midi_def*> ($1))
- THIS->lexer_p_->set_identifier ("$defaultmidi", id->self_scm ());
+ THIS->lexer_p_->set_identifier ("$defaultmidi", $1->self_scm ());
}
| embedded_scm {
// junk value
lilypond_header_body:
{
- $$ = new Scope;
- THIS->lexer_p_-> scope_l_arr_.push ($$);
+ $$ = new Scheme_hash_table;
+
+ Scope *sc = new Scope ($$);
+ THIS->lexer_p_-> scope_l_arr_.push (sc);
}
| lilypond_header_body assignment semicolon {
lilypond_header:
HEADER '{' lilypond_header_body '}' {
$$ = $3;
- THIS->lexer_p_-> scope_l_arr_.pop ();
+ delete THIS->lexer_p_-> scope_l_arr_.pop ();
}
;
all objects can be unprotected as soon as they're here.
*/
- Identifier * id =unsmob_identifier ($4);
- Input spot = THIS->pop_spot ();
- if (id) id->set_spot (spot);
+ /*
+ Should find generic way of associating input with objects.
+ */
+ THIS->pop_spot ();
}
;
identifier_init:
score_block {
- $$ = (new Score_identifier ($1, SCORE_IDENTIFIER))->self_scm();
+ $$ = $1->self_scm ();
+ scm_unprotect_object ($$);
}
| output_def {
- $$ = (new Music_output_def_identifier ($1, MUSIC_OUTPUT_DEF_IDENTIFIER))->self_scm();
+ $$ = $1->self_scm ();
+ scm_unprotect_object ($$);
}
| translator_spec_block {
$$ = $1;
$$ = $4;
if (!$$->def_p_arr_.size ())
{
- Identifier *id =
- unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
- $$->add_output (id ? id->access_content_Music_output_def (true) : new Paper_def );
+ Music_output_def *id =
+ unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
+ $$->add_output (id ? id->clone () : new Paper_def );
}
}
-/*
- | SCORE '{' score_body error {
- $$ = $3
- $$->set_spot (THIS->here_input ());
- // THIS->here_input ().error ("SCORE INVALID");
- $$->error ("SCORE INVALID");
- THIS->parser_error (_f ("SCORE ERROR"));
- }
-*/
;
score_body:
Music {
$$ = new Score;
-
+
$$->set_spot (THIS->here_input ());
SCM m = $1->self_scm ();
scm_unprotect_object (m);
$$->music_ = m;
}
| SCORE_IDENTIFIER {
- $$ = $1->access_content_Score (true);
+ $$ = new Score (*unsmob_score ($1));
+ $$->set_spot (THIS->here_input ());
}
| score_body lilypond_header {
+ scm_unprotect_object ($2->self_scm ());
$$->header_p_ = $2;
}
| score_body output_def {
music_output_def_body:
MIDI '{' {
- Identifier *id = unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultmidi"));
+ Music_output_def *id = unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultmidi"));
Midi_def* p =0;
if (id)
- p = dynamic_cast<Midi_def*> (id->access_content_Music_output_def (true));
+ p = dynamic_cast<Midi_def*> (id->clone ());
else
p = new Midi_def;
THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
}
| PAPER '{' {
- Identifier *id = unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
+ Music_output_def *id = unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
Paper_def *p = 0;
if (id)
- p = dynamic_cast<Paper_def*> (id->access_content_Music_output_def (true));
+ p = dynamic_cast<Paper_def*> (id->clone ());
else
p = new Paper_def;
THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
$$ = p;
}
| PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
- Music_output_def *p = $3->access_content_Music_output_def (true);
+ Music_output_def *p = unsmob_music_output_def ($3);
+ p = p->clone();
THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
$$ = p;
}
| MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
- Music_output_def *p = $3->access_content_Music_output_def (true);
+ Music_output_def *p = unsmob_music_output_def ($3);
+ p = p->clone();
+
THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
$$ = p;
}
SCM s = $$;
SCM c = gh_cons ($2->self_scm (), SCM_EOL);
scm_unprotect_object ($2->self_scm ()); /* UGH */
-
-
if (gh_pair_p (gh_cdr (s)))
gh_set_cdr_x (gh_cdr (s), c); /* append */
else
Repeated_music:
REPEAT STRING bare_unsigned Music Alternative_music
{
- Music_sequence* m = dynamic_cast <Music_sequence*> ($5);
- if (m && $3 < m->length_i ())
+ Music_sequence* alts = dynamic_cast <Music_sequence*> ($5);
+ if (alts && $3 < alts->length_i ())
$5->origin ()->warning (_ ("More alternatives than repeats. Junking excess alternatives."));
+ Music *beg = $4;
+ int times = $3;
+ Repeated_music * r = new Repeated_music (SCM_EOL);
+
+ if (beg)
+ {
+ r-> set_mus_property ("body", beg->self_scm ());
+ scm_unprotect_object (beg->self_scm ());
+ }
+ r->set_mus_property ("repeat-count", gh_int2scm (times >? 1));
+
+ if (alts)
+ {
+ alts->truncate (times);
+ r-> set_mus_property ("alternatives", alts->self_scm ());
+ scm_unprotect_object (alts->self_scm ());
+ }
SCM func = scm_eval2 (ly_symbol2scm ("repeat-name-to-ctor"), SCM_EOL);
SCM result = gh_call1 (func, $2);
- Repeated_music * r = new Repeated_music ($4, $3 >? 1, m);
+
set_music_properties (r, result);
r->set_spot (*$4->origin ());
;
Music_sequence: '{' Music_list '}' {
- $$ = new Music_sequence (gh_car ($2));
+ $$ = new Music_sequence (SCM_EOL);
+ $$->set_mus_property ("elements", gh_car ($2));
}
;
Sequential_music:
SEQUENTIAL '{' Music_list '}' {
- $$ = new Sequential_music (gh_car ($3));
+ $$ = new Sequential_music (SCM_EOL);
+ $$->set_mus_property ("elements", gh_car ($3));
}
| '{' Music_list '}' {
- $$ = new Sequential_music (gh_car ($2));
+ $$ = new Sequential_music (SCM_EOL);
+ $$->set_mus_property ("elements", gh_car ($2));
}
;
Simultaneous_music:
SIMULTANEOUS '{' Music_list '}'{
- $$ = new Simultaneous_music (gh_car ($3));
+ $$ = new Simultaneous_music (SCM_EOL);
+ $$->set_mus_property ("elements", gh_car ($3));
+
}
| '<' Music_list '>' {
- $$ = new Simultaneous_music (gh_car ($2));
+ $$ = new Simultaneous_music (SCM_EOL);
+ $$->set_mus_property ("elements", gh_car ($2));
}
;
THIS->parser_error (_("First argument must be a procedure taking 1 argument"));
}
- Music *m = new Music;
- m->set_mus_property ("predicate", pred);
- m->set_mus_property ("symbol", $3);
- m->set_mus_property ("value", $5);
- m->set_mus_property ("iterator-ctor",
- Output_property_music_iterator::constructor_cxx_function);
+ Music *m = new Music (SCM_EOL);
+ m->set_mus_property ("predicate", pred);
+ m->set_mus_property ("symbol", $3);
+ m->set_mus_property ("value", $5);
+ m->set_mus_property ("iterator-ctor",
+ Output_property_music_iterator::constructor_cxx_function);
$$ = m;
}
Composite_music:
CONTEXT STRING Music {
- Context_specced_music *csm = new Context_specced_music ($3);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+ csm->set_mus_property ("element", $3->self_scm ());
+ scm_unprotect_object ($3->self_scm ());
csm->set_mus_property ("context-type",$2);
csm->set_mus_property ("context-id", ly_str02scm (""));
$$ = csm;
}
| AUTOCHANGE STRING Music {
- Auto_change_music * chm = new Auto_change_music ($3);
+ Music * chm = new Music_wrapper (SCM_EOL);
+ chm->set_mus_property ("element", $3->self_scm ());
+ chm->set_mus_property ("iterator-ctor", Auto_change_iterator::constructor_cxx_function);
+
+ scm_unprotect_object ($3->self_scm ());
chm->set_mus_property ("what", $2);
$$ = chm;
chm->set_spot (*$3->origin ());
}
| GRACE Music {
- $$ = new Grace_music ($2);
+ $$ = new Grace_music (SCM_EOL);
+ $$->set_mus_property ("element", $2->self_scm ());
+ scm_unprotect_object ($2->self_scm ());
+
}
| CONTEXT STRING '=' STRING Music {
- Context_specced_music *csm = new Context_specced_music ($5);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+ csm->set_mus_property ("element", $5->self_scm ());
+ scm_unprotect_object ($5->self_scm ());
csm->set_mus_property ("context-type", $2);
csm->set_mus_property ("context-id", $4);
bare_unsigned '/' bare_unsigned Music
{
- $$ = new Time_scaled_music ($3, $5, $6);
+ int n = $3; int d = $5;
+ Music *mp = $6;
+ $$ = new Time_scaled_music (SCM_EOL);
$$->set_spot (THIS->pop_spot ());
+
+
+ $$->set_mus_property ("element", mp->self_scm ());
+ scm_unprotect_object (mp->self_scm ());
+ $$->set_mus_property ("numerator", gh_int2scm (n));
+ $$->set_mus_property ("denominator", gh_int2scm (d));
+ $$->compress (Moment (n,d));
+
}
| Repeated_music { $$ = $1; }
| Simultaneous_music { $$ = $1; }
| Sequential_music { $$ = $1; }
- | TRANSPOSE musical_pitch Music {
- $$ = new Transposed_music ($3, *unsmob_pitch ($2));
+ | TRANSPOSE pitch Music {
+ $$ = new Transposed_music (SCM_EOL);
+ Music *p = $3;
+ Pitch pit = *unsmob_pitch ($2);
+
+ p->transpose (pit);
+ $$->set_mus_property ("element", p->self_scm ());
+ scm_unprotect_object (p->self_scm ());
}
| TRANSPOSE steno_tonic_pitch Music {
- $$ = new Transposed_music ($3, *unsmob_pitch ($2));
+ $$ = new Transposed_music (SCM_EOL);
+ Music *p = $3;
+ Pitch pit = *unsmob_pitch ($2);
+
+ p->transpose (pit);
+ $$->set_mus_property ("element", p->self_scm ());
+ scm_unprotect_object (p->self_scm ());
+
}
| APPLY embedded_scm Music {
SCM ret = gh_call1 ($2, $3->self_scm ());
Music *m = unsmob_music (ret);
if (!m) {
THIS->parser_error ("\\apply must return a Music");
- m = new Music ();
+ m = new Music (SCM_EOL);
}
$$ = m;
}
;
relative_music:
- RELATIVE absolute_musical_pitch Music {
- $$ = new Relative_octave_music ($3, *unsmob_pitch ($2));
+ RELATIVE absolute_pitch Music {
+ Music * p = $3;
+ Pitch pit = *unsmob_pitch ($2);
+ $$ = new Relative_octave_music (SCM_EOL);
+
+ $$->set_mus_property ("element", p->self_scm ());
+ scm_unprotect_object (p->self_scm ());
+
+ $$->set_mus_property ("last-pitch", p->to_relative_octave (pit).smobbed_copy ());
+
}
;
re_rhythmed_music:
ADDLYRICS Music Music {
- Lyric_combine_music * l = new Lyric_combine_music ($2, $3);
- $$ = l;
+ Lyric_combine_music * l = new Lyric_combine_music (SCM_EOL);
+ l->set_mus_property ("music", $2->self_scm ());
+ l->set_mus_property ("lyrics", $3->self_scm ());
+ scm_unprotect_object ($3->self_scm ());
+ scm_unprotect_object ($2->self_scm ());
+ $$ = l;
}
;
part_combined_music:
PARTCOMBINE STRING Music Music {
- Part_combine_music * p = new Part_combine_music ($2, $3, $4);
+ Part_combine_music * p = new Part_combine_music (SCM_EOL);
+
+ p->set_mus_property ("what", $2);
+ p->set_mus_property ("one", $3->self_scm ());
+ p->set_mus_property ("two", $4->self_scm ());
+
+ scm_unprotect_object ($3->self_scm());
+ scm_unprotect_object ($4->self_scm());
+
+
$$ = p;
}
;
translator_change:
TRANSLATOR STRING '=' STRING {
- Music * t = new Music;
+ Music * t = new Music (SCM_EOL);
t->set_mus_property ("iterator-ctor",
Change_iterator::constructor_cxx_function);
t-> set_mus_property ("change-to-type", $2);
property_def:
PROPERTY STRING '.' STRING '=' scalar {
- Music *t = new Music;
+ Music *t = new Music (SCM_EOL);
t->set_mus_property ("iterator-ctor",
Property_iterator::constructor_cxx_function);
t->set_mus_property ("symbol", scm_string_to_symbol ($4));
t->set_mus_property ("value", $6);
- Context_specced_music *csm = new Context_specced_music (t);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+
+ csm->set_mus_property ("element", t->self_scm ());
+ scm_unprotect_object (t->self_scm ());
+
$$ = csm;
$$->set_spot (THIS->here_input ());
csm-> set_mus_property ("context-type", $2);
}
| PROPERTY STRING '.' STRING SET embedded_scm '=' embedded_scm {
- Music *t = new Music;
+ Music *t = new Music (SCM_EOL);
t->set_mus_property ("iterator-ctor",
Push_property_iterator::constructor_cxx_function);
t->set_mus_property ("symbols", scm_string_to_symbol ($4));
t->set_mus_property ("pop-first", SCM_BOOL_T);
t->set_mus_property ("grob-property", $6);
t->set_mus_property ("grob-value", $8);
- Context_specced_music *csm = new Context_specced_music (t);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+ csm->set_mus_property ("element", t->self_scm ());
+ scm_unprotect_object (t->self_scm ());
$$ = csm;
$$->set_spot (THIS->here_input ());
csm-> set_mus_property ("context-type", $2);
}
| PROPERTY STRING '.' STRING OVERRIDE embedded_scm '=' embedded_scm {
- Music *t = new Music;
+ Music *t = new Music (SCM_EOL);
t->set_mus_property ("iterator-ctor",
Push_property_iterator::constructor_cxx_function);
t->set_mus_property ("symbols", scm_string_to_symbol ($4));
t->set_mus_property ("grob-property", $6);
t->set_mus_property ("grob-value", $8);
- Context_specced_music *csm = new Context_specced_music (t);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+ csm->set_mus_property ("element", t->self_scm ());
+ scm_unprotect_object (t->self_scm ());
+
$$ = csm;
$$->set_spot (THIS->here_input ());
csm-> set_mus_property ("context-type", $2);
}
| PROPERTY STRING '.' STRING REVERT embedded_scm {
- Music *t = new Music;
+ Music *t = new Music (SCM_EOL);
t->set_mus_property ("iterator-ctor",
Pop_property_iterator::constructor_cxx_function);
t->set_mus_property ("symbols", scm_string_to_symbol ($4));
t->set_mus_property ("grob-property", $6);
- Context_specced_music *csm = new Context_specced_music (t);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+ csm->set_mus_property ("element", t->self_scm ());
+ scm_unprotect_object (t->self_scm ());
+
$$ = csm;
$$->set_spot (THIS->here_input ());
command_element:
command_req {
- $$ = new Request_chord (gh_cons ($1->self_scm (), SCM_EOL));
+ $$ = new Request_chord (SCM_EOL);
+ $$->set_mus_property ("elements", gh_cons ($1->self_scm (), SCM_EOL));
$$-> set_spot (THIS->here_input ());
$1-> set_spot (THIS->here_input ());
}
| BAR STRING ';' {
- Music *t = new Music;
+ Music *t = new Music (SCM_EOL);
t->set_mus_property ("iterator-ctor",
Property_iterator::constructor_cxx_function);
t->set_mus_property ("symbol", ly_symbol2scm ("whichBar"));
t->set_mus_property ("value", $2);
- Context_specced_music *csm = new Context_specced_music (t);
+ Context_specced_music *csm = new Context_specced_music (SCM_EOL);
+ csm->set_mus_property ("element", t->self_scm ());
+ scm_unprotect_object (t->self_scm ());
+
$$ = csm;
$$->set_spot (THIS->here_input ());
csm->set_mus_property ("context-type", ly_str02scm ("Score"));
}
| PARTIAL duration_length ';' {
- Music * p = new Music;
+ Music * p = new Music (SCM_EOL);
p->set_mus_property ("symbol", ly_symbol2scm ( "measurePosition"));
p->set_mus_property ("iterator-ctor",
Property_iterator::constructor_cxx_function);
Moment m = - unsmob_duration($2)->length_mom ();
p->set_mus_property ("value", m.smobbed_copy ());
- Context_specced_music * sp = new Context_specced_music (p);
+ Context_specced_music * sp = new Context_specced_music (SCM_EOL);
+ sp->set_mus_property ("element", p->self_scm ());
+ scm_unprotect_object (p->self_scm ());
+
$$ =sp ;
sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
}
SCM l = SCM_EOL;
for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) {
- Music * p = new Music;
+ Music * p = new Music (SCM_EOL);
set_music_properties(p, gh_car (s));
l = gh_cons (p->self_scm (), l);
scm_unprotect_object (p->self_scm ());
}
- Sequential_music * seq = new Sequential_music (l);
+ Sequential_music * seq = new Sequential_music (SCM_EOL);
+ seq->set_mus_property ("elements", l);
+
+ Context_specced_music * sp = new Context_specced_music (SCM_EOL);
+ sp->set_mus_property ("element", seq->self_scm ());
+ scm_unprotect_object (seq->self_scm ());
- Context_specced_music * sp = new Context_specced_music (seq);
$$ =sp ;
sp-> set_mus_property("context-type", ly_str02scm("Staff"));
}
| TIME_T bare_unsigned '/' bare_unsigned ';' {
- Music * p = new Music;
+ Music * p = new Music (SCM_EOL);
p->set_mus_property ("symbol",
ly_symbol2scm ( "timeSignatureFraction"));
p->set_mus_property ("iterator-ctor",
p->set_mus_property ("value", gh_cons (gh_int2scm ($2),
gh_int2scm ($4)));
- Context_specced_music * sp = new Context_specced_music (p);
- $$ =sp ;
+ Context_specced_music * sp = new Context_specced_music (SCM_EOL);
+ sp->set_mus_property ("element", p->self_scm ());
+ scm_unprotect_object (p->self_scm ());
+
+ $$ = sp;
sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
}
;
Mark_req * m = new Mark_req;
$$ = m;
}
- | MARK STRING {
+ | MARK scalar {
Mark_req *m = new Mark_req;
m->set_mus_property ("label", $2);
$$ = m;
}
- | MARK bare_unsigned {
- Mark_req *m = new Mark_req;
- m->set_mus_property ("label", gh_int2scm ($2));
- $$ = m;
- }
| PENALTY bare_int {
Break_req * b = new Break_req;
b->set_mus_property ("penalty", gh_double2scm ( $2 / 100.0));
sp_p->set_spot (THIS->here_input ());
$$ = sp_p;
}
- | tremolo_type {
- Tremolo_req* a = new Tremolo_req;
- a->set_spot (THIS->here_input ());
- a->set_mus_property ("tremolo-type", gh_int2scm ($1));
- $$ = a;
- }
+ | tremolo_type {
+ Tremolo_req* a = new Tremolo_req;
+ a->set_spot (THIS->here_input ());
+ a->set_mus_property ("tremolo-type", gh_int2scm ($1));
+ $$ = a;
+ }
+
| SCRIPT STRING {
Articulation_req * a = new Articulation_req;
a->set_mus_property ("articulation-type", $2);
a->set_spot (THIS->here_input ());
$$ = a;
}
+ /*
+duh, junk this syntax from the parser, if possible.
+ */
| ARPEGGIO {
Arpeggio_req *a = new Arpeggio_req;
a->set_spot (THIS->here_input ());
}
;
-steno_musical_pitch:
+steno_pitch:
NOTENAME_PITCH {
$$ = $1;
}
}
;
-musical_pitch:
- steno_musical_pitch {
+pitch:
+ steno_pitch {
+ $$ = $1;
+ }
+ | explicit_pitch {
$$ = $1;
}
- | MUSICAL_PITCH embedded_scm {
- if (!unsmob_pitch ($2))
+ ;
+
+explicit_pitch:
+ PITCH embedded_scm {
+ $$ = $2;
+ if (!unsmob_pitch ($2)) {
THIS->parser_error (_f ("Expecting musical-pitch value", 3));
- Pitch m;
- $$ = m.smobbed_copy ();
+ $$ = Pitch ().smobbed_copy ();
+ }
}
;
}
;
-absolute_musical_pitch:
- steno_musical_pitch {
+absolute_pitch:
+ steno_pitch {
$$ = $1;
}
;
steno_duration {
$$ = $1;
}
+ | explicit_duration {
+ $$ = $1;
+ }
| duration_length '*' bare_unsigned {
$$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
}
| entered_notemode_duration {
$$ = $1;
}
+ | explicit_duration {
+ $$ = $1;
+ }
;
steno_duration:
simple_element:
- musical_pitch exclamations questions optional_notemode_duration {
+ pitch exclamations questions optional_notemode_duration {
if (!THIS->lexer_p_->note_state_b ())
THIS->parser_error (_ ("Have to be in Note mode for notes"));
if ($2 % 2 || $3 % 2)
n->set_mus_property ("force-accidental", SCM_BOOL_T);
- Simultaneous_music*v = new Request_chord (gh_list (n->self_scm (), SCM_UNDEFINED));
+ Simultaneous_music*v = new Request_chord (SCM_EOL);
+ v->set_mus_property ("elements", gh_list (n->self_scm (), SCM_UNDEFINED));
/*
-FIXME
+FIXME: location is one off, since ptich & duration don't contain origin refs.
*/
v->set_spot (THIS->here_input ());
n->set_spot (THIS->here_input ());
rest_req_p->set_spot (THIS->here_input());
e = rest_req_p->self_scm ();
}
- Simultaneous_music* velt_p = new Request_chord (gh_list (e,SCM_UNDEFINED));
+ Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
+ velt_p-> set_mus_property ("elements", gh_list (e,SCM_UNDEFINED));
velt_p->set_spot (THIS->here_input());
sp1->set_mus_property ("span-type", r);
sp2->set_mus_property ("span-type", r);
- Request_chord * rqc1 = new Request_chord (gh_list (sp1->self_scm (), SCM_UNDEFINED));
- Request_chord * rqc2 = new Request_chord (gh_list (sk->self_scm (), SCM_UNDEFINED));;
- Request_chord * rqc3 = new Request_chord(gh_list (sp2->self_scm (), SCM_UNDEFINED));;
+ Request_chord * rqc1 = new Request_chord (SCM_EOL);
+ rqc1->set_mus_property ("elements", gh_list (sp1->self_scm (), SCM_UNDEFINED));
+ Request_chord * rqc2 = new Request_chord (SCM_EOL);
+ rqc2->set_mus_property ("elements", gh_list (sk->self_scm (), SCM_UNDEFINED));;
+ Request_chord * rqc3 = new Request_chord(SCM_EOL);
+ rqc3->set_mus_property ("elements", gh_list (sp2->self_scm (), SCM_UNDEFINED));;
SCM ms = gh_list (rqc1->self_scm (), rqc2->self_scm (), rqc3->self_scm (), SCM_UNDEFINED);
- $$ = new Sequential_music (ms);
+ $$ = new Sequential_music (SCM_EOL);
+ $$->set_mus_property ("elements", ms);
}
| STRING {
THIS->remember_spot ();
lreq_p->set_mus_property ("text", $1);
lreq_p->set_mus_property ("duration",$3);
lreq_p->set_spot (THIS->here_input());
- Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
+ Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
+ velt_p->set_mus_property ("elements", gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
$$= velt_p;