/*
inputcommand.hh -- part of LilyPond
- (c) 1996 Han-Wen Nienhuys
+ (c) 1996,97 Han-Wen Nienhuys
*/
#ifndef INPUTCOMMAND_HH
operator Command();
};
+Input_command*get_cadenza_toggle(int i);
Input_command *get_meterchange_command( int,int);
Input_command *get_key_interpret_command(Array<int >);
Input_command *get_clef_interpret_command(String w);
Input_command *get_grouping_command(Array<int>);
Input_command *get_bar_command(String);
Input_command *get_newmeasure_command();
+Input_command *get_goto_command(String);
Array<int> get_default_grouping(int count);
#endif // INPUTCOMMAND_HH
return c;
}
+Input_command*
+get_goto_command(String s)
+{
+ Input_command*c = new Input_command;
+ c->args.add("GOTO");
+ c->args.add(s);
+ return c;
+}
+
+Input_command*
+get_cadenza_toggle(int i)
+{
+
+ Input_command*c = new Input_command;
+ c->args.add("CADENZA");
+ c->args.add(i);
+ return c;
+}
Input_command*
get_grouping_command(Array<int>a )
{
get_newmeasure_command()
{
Input_command*c = new Input_command;
-
c->args.add( "NEWMEASURE");
-
return c;
}
void
Input_command::print()const
{
+#ifndef NPRINT
mtor << "{ ";
if (args.size()) {
mtor<< " args: ";
mtor << "`"<<args[i] <<"',";
}
mtor << "}\n";
+#endif
}
Input_command*
static Keyword_ent the_key_tab[]={
"bar", BAR,
"bass", BASS,
+ "cadenza", CADENZA,
"clef", CLEF,
"cm", CM,
"commands", COMMANDS,
"duration", DURATIONCOMMAND,
"geometric", GEOMETRIC,
+ "goto", GOTO,
"in", IN,
- "key", KEY,
+ "key", KEY,
+ "mark", MARK,
"melodic", MELODIC,
"meter", METER,
"mm", MM,
delete the_id_tab;
}
+String
+My_flex_lexer::spot()const
+{
+ return include_stack.top()->name + ": " + lineno();
+}
+
void
My_flex_lexer::LexerError(const char *s)
{
if (lexer->include_stack.empty()) {
- *mlog << "error at EOF" << s;
+ *mlog << "error at EOF" << s << '\n';
}else
- *mlog << lexer->include_stack.top()->name << ": " <<
- lexer->lineno() << ": error:" << s << '\n';
+ *mlog << spot() << ": error:" << s << '\n';
exit(1);
}
// set the new input to s, remember old file.
if (sl->spantype == Span_req::START) {
if (find_slur(sl->elt_l_->voice_ )>=0)
- error_t("Too many slurs in voice", col()->when());
+ error_t("Too many slurs in voice", *col()->tdescription_);
pending_slur_reqs.add(sl);
pending_slurs.add(new Slur);
}
if (beam_) {
if (!stem_)
WARN <<"beamed note should have a stem (t = "
- <<String(c->when())<<"\n";
+ <<String(c->when())<<")\n";
else
beam_->add(stem_);
}
if (c->beam_&& c->beam_->spantype == Span_req::STOP) {
+ default_grouping.extend(current_grouping->interval());
beam_->set_grouping(default_grouping, *current_grouping);
pscore_->typeset_spanner(beam_, s->theline);
if (sl->spantype == Span_req::STOP) {
int idx = find_slur(sl->elt_l_->voice_);
if (idx < 0)
- error_t("can't find slur to end; ", c->when());
+ error_t("can't find slur to end; ", *c->tdescription_);
pscore_->typeset_spanner(pending_slurs[idx],
s->theline);