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:
Nathan Braswell
2013-07-28 19:45:08 -04:00
parent 726ead0455
commit 6d7b38a03b
14 changed files with 360 additions and 146 deletions

View File

@@ -14,7 +14,7 @@ Symbol::Symbol(std::string name, bool isTerminal, std::string value) {
this->value = value;
}
Symbol::Symbol(std::string name, bool isTerminal, NodeTree* tree) {
Symbol::Symbol(std::string name, bool isTerminal, NodeTree<Symbol*>* tree) {
this->name = name;
this->terminal = isTerminal;
this->subTree = tree;
@@ -40,11 +40,11 @@ Symbol* Symbol::clone() {
return new Symbol(name, terminal, subTree);
}
void Symbol::setSubTree(NodeTree* tree) {
void Symbol::setSubTree(NodeTree<Symbol*>* tree) {
subTree = tree;
}
NodeTree* Symbol::getSubTree() {
NodeTree<Symbol*>* Symbol::getSubTree() {
return subTree;
}