From d375539a6973aaa7e20064af7f9ac248085db5eb Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:34:04 +0000 Subject: [PATCH] lilypond-0.0.38 --- src/mylexer.cc | 18 +++++++++++++----- src/symtable.cc | 19 ++++++++++++++++++- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/mylexer.cc b/src/mylexer.cc index 10c395759c..7da6dddec8 100644 --- a/src/mylexer.cc +++ b/src/mylexer.cc @@ -1,16 +1,17 @@ #include + #include "interval.hh" #include "identparent.hh" -#include "associter.hh" +#include "assoc-iter.hh" #include "lexer.hh" -#include "inputfile.hh" +#include "input-file.hh" #include "parser.hh" #include "keyword.hh" #include "assoc.hh" #include "lexer.hh" #include "debug.hh" #include "notename.hh" -#include "sourcefile.hh" +#include "source-file.hh" #include "parseconstruct.hh" static Keyword_ent the_key_tab[]={ @@ -25,7 +26,6 @@ static Keyword_ent the_key_tab[]={ "goto", GOTO, "in", IN_T, "key", KEY, - "meter", METER, "midi", MIDI, "mm", MM_T, @@ -64,7 +64,8 @@ My_flex_lexer::ret_notename(int *p, String text, int octave_mod) char const* ch_c_l = here_ch_c_l(); if ( ch_c_l ) { ch_c_l--; - while ( ( *ch_c_l == ' ' ) || ( *ch_c_l == '\t' ) || ( *ch_c_l == '\n' ) ) + while ( ( *ch_c_l == ' ' ) + || ( *ch_c_l == '\t' ) || ( *ch_c_l == '\n' ) ) ch_c_l--; ch_c_l++; } @@ -127,6 +128,13 @@ My_flex_lexer::~My_flex_lexer() } delete the_id_tab; } +void +My_flex_lexer::print_declarations()const +{ + for (Assoc_iter ai(*the_id_tab); ai.ok(); ai++) { + ai.val()->print(); + } +} String My_flex_lexer::spot()const diff --git a/src/symtable.cc b/src/symtable.cc index 87ed983da3..d55e9ac59b 100644 --- a/src/symtable.cc +++ b/src/symtable.cc @@ -4,7 +4,7 @@ #include "real.hh" #include "symbol.hh" #include "assoc.hh" -#include "associter.hh" +#include "assoc-iter.hh" #include "symtable.hh" Symtables::Symtables() @@ -42,3 +42,20 @@ Symtables::operator()(String s) { return Assoc::operator[](s); } +void +Symtables::print() const +{ + for (Assoc_iter i(*this); i.ok(); i++) { + mtor << "table \'" << i.key() << "\' {\n"; + i.val()->print(); + mtor << "}\n"; + } +} +void +Symtable::print() const +{ + for (Assoc_iter i(*this); i.ok(); i++) { + mtor << "\'" << i.key() << "\'->" << i.val().str() << "\n"; + } +} + -- 2.39.5