From 7315e822c3a0eec68a9cf555d79853ab5639e759 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:28:15 +0000 Subject: [PATCH] lilypond-0.0.23 --- hdr/inputcommand.hh | 4 +++- src/inputcommand.cc | 22 ++++++++++++++++++++-- src/mylexer.cc | 16 ++++++++++++---- src/simplewalker.cc | 7 ++++--- 4 files changed, 39 insertions(+), 10 deletions(-) diff --git a/hdr/inputcommand.hh b/hdr/inputcommand.hh index 61f968ee53..2654d06b7c 100644 --- a/hdr/inputcommand.hh +++ b/hdr/inputcommand.hh @@ -1,7 +1,7 @@ /* inputcommand.hh -- part of LilyPond - (c) 1996 Han-Wen Nienhuys + (c) 1996,97 Han-Wen Nienhuys */ #ifndef INPUTCOMMAND_HH @@ -19,6 +19,7 @@ struct Input_command { operator Command(); }; +Input_command*get_cadenza_toggle(int i); Input_command *get_meterchange_command( int,int); Input_command *get_key_interpret_command(Array); Input_command *get_clef_interpret_command(String w); @@ -28,6 +29,7 @@ Input_command *get_skip_command(int,Moment); Input_command *get_grouping_command(Array); Input_command *get_bar_command(String); Input_command *get_newmeasure_command(); +Input_command *get_goto_command(String); Array get_default_grouping(int count); #endif // INPUTCOMMAND_HH diff --git a/src/inputcommand.cc b/src/inputcommand.cc index 9cedc52c2a..02e7e72813 100644 --- a/src/inputcommand.cc +++ b/src/inputcommand.cc @@ -44,6 +44,24 @@ get_partial_command(Moment u) 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(Arraya ) { @@ -90,9 +108,7 @@ Input_command * get_newmeasure_command() { Input_command*c = new Input_command; - c->args.add( "NEWMEASURE"); - return c; } @@ -112,6 +128,7 @@ get_skip_command(int n, Moment m) void Input_command::print()const { +#ifndef NPRINT mtor << "{ "; if (args.size()) { mtor<< " args: "; @@ -119,6 +136,7 @@ Input_command::print()const mtor << "`"<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. diff --git a/src/simplewalker.cc b/src/simplewalker.cc index 21ed11573a..33ddf1ea69 100644 --- a/src/simplewalker.cc +++ b/src/simplewalker.cc @@ -185,7 +185,7 @@ Simple_walker::process_requests() 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); } @@ -206,7 +206,7 @@ Simple_walker::process_requests() if (beam_) { if (!stem_) WARN <<"beamed note should have a stem (t = " - <when())<<"\n"; + <when())<<")\n"; else beam_->add(stem_); @@ -219,6 +219,7 @@ Simple_walker::process_requests() } 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); @@ -251,7 +252,7 @@ Simple_walker::process_requests() 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); -- 2.39.5