LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
scoped-map.hh File Reference

Declaration of misc::scoped_map. More...

#include <list>
#include <map>
#include <misc/scoped-map.hxx>
Include dependency graph for scoped-map.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  misc::scoped_map< Key, Data >

Namespaces

namespace  misc
 Handling of generic, oriented or undirected, graph.

Functions

template<typename Key , typename Data >
std::ostream & misc::operator<< (std::ostream &ostr, const scoped_map< Key, Data > &tbl)

Detailed Description

Declaration of misc::scoped_map.

This implements a stack of dictionnaries. Each time a scope is opened, a new dictionnary is added on the top of the stack; the dictionary is removed when the scope is closed. Lookup of keys is done in the last added dictionnary first (LIFO).

In particular this class is used to implement symbol tables.