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

@@ -1,6 +1,6 @@
#include <iostream>
#include <vector>
#include "GSSNode.h"
#include "NodeTree<int>.h"
#ifndef GRAPH_STRUCTURED_STACK
#define GRAPH_STRUCTURED_STACK
@@ -9,15 +9,15 @@ class GraphStructuredStack {
public:
GraphStructuredStack();
~GraphStructuredStack();
GSSNode* newNode(int stateNum);
void addToFrontier(int frontier, GSSNode* node);
bool inFrontier(int frontier, int state);
NodeTree<int>* newNode(int stateNum);
void addToFrontier(int frontier, NodeTree<int>* node);
NodeTree<int>* inFrontier(int frontier, int state);
bool frontierIsEmpty(int frontier);
bool frontierHasAccState(int frontier);
std::vector<GSSNode*>* getReachable(GSSNode* start, int lenght);
bool hasEdge(GSSNode* start, GSSNode* end);
void addEdge(GSSNode* start, GSSNode* end);
std::vector<NodeTree<int>*>* getReachable(NodeTree<int>* start, int lenght);
bool hasEdge(NodeTree<int>* start, NodeTree<int>* end);
void addEdge(NodeTree<int>* start, NodeTree<int>* end);
private:
std::vector<std::vector<GSSNode*>*> gss;
std::vector<std::vector<NodeTree<int>*>*> gss;
//
};