NodeTree now also has a link to the Symbol it represents.
This commit is contained in:
@@ -10,12 +10,16 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
//Circular references
|
||||
class NodeTree;
|
||||
|
||||
class Symbol {
|
||||
public:
|
||||
Symbol(std::string name, bool isTerminal);
|
||||
Symbol(std::string name, bool isTerminal, NodeTree* tree);
|
||||
~Symbol();
|
||||
bool const operator==(const Symbol &other);
|
||||
std::string getName();
|
||||
std::string toString();
|
||||
Symbol* clone();
|
||||
void setSubTree(NodeTree* tree);
|
||||
@@ -23,6 +27,7 @@ class Symbol {
|
||||
bool isTerminal();
|
||||
private:
|
||||
std::string name;
|
||||
std::string value;
|
||||
bool terminal;
|
||||
NodeTree* subTree;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user