Added EOF symbol, making the getTable() saner for ACCEPT and lookahead support in ParseRule

This commit is contained in:
Nathan Braswell
2013-06-13 14:25:10 -04:00
parent 949dbc532a
commit 0c651a5d9e
9 changed files with 68 additions and 20 deletions

View File

@@ -14,7 +14,7 @@
class ParseRule {
public:
ParseRule();
ParseRule(Symbol* leftHandle, int pointerIndex, std::vector<Symbol*> &rightSide);
ParseRule(Symbol* leftHandle, int pointerIndex, std::vector<Symbol*> &rightSide, Symbol* lookahead = NULL);
~ParseRule();
bool const operator==(const ParseRule &other);
@@ -41,6 +41,7 @@ class ParseRule {
private:
int pointerIndex;
Symbol* leftHandle;
Symbol* lookahead;
std::vector<Symbol*> rightSide;
};