-
Notifications
You must be signed in to change notification settings - Fork 0
/
Parser.h
37 lines (30 loc) · 855 Bytes
/
Parser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
CSE355 optional project, Parser.h Parser.cpp
Purpose: To store all the input in memory so when the program is
making an NFA/DFA it knows all of the transitions, alphabets and states
before hand which makes it easier to generate the new machine.
@author Suhail Ghafoor
@version 0.1 03/08/18
*/
#ifndef CODE_PARSER_H
#define CODE_PARSER_H
#include <iostream>
#include <vector>
#include <algorithm>
#include "Structs.h"
using namespace std;
class Parser {
private:
void cleanTransition(Transition * t);
public:
Parser();
vector<string> alphabet;
vector<Transition*> transitions;
string initialState;
vector<string> finalStates;
void addAlphabet(string line);
void addTransitions(string line);
void setInitial(string line);
void addFinalStates(string line);
};
#endif //CODE_PARSER_H