-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConditionParser.h
43 lines (34 loc) · 924 Bytes
/
ConditionParser.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
38
39
40
41
42
43
//
// Created by Tomer Yona on 2018-12-22.
//
#ifndef FLIGHTSIMULATOR_CONDITIONPARSER_H
#define FLIGHTSIMULATOR_CONDITIONPARSER_H
#include "Command.h"
#include "ParseUtils.h"
#include <vector>
#include <iostream>
#include <sstream>
#include <iterator>
#include "ShuntingYard.h"
class ParseUtils;
class ConditionParser : public Command {
virtual void doCommand(std::vector<string> *inputVec)=0;
protected:
ParseUtils *parseUtils1;
//vector<Command *> commands;
vector<string> lineCommandsVec;
string firstExp;
string secondExp;
ShuntingYard myAlgo;
//Expression *leftExpr;
//Expression *rightExpr;
string condition_opr;
SymbolsTable *symbolsTable;
public:
void set(vector<string> *inputVec);
bool meetsCondition();
void doTheCommands();
void setSymbolTable(SymbolsTable *symbolsTable);
~ConditionParser();
};
#endif //FLIGHTSIMULATOR_CONDITIONPARSER_H