1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-06-20 00:06:55 +01:00

first working version of the math compiler

This commit is contained in:
2013-09-15 18:39:22 +01:00
parent c0b8ec6ecd
commit 2efc4ef6c5
13 changed files with 686 additions and 15 deletions

View File

@ -1,10 +1,27 @@
#include <iostream>
#include <latan/IO.hpp>
#include <latan/MathCompiler.hpp>
using namespace std;
using namespace Latan;
int main(void)
int main(int argc, char* argv[])
{
MathCompiler C(argv[1]);
VarTable vtable;
stack<double> dstack;
const VirtualProgram& P = C();
cout << P << endl;
for (int i=0;i<P.size();++i)
{
(*(P[i]))(dstack,vtable);
}
cout << "result= " << dstack.top() << endl;
return EXIT_SUCCESS;
}
/*int main(void)
{
ASCIIFile F;
DMat A,B;
@ -17,7 +34,7 @@ int main(void)
cout << A*B << endl;
return EXIT_SUCCESS;
}
}*/
/*
int main(void)