Fixed some more DOT generation stuff.

This commit is contained in:
Nathan Braswell
2013-08-11 01:15:26 -04:00
parent ea42cb5bc7
commit af0c1f0a81
4 changed files with 22 additions and 11 deletions

View File

@@ -83,8 +83,6 @@ NodeTree<Symbol*>* RNGLRParser::parseInput(std::string inputString) {
}
//Clear the vector of SPPF nodes created every step
// for (std::vector<NodeTree<Symbol*>*>::size_type j = 0; j < SPPFStepNodes.size(); j++)
// SPPFStepNodes[j] = NULL;
SPPFStepNodes.clear();
while (toReduce.size() != 0) {
@@ -244,14 +242,14 @@ void RNGLRParser::addChildren(NodeTree<Symbol*>* parent, std::vector<NodeTree<Sy
parent->addChildren(children);
} else {
if (!arePacked(parent->getChildren())) {
NodeTree<Symbol*>* subParent = new NodeTree<Symbol*>();
NodeTree<Symbol*>* subParent = new NodeTree<Symbol*>("AmbiguityPackInner", NULL);
setPacked(subParent, true);
std::vector<NodeTree<Symbol*>*> tmp = parent->getChildren();
subParent->addChildren(&tmp);
parent->clearChildren();
parent->addChild(subParent);
}
NodeTree<Symbol*>* t = new NodeTree<Symbol*>();
NodeTree<Symbol*>* t = new NodeTree<Symbol*>("AmbiguityPackOuter", NULL);
setPacked(t, true);
parent->addChild(t);
t->addChildren(children);