#include "identifier.hh"
#include "my-lily-lexer.hh"
#include "debug.hh"
-#include "script-def.hh"
#include "request.hh"
-#include "translator.hh"
+#include "translator-group.hh"
#include "notename-table.hh"
void
Identifier::error (String expect) const
{
- String e (_("Wrong identifier type: "));
- e += _f ("%s expected", expect);
- ::error (e);
+ ::error (_f ("wrong identifier type, expected: `%s'", expect));
}
String
void
Identifier::print () const
{
- DOUT << "identifier ";
+ DEBUG_OUT << "identifier ";
do_print ();
}
void
-DEFAULT_PRINT(General_script_def);
-DEFAULT_PRINT(Translator);
+DEFAULT_PRINT(Translator_group);
DEFAULT_PRINT(Music);
DEFAULT_PRINT(Request);
DEFAULT_PRINT(Score);
DUMMY_STR(Notename_table);
-DUMMY_STR(General_script_def);
-DUMMY_STR(Translator);
+DUMMY_STR(Translator_group);
DUMMY_STR(Music);
DUMMY_STR(Request);
DUMMY_STR(Score);
void \
Class ## _identifier::do_print () const\
{\
- DOUT << do_str () << '\n';\
+ DEBUG_OUT << do_str () << '\n';\
}\
Class*\
Class ## _identifier::access_content_ ## Class (bool copy_b) const{\
((Class ## _identifier*)this)->accessed_b_ = true;\
- return copy_b ? (Class*)data_p_->clone() : data_p_;\
+ return copy_b ? dynamic_cast<Class*> (data_p_->clone()) : data_p_;\
}
#define IMPLEMENT_ID_CLASS(Class) \
IMPLEMENT_ID_CLASS(Duration);
-IMPLEMENT_ID_CLASS(Translator);
+IMPLEMENT_ID_CLASS(Translator_group);
IMPLEMENT_ID_CLASS(int);
IMPLEMENT_ID_CLASS(Real);
IMPLEMENT_ID_CLASS(String);
-IMPLEMENT_ID_CLASS(General_script_def);
IMPLEMENT_ID_CLASS(Music);
IMPLEMENT_ID_CLASS(Score);
IMPLEMENT_ID_CLASS(Request);
IMPLEMENT_ID_CLASS(Notename_table);
VIRTUAL_ACCESSOR(Music);
VIRTUAL_ACCESSOR(Request);
-VIRTUAL_ACCESSOR(Translator);
-VIRTUAL_ACCESSOR(General_script_def);
+VIRTUAL_ACCESSOR(Translator_group);
DEFAULT_ACCESSOR(Notename_table);
DEFAULT_ACCESSOR(Duration);
DEFAULT_ACCESSOR(int);