-- Executor Class....
예제 #1
0
파일: Exec.cs 프로젝트: shranjan/pinac
 public executor(PlotReceiver plot)
 {
     coreObject = new Core(plot);
     frontEnd = new exec();
     frontEnd.error_ +=new exec.errorreport(Onerror);
     frontEnd.astEvent += new Spinach.exec.ast(AST);
     coreObject.errorcore_ +=new Core.errorcoremsg(Onerror);
     coreObject.rescore_ += new Core.resultcore(coreObject_rescore_);
 }
예제 #2
0
파일: Exec.cs 프로젝트: shranjan/pinac
 public executor()
 {
     coreObject = new Core();
     frontEnd = new exec();
     this.setFrontEndToCore();
     frontEnd.error_ +=new exec.errorreport(Onerror);
     frontEnd.astEvent += new Spinach.exec.ast(AST);
     coreObject.errorcore_ +=new Core.errorcoremsg(Onerror);
     coreObject.rescore_ += new Core.resultcore(coreObject_rescore_);
 }
예제 #3
0
파일: Core.cs 프로젝트: rkpandya/pinac
 public void setFrontEnd(exec FrontEnd)
 {
     interp_visitor.setFE(FrontEnd);
 }
예제 #4
0
파일: Test_Core.cs 프로젝트: shranjan/pinac
 public static void Main(string[] args)
 {
     Spinach.exec obj = new Spinach.exec();
     List<string> keywords = new List<string>();
     keywords = obj.getKeywords();
     obj.error_ += new Spinach.exec.errorreport(error);
     obj.Visitline("int a");
     obj.Visitline("parallelfor(i->1to){Vector<int>[2] a =[1,2,3,4];}");
     obj.Visitline("subPlot(1,1,a,\"abc\",1D);plot(b,\"abcd\",1D);for(i->1to4){struct s{int a;}; s.a = 0;//this is a comment string s; s = \"This is a example\";}");
     obj.Visitline("if(a<=0){int a; a =9; double c; Vector<double>[2] vec=[1.1,2.2]; if(a==9){Matrix<int>[2][2] mat= [1,2,3,4];int d; return mat;} return a;}else{double e; return e;}");
     obj.Visitline("int copy(Matrix<int> a,Vector<double> b , int c ){ int h; int l ; for(i->1to100){int a; a =9; double c; Vector<double>[2] vec=[1.1,2.2]; if(a==9){Matrix<int>[2][2] mat= [1,2,3,4];int d; return mat;}} return a; int j; h= (l+j)*h*l+l-h;}");
     obj.Visitline("int a; a=10; int b; b=20; if(a==b) { print a; } else { print b; }");
 }