From ee3671464731c100ae237425a1ba7d0586e25c2f Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:35:44 +0000 Subject: [PATCH] lilypond-0.0.43 --- lily/.version | 8 ++++++-- lily/identifier.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/lily/.version b/lily/.version index 10eeb0d37d..0ae4d984d1 100644 --- a/lily/.version +++ b/lily/.version @@ -1,4 +1,8 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 41 -MY_PATCH_LEVEL= \ No newline at end of file +PATCH_LEVEL = 43 +# use to send patches, always empty for released version: +# include separator: ".postfix", "-pl" makes rpm barf + +MY_PATCH_LEVEL = +# diff --git a/lily/identifier.cc b/lily/identifier.cc index e4712f8a5a..0eab514cb5 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -9,9 +9,17 @@ #include #include "identifier.hh" -#include "lexer.hh" +#include "my-lily-lexer.hh" #include "debug.hh" +#include "input-score.hh" +#include "symtable.hh" +#include "input-staff.hh" +#include "input-music.hh" +#include "lookup.hh" +#include "script-def.hh" +#include "request.hh" + void Identifier::error(String expect) { @@ -20,6 +28,16 @@ Identifier::error(String expect) ::error(e); } +Identifier::Identifier(String n, int code) + : name(n) +{ + token_code_i_ = code; + data = 0; + accessed_b_ = 0; + init_b_ = 0; + defined_ch_C_ = 0; +} + void Identifier::print()const { @@ -42,6 +60,7 @@ DEFAULT_PRINT(Staff_id, Input_staff, staff); DEFAULT_PRINT(M_chord_id, Music_general_chord, mchord); DEFAULT_PRINT(M_voice_id, Music_voice, mvoice); DEFAULT_PRINT(Request_id, Request, request); +DEFAULT_PRINT(Score_id, Input_score, score); void Real_id::do_print() const { @@ -49,3 +68,29 @@ Real_id::do_print() const mtor << *((Real_id*)this)->real(false)<< "\n"; } +#define implement_id_class(Idclass, Class, accessor) \ +char const * Idclass::classname() const\ +{\ + return #Class;\ +}\ +Class*\ +Idclass::accessor(bool copy) {\ + if (copy){ \ + accessed_b_ = true;\ + return new Class(* (Class*) data);\ + }else\ + return (Class*) data;\ + }\ +Idclass::~Idclass() { delete accessor(false); }\ +Idclass::Idclass(String s, Class*st, int code):Identifier(s,code) { data = st; }\ + + +implement_id_class(Real_id, Real, real) +implement_id_class(Script_id, Script_def, script) +implement_id_class(Lookup_id, Lookup, lookup) +implement_id_class(Symtables_id, Symtables, symtables) +implement_id_class(Staff_id, Input_staff, staff) +implement_id_class(M_chord_id, Music_general_chord, mchord) +implement_id_class(M_voice_id, Music_voice, mvoice) +implement_id_class(Score_id, Input_score, score) +implement_id_class(Request_id, Request, request) -- 2.39.5