#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 |