+1.3.92.jcn2
+===========
+
+* Added some error messages for toplevel and stray string parse errors.
+
+* Don't start more than one slur at a time.
+
+* Set direction of Slur too in a2-engraver.
+
1.3.91.uu1
==========
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=92
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
--- /dev/null
+% Test parser error
+
+\score{
--- /dev/null
+% Test parser error
+
+foo = \notes{
+
+
+\score{
+}
--- /dev/null
+% Test parser error
+
+foo = \notes{
+
+
+\score{
+
--- /dev/null
+% Test parser error
+
+foo = \notes{
+}
+
+
+\score{
+ burp
+}
+
#include "item.hh"
#include "note-head.hh"
#include "stem.hh"
+#include "slur.hh"
#include "translator-group.hh"
#include "side-position-interface.hh"
#include "directional-element-interface.hh"
else if (unirhythm)
state_ = UNIRHYTHM;
- if (Stem::has_interface (i.elem_l_))
+ if (Stem::has_interface (i.elem_l_)
+ || Slur::has_interface (i.elem_l_)
+ // || Text_item::has_interface (i.elem_l_)
+ //|| Crescendo::has_interface (i.elem_l_)
+ )
{
- Item *stem_l = dynamic_cast<Item*> (i.elem_l_);
-
/*
Hmm. We must set dir when solo, in order to get
the rests collided to the right position
{
if (daddy_trans_l_->id_str_ == "one")
{
- stem_l->set_elt_property ("direction", gh_int2scm (1));
+ i.elem_l_->set_elt_property ("direction", gh_int2scm (1));
}
else if (daddy_trans_l_->id_str_ == "two")
{
- stem_l->set_elt_property ("direction", gh_int2scm (-1));
+ i.elem_l_->set_elt_property ("direction", gh_int2scm (-1));
}
}
}
if (!define_spot_array_.empty())
{
- warning (_ ("Braces don't match"));
+ define_spot_array_.top ().warning (_ ("Braces don't match"));
error_level_i_ = 1;
}
mudela: /* empty */
| mudela toplevel_expression {}
| mudela assignment { }
- | mudela error
+ | mudela error {
+ THIS->error_level_i_ = 1;
+ //THIS->parser_error (_ ("ly invalid"));
+ }
| mudela INVALID {
- THIS->error_level_i_ =1;
+ THIS->error_level_i_ = 1;
+ //THIS->parser_error (_ ("ly invalid"));
}
;
*/
score_block:
SCORE {
+ THIS->remember_spot ();
}
/*cont*/ '{' score_body '}' {
+ THIS->pop_spot ();
$$ = $4;
if (!$$->def_p_arr_.size ())
{
$$->add_output (id ? id->access_content_Music_output_def (true) : 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:
$$ = new Sequential_music (ms);
}
- | STRING optional_notemode_duration {
- if (!THIS->lexer_p_->lyric_state_b ())
- THIS->parser_error (_ ("Have to be in Lyric mode for lyrics"));
+ | STRING {
+ THIS->remember_spot ();
+ }
+ /* cont */
+ optional_notemode_duration {
+ if (!THIS->lexer_p_->lyric_state_b ()) {
+ THIS->pop_spot ().error (_ ("Have to be in Lyric mode for lyrics"));
+ THIS->error_level_i_ = 1;
+ THIS->parser_error (_ ("Giving up"));
+ }
+ else
+ THIS->pop_spot ();
Lyric_req* lreq_p = new Lyric_req;
lreq_p ->text_str_ = ly_scm2string ($1);
- lreq_p->duration_ = *$2;
+ lreq_p->duration_ = *$3;
lreq_p->set_spot (THIS->here_input());
Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
- delete $2; // ugh
+ delete $3; // ugh
$$= velt_p;
}
Link_array<Span_req> new_slur_req_l_arr_;
Link_array<Score_element> slur_l_stack_;
Link_array<Score_element> end_slur_l_arr_;
+ Moment last_start_;
void set_melisma (bool);
public:
VIRTUAL_COPY_CONS (Translator);
+ Slur_engraver ();
};
+Slur_engraver::Slur_engraver ()
+{
+ last_start_ = Moment (-1);
+}
+
bool
Slur_engraver::do_try_music (Music *req_l)
{
}
else if (sl->span_type_str_ == "slur")
{
- new_slur_req_l_arr_.push (sl);
- return true;
+ /*
+ Let's not start more than one slur per moment.
+ */
+ if (sl->span_dir_ == START)
+ {
+ if (now_mom () > last_start_)
+ {
+ new_slur_req_l_arr_.push (sl);
+ last_start_ = now_mom ();
+ return true;
+ }
+ }
+ else
+ {
+ new_slur_req_l_arr_.push (sl);
+ return true;
+ }
}
}
return false;
\!f'2\ff e|
dis b~|
b1\p|
+ \property VoiceCombineVoice.crescendoText = "cresc."
+ \property VoiceCombineVoice.crescendoSpanner = "dashed-line"
a\<|
g|
f|