1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
#ifndef SYMBOL_TABLE_HPP
#define SYMBOL_TABLE_HPP

#include <map>
#include <string>
#include "types.hpp"

namespace LambdaCalc {

   /*
      Table of global variables.
   */
   class SymbolTable {
      public:
     /* define or redefine a macro */
     vodefinean> define(const std::string& namValuePtrPtr value);

     /* retrieve the lambda expression associated with
        the given name; null is returned if the name
        has not been bound to an expression */
  ValuePtrbsp; ValuePgetget(const std::string& name) const;

      private:
     using Table = std::map<std::strinValuePtrPtr>;
  Table;  Table table;
   };

// namespace LambdaCalc

#endif