More work towards RNGLR. First, NodeTree is now a template. Second, I've started writing the actual GLR parser and GSS and other things, but am still in the first write process.
This commit is contained in:
23
include/GraphStructuredStack.h
Normal file
23
include/GraphStructuredStack.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include "GSSNode.h"
|
||||
|
||||
#ifndef GRAPH_STRUCTURED_STACK
|
||||
#define GRAPH_STRUCTURED_STACK
|
||||
|
||||
class GraphStructuredStack {
|
||||
public:
|
||||
GraphStructuredStack();
|
||||
~GraphStructuredStack();
|
||||
GSSNode* newNode(int stateNum);
|
||||
void addToFrontier(int frontier, GSSNode* node);
|
||||
bool 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);
|
||||
private:
|
||||
std::vector<std::vector<GSSNode*>*> gss;
|
||||
//
|
||||
};
|
||||
Reference in New Issue
Block a user