Still in progress

This commit is contained in:
Nathan Braswell
2013-08-22 15:41:30 -04:00
parent 2eaf640855
commit 35a0677d07
6 changed files with 33 additions and 8 deletions

View File

@@ -11,6 +11,7 @@
#include "NodeTree.h"
#include "Table.h"
#include <queue>
#include <map>
#include <vector>
#include <algorithm>
@@ -37,7 +38,7 @@ class Parser {
std::vector<Symbol*>* firstSet(Symbol* token, std::vector<Symbol*> avoidList);
std::vector<Symbol*>* incrementiveFollowSet(ParseRule* rule);
virtual void closure(State* state);
virtual void addStates(std::vector< State* >* stateSets, State* state);
virtual void addStates(std::vector< State* >* stateSets, State* state, std::queue<State*>* toDo);
int stateNum(State* state);

View File

@@ -22,7 +22,7 @@ class RNGLRParser: public Parser {
void shifter(int i);
void addChildren(NodeTree<Symbol*>* parent, std::vector<NodeTree<Symbol*>*>* children, NodeTree<Symbol*>* nullableParts);
void addStates(std::vector< State* >* stateSets, State* state);
void addStates(std::vector< State* >* stateSets, State* state, std::queue<State*>* toDo);
void addStateReductionsToTable(State* state);
bool fullyReducesToNull(ParseRule* rule);
bool reducesToNull(ParseRule* rule);

View File

@@ -27,6 +27,7 @@ class State {
std::vector<ParseRule*>* getTotal();
bool containsRule(ParseRule* rule);
void addRuleCombineLookahead(ParseRule* rule);
void addRuleCombineLookaheadWithLookahead(ParseRule* rule);
std::string toString();
void combineStates(State &other);