Null rules work in RNGLR now, but there seems to be a bug where somehow some states/rules get no lookahead.

This commit is contained in:
Nathan Braswell
2013-08-02 15:21:42 -04:00
parent 49d149bc1f
commit d5b33efb22
5 changed files with 54 additions and 14 deletions

View File

@@ -33,8 +33,6 @@ class ParseRule {
int getRightSize();
int getIndex();
std::vector<NodeTree<Symbol*>*>* nullReductions();
bool advancePointer();
bool isAtEnd();

View File

@@ -11,6 +11,8 @@ class RNGLRParser: public Parser {
void reducer(int i);
void shifter(int i);
void addStates(std::vector< State* >* stateSets, State* state);
bool reducesToNull(ParseRule* rule);
bool reducesToNull(ParseRule* rule, std::vector<Symbol*> avoidList);
private:
std::vector<Symbol*> input;
GraphStructuredStack gss;