Added support for null rules, works well.
This commit is contained in:
@@ -26,6 +26,7 @@ class ParseRule {
|
||||
void appendToRight(Symbol* appendee);
|
||||
|
||||
Symbol* getLeftSide();
|
||||
void setRightSide(std::vector<Symbol*> &rightSide);
|
||||
std::vector<Symbol*> getRightSide();
|
||||
Symbol* getAtNextIndex();
|
||||
Symbol* getAtIndex();
|
||||
|
||||
@@ -47,6 +47,11 @@ class Parser {
|
||||
|
||||
std::vector< State* > stateSets;
|
||||
|
||||
//The EOFSymbol, a pointer because of use in table, etc
|
||||
Symbol* EOFSymbol;
|
||||
//The nullSymbol, ditto with above. Also used in comparisons
|
||||
Symbol* nullSymbol;
|
||||
|
||||
std::vector< std::vector<ParseAction*>* > table;
|
||||
std::vector<Symbol*> symbolIndexVec;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user