Fixed the bug! Probabally other bugs too.

This commit is contained in:
Nathan Braswell
2013-08-26 15:37:49 -04:00
parent 84274ed138
commit d1f2ba5fc8
5 changed files with 17 additions and 30 deletions

View File

@@ -117,19 +117,6 @@ void State::addRuleCombineLookahead(ParseRule* rule) {
basis.push_back(rule);
}
void State::addRuleCombineLookaheadWithLookahead(ParseRule* rule) {
getTotal();
bool alreadyIn = false;
for (std::vector<ParseRule*>::size_type i = 0; i < total.size(); i++) {
if (*rule == (*(total[i]))) {
total[i]->addLookahead(rule->getLookahead());
alreadyIn = true;
}
}
if (!alreadyIn)
basis.push_back(rule);
}
std::string State::toString() {
std::string concat = "";
concat += "State " + intToString(number) + " with " + intToString(parents.size()) + " parents:\n";