Added current, in progress grammer/

This commit is contained in:
Nathan Braswell
2013-08-27 13:23:37 -04:00
parent d1f2ba5fc8
commit e868c240d8
2 changed files with 70 additions and 0 deletions

View File

@@ -79,6 +79,11 @@ NodeTree<Symbol*>* RNGLRParser::parseInput(std::string inputString) {
if (gss.frontierIsEmpty(i)) {
std::cout << "Frontier " << i << " is empty." << std::endl;
std::cout << "Failed on " << input[i]->toString() << std::endl;
std::cout << "Nearby is:" << std::endl;
int range = 4;
for (int j = (i-range >= 0 ? i-range : 0); j < (i+range < input.size() ? i+range : input.size()); j++)
std::cout << input[j]->toString() << " ";
std::cout << std::endl;
break;
}