-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtilities.h
More file actions
35 lines (31 loc) · 793 Bytes
/
Copy pathUtilities.h
File metadata and controls
35 lines (31 loc) · 793 Bytes
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
/*
* File: Utilities.h
* Author: idox
*
* Created on December 20, 2018, 5:05 PM
*/
#ifndef PROJECTPART1_UTILITIES_H
#define PROJECTPART1_UTILITIES_H
#include "SymbolTable.h"
#include "DataReaderServer.h"
#include <unordered_map>
#include "BinaryExpression.h"
#include <string>
#include <vector>
using namespace std;
/**
* This class is responsible for calculating expressions given as
* string vectors by using the Shunting Yard method.
*/
class Utilities {
unordered_map<string, BinaryExpression*> operators;
SymbolTable* symbols;
DataReaderServer* dataServer;
public:
Utilities();
~Utilities();
void set(SymbolTable*, DataReaderServer*);
string shuntingYard(vector<string> instream);
int precedence(string);
};
#endif //PROJECTPART1_UTILITIES_H