From 3512d06cb313bff12be668f53f179aba450d5a0a Mon Sep 17 00:00:00 2001 From: Neil Puttock Date: Sun, 18 Apr 2010 20:08:05 +0100 Subject: [PATCH] Remove obsolete object key code. --- lily/include/book.hh | 5 ++--- lily/include/lily-proto.hh | 6 ++---- lily/include/output-def.hh | 10 +++++----- lily/include/score.hh | 9 ++++----- lily/lily-lexer.cc | 10 ++++------ lily/parser.yy | 15 --------------- lily/score-scheme.cc | 7 ++----- 7 files changed, 19 insertions(+), 43 deletions(-) diff --git a/lily/include/book.hh b/lily/include/book.hh index 83a645c850..f99b7875f0 100644 --- a/lily/include/book.hh +++ b/lily/include/book.hh @@ -31,7 +31,6 @@ class Book DECLARE_SMOBS (Book); public: - string user_key_; SCM header_; Output_def *paper_; SCM scores_; @@ -39,8 +38,8 @@ public: SCM input_location_; Book (Book const &); - Input *origin() const; - VIRTUAL_COPY_CONSTRUCTOR(Book, Book); + Input *origin () const; + VIRTUAL_COPY_CONSTRUCTOR (Book, Book); Book (); void add_score (SCM); void add_bookpart (SCM); diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index 04b9b23d53..afe7d0e732 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -129,9 +129,6 @@ class Music_wrapper; class Music_wrapper_iterator; class Note_performer; class Output_def; -class Object_key; -class Object_key_dumper; -class Object_key_undumper; class Open_type_font; class Output_property; class Page_breaking; @@ -198,7 +195,8 @@ class Translator_group; class Transposed_music; class yyFlexLexer; -typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *, Grob_info); +typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *, + Grob_info); typedef void (*Translator_void_method_ptr) (Translator *); #endif /* LILY_PROTO_HH */ diff --git a/lily/include/output-def.hh b/lily/include/output-def.hh index 2c63766f7a..968779d202 100644 --- a/lily/include/output-def.hh +++ b/lily/include/output-def.hh @@ -17,8 +17,8 @@ along with LilyPond. If not, see . */ -#ifndef MUSIC_OUTPUT_DEF_HH -#define MUSIC_OUTPUT_DEF_HH +#ifndef OUTPUT_DEF_HH +#define OUTPUT_DEF_HH #include "lily-proto.hh" #include "virtual-methods.hh" @@ -58,7 +58,6 @@ public: Output_def *parent_; Input input_origin_; - string user_key_; Output_def (Output_def const&); Output_def (); @@ -86,9 +85,10 @@ DECLARE_UNSMOB (Output_def, output_def); Font_metric* find_pango_font (Output_def *layout, SCM descr, Real factor); -Font_metric *find_scaled_font (Output_def *od, Font_metric *f, Real magnification); +Font_metric *find_scaled_font (Output_def *od, Font_metric *f, + Real magnification); Output_def *scale_output_def (Output_def *def, Real scale); Real output_scale (Output_def*); -#endif /* MUSIC_OUTPUT_DEF_HH */ +#endif /* OUTPUT_DEF_HH */ diff --git a/lily/include/score.hh b/lily/include/score.hh index 0e34d2e90b..7fa687c4e5 100644 --- a/lily/include/score.hh +++ b/lily/include/score.hh @@ -35,17 +35,16 @@ class Score SCM input_location_; SCM header_; public: - Input *origin() const; - - vector defs_; - string user_key_; + Input *origin () const; + + vector defs_; bool error_found_; Score (); Score (Score const &); VIRTUAL_COPY_CONSTRUCTOR (Score, Score); - + SCM get_music () const; void add_output_def (Output_def *def); void set_music (SCM music); diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index 1c5931dfe9..d3673f2cdf 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -23,7 +23,7 @@ #include using namespace std; -#include "context.hh" // for nested_property_alist +#include "context.hh" // for nested_property_alist #include "international.hh" #include "interval.hh" #include "keyword.hh" @@ -71,7 +71,6 @@ static Keyword_ent the_key_tab[] {"name", NAME}, {"new", NEWCONTEXT}, {"notemode", NOTEMODE}, - {"objectid", OBJECTID}, {"once", ONCE}, {"override", OVERRIDE}, {"paper", PAPER}, @@ -118,7 +117,7 @@ Lily_lexer::Lily_lexer (Sources *sources, Lily_parser *parser) Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser) : Includable_lexer () { - parser_ = parser; + parser_ = parser; keytable_ = (src.keytable_) ? new Keyword_table (*src.keytable_) : 0; chordmodifier_tab_ = src.chordmodifier_tab_; pitchname_tab_stack_ = src.pitchname_tab_stack_; @@ -204,7 +203,7 @@ Lily_lexer::keyword_list () const { if (!keytable_) return SCM_EOL; - + SCM l = SCM_EOL; SCM *tail = &l; for (vsize i = 0; i < keytable_->table_.size (); i++) @@ -244,7 +243,6 @@ Lily_lexer::start_main_input () yy_flex_debug = get_program_option ("debug-lexer"); parser_->set_yydebug (get_program_option ("debug-parser")); - new_input (main_input_name_, sources_); scm_module_define (scm_car (scopes_), @@ -372,7 +370,7 @@ SCM Lily_lexer::mark_smob (SCM s) { ASSERT_LIVE_IS_ALLOWED (); - + Lily_lexer *lexer = (Lily_lexer *) SCM_CELL_WORD_1 (s); scm_gc_mark (lexer->chordmodifier_tab_); diff --git a/lily/parser.yy b/lily/parser.yy index 41e5080f98..99e15a46d8 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -199,7 +199,6 @@ void set_music_properties (Music *p, SCM a); %token MIDI "\\midi" %token NAME "\\name" %token NOTEMODE "\\notemode" -%token OBJECTID "\\objectid" %token OCTAVE "\\octave" %token ONCE "\\once" %token OVERRIDE "\\override" @@ -429,7 +428,6 @@ If we give names, Bison complains. %type number_expression %type number_factor %type number_term -%type object_id_setting %type octave_check %type optional_context_mod %type optional_id @@ -478,10 +476,6 @@ lilypond: /* empty */ ; -object_id_setting: - OBJECTID STRING { $$ = $2; } - ; - toplevel_expression: lilypond_header { PARSER->lexer_->set_identifier (ly_symbol2scm ("$defaultheader"), $1); @@ -748,9 +742,6 @@ book_body: $$->scores_ = SCM_EOL; $$->bookparts_ = SCM_EOL; } - | book_body object_id_setting { - $$->user_key_ = ly_scm2string ($2); - } ; bookpart_block: @@ -802,9 +793,6 @@ bookpart_body: $$->paper_ = 0; $$->scores_ = SCM_EOL; } - | bookpart_body object_id_setting { - $$->user_key_ = ly_scm2string ($2); - } ; score_block: @@ -829,9 +817,6 @@ score_body: $$->protect (); $$->origin ()->set_spot (@$); } - | score_body object_id_setting { - $$->user_key_ = ly_scm2string ($2); - } | score_body lilypond_header { $$->set_header ($2); } diff --git a/lily/score-scheme.cc b/lily/score-scheme.cc index 6785ae7e32..0fd7be0d6f 100644 --- a/lily/score-scheme.cc +++ b/lily/score-scheme.cc @@ -73,7 +73,6 @@ LY_DEFINE (ly_score_header, "ly:score-header", return sc->get_header (); } - LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!", 2, 0, 0, (SCM score, SCM module), "Set the score header.") @@ -81,13 +80,12 @@ LY_DEFINE (ly_score_set_header_x, "ly:score-set-header!", LY_ASSERT_SMOB (Score, score, 1); SCM_ASSERT_TYPE (ly_is_module (module), module, SCM_ARG2, __FUNCTION__, "module"); - + Score *sc = unsmob_score (score); sc->set_header (module); return SCM_UNSPECIFIED; } - LY_DEFINE (ly_score_music, "ly:score-music", 1, 0, 0, (SCM score), "Return score music.") @@ -110,8 +108,7 @@ LY_DEFINE (ly_score_embedded_format, "ly:score-embedded-format", 2, 0, 0, (SCM score, SCM layout), "Run @var{score} through @var{layout} (an output definition)" " scaled to correct output-scale already, returning a list of" - " layout-lines. This function takes an optional" - " @code{Object_key} argument.") + " layout-lines.") { LY_ASSERT_SMOB (Score, score, 1); LY_ASSERT_SMOB (Output_def, layout, 2); -- 2.39.5