27#include "../base/PNode.h"
28#include "../base/Variant.h"
29#include "../base/grammar.tab.hpp"
38int main(
int argc,
char **argv)
41 long double b = 3352.9933;
44 cout <<
"\n\n\n==========================================================\n";
45 cout <<
"Testing the PNode Class\n";
46 cout <<
"==========================================================\n";
53 cout <<
"Constructing Variants" << endl;
59 cout <<
"\n\n\n---------------------------------------------\n";
60 cout <<
"Creating new PNodes (All Datanodes)";
61 cout <<
"\n\n\n---------------------------------------------\n";
63 cout <<
"Creating p0" << endl;
67 cout <<
"Creating p1" << endl;
70 cout <<
"Creating p2" << endl;
73 cout <<
"\n\n\n---------------------------------------------\n";
74 cout <<
"Printing PNodes (All Datanodes)\n";
75 cout <<
"---------------------------------------------\n";
83 cout <<
"\n\n\n---------------------------------------------\n";
84 cout <<
"Creating p3" << endl;
85 cout <<
"---------------------------------------------\n";
90 cout <<
"Retrieving the variant in P3" << endl;
92 cout <<
"value: " << flush << v2 << endl;
95 cout <<
"---------------------------------------------\n";
97 cout <<
"Creating p4" << endl;
100 cout <<
"Creating p5" << endl;
103 cout <<
"Creating p6" << endl;
107 cout <<
"\n\n\n---------------------------------------------\n";
108 cout <<
"Printing PNodes (Datanodes and Opnodes)\n";
109 cout <<
"---------------------------------------------\n";
122 cout <<
"\n\n\n---------------------------------------------\n";
123 cout <<
"Realigning nodes.\n";
124 cout <<
"---------------------------------------------\n";
126 p0 = ((
OpNode*)p6)->GetRight();
127 p1 = ((
OpNode*)p5)->GetRight();
132 cout <<
"Finished" << endl;
int main(int argc, char **argv)
const Variant & GetValue() const