#include <strstream.h>
+
#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[]={
"goto", GOTO,
"in", IN_T,
"key", KEY,
-
"meter", METER,
"midi", MIDI,
"mm", MM_T,
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++;
}
}
delete the_id_tab;
}
+void
+My_flex_lexer::print_declarations()const
+{
+ for (Assoc_iter<String,Identifier*> ai(*the_id_tab); ai.ok(); ai++) {
+ ai.val()->print();
+ }
+}
String
My_flex_lexer::spot()const
#include "real.hh"
#include "symbol.hh"
#include "assoc.hh"
-#include "associter.hh"
+#include "assoc-iter.hh"
#include "symtable.hh"
Symtables::Symtables()
{
return Assoc<String, Symtable*>::operator[](s);
}
+void
+Symtables::print() const
+{
+ for (Assoc_iter<String, Symtable*> i(*this); i.ok(); i++) {
+ mtor << "table \'" << i.key() << "\' {\n";
+ i.val()->print();
+ mtor << "}\n";
+ }
+}
+void
+Symtable::print() const
+{
+ for (Assoc_iter<String, Symbol> i(*this); i.ok(); i++) {
+ mtor << "\'" << i.key() << "\'->" << i.val().str() << "\n";
+ }
+}
+