delete lexer_p_;
delete default_header_p_;
}
-
+
void
My_lily_parser::clear_notenames()
{
#ifndef NPRINT
String s = "";
- if (init_parse_b_)
+ if (init_parse_b_)
s = "Init";
set_yydebug (!monitor->silence (s+"Parser") && check_debug);
lexer_p_->set_debug (!monitor->silence (s+"Lexer") && check_debug);
{
#ifndef NPRINT
String s = "";
-
- if (init_parse_b_)
+
+ if (init_parse_b_)
s = "Init";
- if (!monitor->silence (s+"Declarations") && check_debug)
+ if (!monitor->silence (s+"Declarations") && check_debug)
{
lexer_p_->print_declarations (init_parse_b_);
}
-#endif
+#endif
}
void
{
lexer_p_ = new My_lily_lexer;
init_str_ = init;
-
- *mlog << "Parsing ... ";
-
+
+ *mlog << _("Parsing ... ");
+
init_parse_b_ = true;
set_debug();
lexer_p_->new_input (init, source_l_);
if (error_level_i_)
{
- error ("Found errors in init files");
+ error (_("Found errors in init files"));
}
print_declarations();
do_yyparse();
print_declarations();
-
+
if (!define_spot_array_.empty())
{
- warning ("Braces don't match.");
+ warning (_("Braces don't match."));
error_level_i_ = 1;
}
}
define_spot_array_.push (here_input());
}
-char const *
+char const *
My_lily_parser::here_ch_C() const
{
return lexer_p_->here_ch_C();
My_lily_parser::get_word_element (Text_def* tdef_p, Duration * duration_p)
{
Chord* velt_p = new Request_chord;
-
+
Lyric_req* lreq_p = new Lyric_req (tdef_p);
lreq_p->duration_ = *duration_p;
Chord *
My_lily_parser::get_rest_element (String s, Duration * duration_p)
-{
+{
Chord* velt_p = new Request_chord;
velt_p->set_spot (here_input());
skip_p->set_spot (here_input());
velt_p->add (skip_p);
}
- else
+ else
{
Rest_req * rest_req_p = new Rest_req;
rest_req_p->duration_ = *duration_p;
rest_req_p->set_spot (here_input());
-
+
velt_p->add (rest_req_p);
}
v->set_spot (here_input ());
v->add (rq);
-
+
// too bad parser reads (default) duration via member access,
// this hack will do for now..
if (abbrev_beam_type_i_)
My_lily_parser::get_parens_request (char c)
{
Request* req_p=0;
- switch (c)
+ switch (c)
{
case '~':
case '<':
req_p = new Span_dynamic_req;
break;
-
+
case ')':
case '(':
req_p = new Slur_req;
assert (false);
break;
}
-
- switch (c)
+
+ switch (c)
{
case '<':
case '>':
case ']':
req_p->span()->spantype = Span_req::STOP;
break;
-
+
default:
break;
}
- if (req_p->musical()->span_dynamic ())
+ if (req_p->musical()->span_dynamic ())
{
Span_dynamic_req* s_l= (req_p->musical()->span_dynamic ()) ;
s_l->dynamic_dir_ = (c == '<') ? UP:DOWN;
void
My_lily_parser::add_requests (Chord*v)
{
- for (int i = 0; i < pre_reqs.size(); i++)
+ for (int i = 0; i < pre_reqs.size(); i++)
{
v->add (pre_reqs[i]);
}
pre_reqs.clear();
- for (int i = 0; i <post_reqs.size(); i++)
+ for (int i = 0; i <post_reqs.size(); i++)
{
v->add (post_reqs[i]);
}