#ifndef __NODE #define __NODE #include #include #include "token.h" #include "hashtable.h" typedef token_type node_type; class node: public token { protected: vector links; public: node(node_type t, string s, int v); static node * var(string s); static node * num(int v); static node * op(string s); static node * err(string s); node * add(node * n); int getnumlinks(); node * getlink(int i); void print(); int evaluate(hashtable & mem); void print1(int depth = 0); }; #endif