Files
kraken/include/Symbol.h

32 lines
527 B
C
Raw Normal View History

2013-05-20 19:34:15 -04:00
#ifndef SYMBOL_H
#define SYMBOL_H
#ifndef NULL
#define NULL 0
#endif
#include "NodeTree.h"
2013-05-20 19:34:15 -04:00
#include <vector>
#include <string>
class Symbol {
public:
Symbol(std::string name, bool isTerminal);
Symbol(std::string name, bool isTerminal, NodeTree* tree);
2013-05-20 19:34:15 -04:00
~Symbol();
2013-05-23 01:35:54 -04:00
bool const operator==(const Symbol &other);
2013-05-20 19:34:15 -04:00
std::string toString();
Symbol* clone();
void setSubTree(NodeTree* tree);
NodeTree* getSubTree();
bool isTerminal();
2013-05-20 19:34:15 -04:00
private:
std::string name;
bool terminal;
NodeTree* subTree;
2013-05-20 19:34:15 -04:00
};
#endif