RNGLR Recognizer now works for grammers without null rules.
This commit is contained in:
@@ -33,6 +33,8 @@ class ParseRule {
|
||||
int getRightSize();
|
||||
int getIndex();
|
||||
|
||||
std::vector<NodeTree<Symbol*>*>* nullReductions();
|
||||
|
||||
bool advancePointer();
|
||||
bool isAtEnd();
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ class RNGLRParser: public Parser {
|
||||
NodeTree<Symbol*>* parseInput(std::string inputString);
|
||||
void reducer(int i);
|
||||
void shifter(int i);
|
||||
void addStates(std::vector< State* >* stateSets, State* state);
|
||||
private:
|
||||
std::vector<Symbol*> input;
|
||||
GraphStructuredStack gss;
|
||||
|
||||
@@ -13,6 +13,7 @@ class Table {
|
||||
~Table();
|
||||
void setSymbols(Symbol* EOFSymbol, Symbol* nullSymbol);
|
||||
void add(int stateNum, Symbol* tranSymbol, ParseAction* action);
|
||||
void remove(int stateNum, Symbol* tranSymbol);
|
||||
std::vector<ParseAction*>* get(int state, Symbol* token);
|
||||
ParseAction* getShift(int state, Symbol* token);
|
||||
std::string toString();
|
||||
|
||||
Reference in New Issue
Block a user