Actually parses LR(0) grammers and sentences\! Only two problems is very inefficint gotoTable() and actionTable(), and it REJECTS the sentence after completing the Goal->Sentence(*) production. However, need to go to bed now. Does practially work though\! Yay\!
This commit is contained in:
@@ -14,6 +14,6 @@ const bool Symbol::operator==(const Symbol &other) {
|
||||
}
|
||||
|
||||
std::string Symbol::toString() {
|
||||
return(name);
|
||||
return(name + "(" + (isTerminal ? "T" : "NT") + ")");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user