Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.73 KB | None | 0 0
  1. class Node {
  2. private:
  3.     int priority;
  4. public:
  5.     Node(int priority) :
  6.         priority(priority) {
  7.     }
  8.  
  9.     bool get_priority() {
  10.         return priority;
  11.     }
  12. };
  13.  
  14.  
  15. class Edge {
  16. private:
  17.     Node node;
  18.     char value;
  19. public:
  20.     Edge(int node, int value) :
  21.             node(node), value(value) {
  22.     }
  23.  
  24.     int getNode() {
  25.         return node;
  26.     }
  27.  
  28.     int getValue() {
  29.         return value;
  30.     }
  31. };
  32.  
  33. class NFA {
  34. private:
  35.     vector<vector<Edge> > graph;
  36.     int size;
  37. public:
  38.     NFA () : size(0) {
  39.     }
  40.  
  41.     void addKeyword(string word) {
  42.        
  43.     }
  44.  
  45.     void addPunct(char punt) {
  46.  
  47.     }
  48.  
  49.     void addDefinition(string def) {
  50.  
  51.     }
  52.  
  53.     void addExpression(string exp) {
  54.  
  55.     }
  56.  
  57.     vector<vector<Edge> > generateGraph() {
  58.         vector<vector<Edge> > final_graph;
  59.         return final_graph;
  60.     }
  61. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement