#include "debug.hh"
#include "real.hh"
#include "atom.hh"
-#include "assoc.hh"
-#include "assoc-iter.hh"
+#include "dictionary-iter.hh"
#include "symtable.hh"
Symtables::Symtables()
{
font_ = s.font_;
font_path_ = s.font_path_;
- for (Assoc_iter<String, Symtable*> i (s); i.ok(); i++)
+ for (Dictionary_iter< Symtable*> i (s); i.ok(); i++)
{
add (i.key(), new Symtable (*i.val ()));
}
Symtables::~Symtables()
{
- for (Assoc_iter<String, Symtable*> i (*this); i.ok(); i++)
+ for (Dictionary_iter< Symtable*> i (*this); i.ok(); i++)
{
delete i.val();
}
void
Symtables::print() const
{
- for (Assoc_iter<String, Symtable*> i (*this); i.ok(); i++)
+ for (Dictionary_iter<Symtable*> i (*this); i.ok(); i++)
{
DOUT << "table \'" << i.key () << "\' {\n";
i.val()->print ();
void
Symtable::print() const
{
- for (Assoc_iter<String, Atom> i (*this); i.ok(); i++)
+ for (Dictionary_iter<Atom> i (*this); i.ok(); i++)
{
DOUT << "\'" << i.key() << "\'->" << i.val ().str () << '\n';
}
Symtables::add (String s, Symtable*p)
{
p-> id_str = s;
- Dictionary<Symtable*>::add (s,p);
+ Dictionary<Symtable*>::elem (s) = p;
}