-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
37 lines (30 loc) · 1006 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
//This is the Main File for the Logic Team.
//Currently, this is simply a Command-Line Interface to be Integrated with the Frontend GUI.
//That is, this is a Program that will take in a Logical Statement + Perform Various Operations.
#include "statementevaluator.h"
#include "LogicGate.h"
#include "expressionparser.h"
#include "Tree.h"
using namespace std;
void defaultTest() {
// Input Test
cout << "Start of Testing For ALPACA-LOGIC Engine." << endl;
string stConstructor;
cout << "Input Valid Statement of the Format A & B: ";
getline(cin, stConstructor);
StatementParser testStatement(stConstructor);
cout << endl;
cout << "Output Print() Test:" << endl;
testStatement.print();
cout << "Output PrintTree() Test: " << endl;
testStatement.printTree();
cout << endl;
cout << "Truth Table For " << stConstructor << ": " << endl;
StatementEvaluator eval;
eval.printTruthTable(testStatement);
cout << endl;
}
int main(int argc, char* argv[]) {
defaultTest();
return EXIT_SUCCESS;
}