Changed Table to store vectors of actions, changed Parser appropriately.

This commit is contained in:
Nathan Braswell
2013-07-28 23:48:10 -04:00
parent 6d7b38a03b
commit 733fe1c08d
8 changed files with 142 additions and 72 deletions

View File

@@ -13,10 +13,10 @@ class Table {
~Table();
void setSymbols(Symbol* EOFSymbol, Symbol* nullSymbol);
void add(int stateNum, Symbol* tranSymbol, ParseAction* action);
ParseAction* get(int state, Symbol* token);
std::vector<ParseAction*>* get(int state, Symbol* token);
std::string toString();
private:
std::vector< std::vector<ParseAction*>* > table;
std::vector< std::vector< std::vector<ParseAction*>* >* > table;
std::vector<Symbol*> symbolIndexVec;
//The EOFSymbol, a pointer because of use in table, etc
Symbol* EOFSymbol;