-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
39 lines (35 loc) · 960 Bytes
/
main.cpp
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
38
39
#include <iostream>
#include <fstream>
#include <string>
#include "Lexer.h"
#include "Parser.h"
#include "Command.h"
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include "OpenServerCommand.h"
#include "ConnectCommand.h"
#include <sys/socket.h>
using namespace std;
/*************************************************************************************
* Function name: main
* Input: none
* Output: none
* Function Operation: Gets as argument a string which is a location of a script to run.
**************************************************************************************/
int main (int argc, char **argv) {
Parser* p = new Parser();
Lexer* l = new Lexer();
vector<string> stringVec;
ifstream infile(argv[1]);
stringVec = l->fileLexer(infile);
p->strPrs(stringVec);
infile.close();
delete p;
delete l;
return 0;
}