From 1519e7d1146b466915d5958c4b88b6def438f58f Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:27:03 +0000 Subject: [PATCH] lilypond-0.0.21 --- hdr/identparent.hh | 22 ++++++++++++---------- hdr/lexer.hh | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/hdr/identparent.hh b/hdr/identparent.hh index addfd26e0b..653158da4d 100644 --- a/hdr/identparent.hh +++ b/hdr/identparent.hh @@ -9,23 +9,25 @@ #include "proto.hh" #include "string.hh" +#define IDACCESSOR( Input_staff, staff)\ + virtual Input_staff * staff(bool = false) { error(#Input_staff); return 0; } -struct Identifier -{ +struct Identifier { void *data; String name; Identifier(String n) : name(n) { } virtual ~Identifier() {} virtual const char*classname() { return "new Identifier"; } - void error(); - virtual Input_staff * staff(bool = false) { error(); return 0; } - virtual Input_music *music(bool = false) { error(); return 0; } - virtual Music_voice *mvoice(bool = false) { error(); return 0; } - virtual Symtables *symtables(bool = false) { error(); return 0; } - virtual Music_general_chord *mchord(bool = false) { error(); return 0; } - virtual Lookup*lookup(bool = false) { error(); return 0; } - virtual Notename_tab*notename_tab(bool = false) { error(); return 0; } + void error(String); + IDACCESSOR(Input_staff, staff) + IDACCESSOR(Input_music, music) + IDACCESSOR(Music_voice, mvoice) + IDACCESSOR(Script_def, script) + IDACCESSOR(Symtables, symtables) + IDACCESSOR(Music_general_chord, mchord) + IDACCESSOR(Lookup,lookup) + IDACCESSOR(Notename_tab, notename_tab) }; #endif // IDENTPARENT_HH diff --git a/hdr/lexer.hh b/hdr/lexer.hh index 239b7bbe0b..767a12c95e 100644 --- a/hdr/lexer.hh +++ b/hdr/lexer.hh @@ -33,7 +33,7 @@ struct My_flex_lexer : yyFlexLexer { /****************/ void set(Notename_tab *n); - int lookup_keyword(String); + int lookup_keyword(String); void lookup_notename(int &large, int &small, String s); void LexerError(const char *); Identifier*lookup_identifier(String s); -- 2.39.5