More work towards RNGLR. First, NodeTree is now a template. Second, I've started writing the actual GLR parser and GSS and other things, but am still in the first write process.
This commit is contained in:
@@ -11,26 +11,26 @@
|
||||
#include <string>
|
||||
|
||||
//Circular references
|
||||
class NodeTree;
|
||||
//class NodeTree;
|
||||
|
||||
class Symbol {
|
||||
public:
|
||||
Symbol(std::string name, bool isTerminal);
|
||||
Symbol(std::string name, bool isTerminal, std::string value);
|
||||
Symbol(std::string name, bool isTerminal, NodeTree* tree);
|
||||
Symbol(std::string name, bool isTerminal, NodeTree<Symbol*>* tree);
|
||||
~Symbol();
|
||||
bool const operator==(const Symbol &other);
|
||||
std::string getName();
|
||||
std::string toString();
|
||||
Symbol* clone();
|
||||
void setSubTree(NodeTree* tree);
|
||||
NodeTree* getSubTree();
|
||||
void setSubTree(NodeTree<Symbol*>* tree);
|
||||
NodeTree<Symbol*>* getSubTree();
|
||||
bool isTerminal();
|
||||
private:
|
||||
std::string name;
|
||||
std::string value;
|
||||
bool terminal;
|
||||
NodeTree* subTree;
|
||||
NodeTree<Symbol*>* subTree;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user