CallCompiler() public static method

public static CallCompiler ( string compiler, string args, long &CompileTimeMs ) : List
compiler string
args string
CompileTimeMs long
return List
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "clojurec";
            string args     = " -d " + idata.BaseDir + " -cp " + idata.BaseDir + " " + idata.PathToSource;
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "Rextester.class") || !string.IsNullOrEmpty(res[1]))
            {
                if (res.Count > 1)
                {
                    if (string.IsNullOrEmpty(res[0]) && string.IsNullOrEmpty(res[1]))
                    {
                        cdata.Error = "Method 'main' must be in a class 'Rextester'.";
                    }
                    else
                    {
                        cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                    }
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = "-Xmx256m -Dfile.encoding=UTF-8 -classpath " + idata.BaseDir + " Rextester";
            cdata.Executor    = "java";
            cdata.Success     = true;
            return(cdata);
        }
示例#2
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            //cdata.ExecuteThis = idata.PathToSource;
            //cdata.Executor = "/home/ren/.sdkman/candidates/kotlin/current/bin/kotlinc -script ";
            //cdata.Success = true;
            //return cdata;


            Directory.SetCurrentDirectory(idata.BaseDir);
            string compiler = "/home/ren/.sdkman/candidates/kotlin/current/bin/kotlinc";
            string args     = idata.PathToSource + " -include-runtime -d " + idata.BaseDir + idata.Rand + ".jar";
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + idata.Rand + ".jar"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res [0]) || !string.IsNullOrEmpty(res [1])))
            {
                cdata.Warning = Utils.ConcatenateString(res [0], res [1]);
            }
            cdata.ExecuteThis = " -jar " + idata.BaseDir + idata.Rand + ".jar";
            cdata.Executor    = "java";
            cdata.Success     = true;
            return(cdata);
        }
示例#3
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "gfortran";
            string args     = "-o " + idata.BaseDir + "a.out " + " -ffree-form " + idata.PathToSource;
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#4
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            Directory.SetCurrentDirectory(idata.BaseDir);
            List <string> dropLines = new List <string>();

            dropLines.Add("F# Compiler for F# 4.1");
            dropLines.Add("Freely distributed under the Apache 2.0 Open Source License");
            dropLines.Add("F# Compiler for F# 4.0");


            string compiler = "fsharpc";
            string args     = "-o " + idata.BaseDir + "a.exe " + idata.PathToSource;
            long   compileTime;

            var res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.exe"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.exe";
            cdata.Executor    = "mono";
            cdata.Success     = true;
            return(cdata);
        }
示例#5
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "fsc";
            string args     = "-deprecation -unchecked -encoding UTF-8 -d " + idata.BaseDir + " " + idata.PathToSource;
            long   compileTime;
            //Syscall.chmod(idata.BaseDir, FilePermissions.ACCESSPERMS);
            //Syscall.chmod(idata.PathToSource, FilePermissions.ACCESSPERMS);
            var res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "Rextester.class") || !string.IsNullOrEmpty(res[1]))
            {
                if (res.Count > 1)
                {
                    if (string.IsNullOrEmpty(res[0]) && string.IsNullOrEmpty(res[1]))
                    {
                        cdata.Error = "Entry class 'Rextester' missing (it's either you haven't declared 'object Rextester' or you have declared 'package some_package').";
                    }
                    else
                    {
                        cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                    }
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = "-Dfile.encoding=UTF-8 -classpath " + idata.BaseDir + " Rextester";
            cdata.Executor    = "scala";
            cdata.Success     = true;
            return(cdata);
        }
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            Environment.SetEnvironmentVariable("HOME", idata.BaseDir);
            Directory.SetCurrentDirectory(idata.BaseDir);
            string compiler = "erl";
            string args     = "-compile " + idata.PathToSource;
            long   compileTime;

            var res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "source.beam"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = "-noshell -s source entry_point -s init stop";
            cdata.Executor    = "erl";
            cdata.Success     = true;
            return(cdata);
        }
示例#7
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "gcc";

            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("-o a.out"))
            {
                cdata.Error   = "Compiler args must contain '-o a.out'";
                cdata.Success = false;
                return(cdata);
            }
            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("source_file.m"))
            {
                cdata.Error   = "Compiler args must contain 'source_file.m'";
                cdata.Success = false;
                return(cdata);
            }

            idata.Compiler_args = idata.Compiler_args.Replace("source_file.m", idata.PathToSource);
            idata.Compiler_args = idata.Compiler_args.Replace("-o a.out", "-o " + idata.BaseDir + "a.out ");

            string args = idata.Compiler_args;
            //string args = " -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/usr/local/include/GNUstep -I/usr/include/GNUstep" + " -o "+ idata.BaseDir + "a.out " + idata.PathToSource + "  -lobjc -lgnustep-base";
            long compileTime;
            var  res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);

                    /*if(cdata.Error != null)
                     * {
                     *      string[] ew = cdata.Error.Split(new string[]{"\n"}, StringSplitOptions.RemoveEmptyEntries);
                     *      string error = "";
                     *      string warning = "";
                     *      foreach(var a in ew)
                     *              if(a.Contains("error: "))
                     *                      error+=a+"\n";
                     *              else if(a.Contains("warning: "))
                     *                      warning+=a+"\n";
                     *      cdata.Error = error;
                     *      cdata.Warning = warning;
                     * }*/
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "clang-3.7";

            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("-o a.out"))
            {
                cdata.Error   = "Compiler args must contain '-o a.out'";
                cdata.Success = false;
                return(cdata);
            }
            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("source_file.c"))
            {
                cdata.Error   = "Compiler args must contain 'source_file.c'";
                cdata.Success = false;
                return(cdata);
            }

            idata.Compiler_args = idata.Compiler_args.Replace("source_file.c", idata.PathToSource);
            idata.Compiler_args = idata.Compiler_args.Replace("-o a.out", "-o " + idata.BaseDir + "a.out ");

            string args = idata.Compiler_args;

            long compileTime;
            var  res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);

                    /*if(cdata.Error != null)
                     * {
                     *      string[] ew = cdata.Error.Split(new string[]{"\n"}, StringSplitOptions.RemoveEmptyEntries);
                     *      string error = "";
                     *      string warning = "";
                     *      foreach(var a in ew)
                     *              if(a.Contains("warning: "))
                     *                      warning+=a+"\n";
                     *              else
                     *                      error+=a+"\n";
                     *      cdata.Error = error;
                     *      cdata.Warning = warning;
                     * }*/
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#9
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "nasm";
            string args     = "-f elf64 -o " + idata.BaseDir + "1.o " + idata.PathToSource;
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "1.o"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }

            //now linker
            compiler             = "ld";
            args                 = "-o " + idata.BaseDir + "a.out " + idata.BaseDir + "1.o";
            res                  = Engine.CallCompiler(compiler, args, out compileTime);
            cdata.CompileTimeMs += compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = "Linker:\n" + Utils.ConcatenateString(res[0], res[1]);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                if (!string.IsNullOrEmpty(cdata.Warning))
                {
                    cdata.Warning += "\n";
                }
                else
                {
                    cdata.Warning = "";
                }
                cdata.Warning += "Linker:\n";
                cdata.Warning  = Utils.ConcatenateString(res[0], res[1]);
            }

            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#10
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            Directory.SetCurrentDirectory(idata.BaseDir);
            List <string> dropLines = new List <string>();

            dropLines.Add("Compiling");
            dropLines.Add("Linking");

            string compiler = "ghc";

            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("-o a.out"))
            {
                cdata.Error   = "Compiler args must contain '-o a.out'";
                cdata.Success = false;
                return(cdata);
            }
            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("source_file.hs"))
            {
                cdata.Error   = "Compiler args must contain 'source_file.hs'";
                cdata.Success = false;
                return(cdata);
            }

            idata.Compiler_args = idata.Compiler_args.Replace("source_file.hs", idata.PathToSource);
            idata.Compiler_args = idata.Compiler_args.Replace("-o a.out", "-o " + idata.BaseDir + "a.out ");

            string args = idata.Compiler_args;
            //string args = /*"-Wall*/" -o " + idata.BaseDir + "a.out " + idata.PathToSource;

            long compileTime;
            var  res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#11
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "dmd";

            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("-ofa.out"))
            {
                cdata.Error   = "Compiler args must contain '-ofa.out'";
                cdata.Success = false;
                return(cdata);
            }
            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("source_file.d"))
            {
                cdata.Error   = "Compiler args must contain 'source_file.d'";
                cdata.Success = false;
                return(cdata);
            }

            idata.Compiler_args = idata.Compiler_args.Replace("source_file.d", idata.PathToSource);
            idata.Compiler_args = idata.Compiler_args.Replace("-ofa.out", "-of" + idata.BaseDir + "a.out ");

            string args = idata.Compiler_args;
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#12
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            List <string> dropLines = new List <string>();

            dropLines.Add("Free Pascal Compiler version");
            dropLines.Add("Copyright (c)");
            dropLines.Add("Target OS:");
            dropLines.Add("Compiling ");
            dropLines.Add("Linking ");
            dropLines.Add("lines compiled");
            dropLines.Add("contains output sections; did you forget -T?");
            dropLines.Add("Fatal: Compilation aborted");
            dropLines.Add("returned an error exitcode (normal if you did not specify a source file to be compiled)");


            string compiler = "fpc";
            string args     = "-o" + idata.BaseDir + "a.out " + " -Fi" + idata.BaseDir + " " + idata.PathToSource;
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#13
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            List <string> dropLines = new List <string>();

            dropLines.Add("gcc-4.9 -c -I");
            dropLines.Add("file name does not match unit name, should be");


            Directory.SetCurrentDirectory(idata.BaseDir);
            string compiler = "gnat compile";
            string args     = idata.PathToSource;
            long   compileTime;
            var    res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;
            if (!File.Exists(idata.BaseDir + "source.o"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
            }

            //now binder
            compiler             = "gnatbind";
            args                 = idata.BaseDir + "source";
            res                  = Engine.CallCompiler(compiler, args, out compileTime);
            cdata.CompileTimeMs += compileTime;
            if (!File.Exists(idata.BaseDir + "b~source.adb"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = "Binder:\n" + Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                if (!string.IsNullOrEmpty(cdata.Warning))
                {
                    cdata.Warning += "\n";
                }
                else
                {
                    cdata.Warning = "";
                }
                cdata.Warning += "Binder:\n";
                cdata.Warning  = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
            }

            //now linker
            compiler             = "gnatlink";
            args                 = idata.BaseDir + "source";
            res                  = Engine.CallCompiler(compiler, args, out compileTime);
            cdata.CompileTimeMs += compileTime;
            if (!File.Exists(idata.BaseDir + "source"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = "Linker:\n" + Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                if (!string.IsNullOrEmpty(cdata.Warning))
                {
                    cdata.Warning += "\n";
                }
                else
                {
                    cdata.Warning = "";
                }
                cdata.Warning += "Linker:\n";
                cdata.Warning  = Utils.RemoveSomeLines(Utils.ConcatenateString(res[0], res[1]), dropLines);
            }

            cdata.ExecuteThis = idata.BaseDir + "source";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }
示例#14
0
        public CompilerData Compile(InputData idata, CompilerData cdata)
        {
            string compiler = "go";


            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("-o a.out"))
            {
                cdata.Error   = "Compiler args must contain '-o a.out'";
                cdata.Success = false;
                return(cdata);
            }
            if (string.IsNullOrEmpty(idata.Compiler_args) || !idata.Compiler_args.Contains("source_file.go"))
            {
                cdata.Error   = "Compiler args must contain 'source_file.go'";
                cdata.Success = false;
                return(cdata);
            }

            idata.Compiler_args = idata.Compiler_args.Replace("source_file.go", idata.PathToSource);
            idata.Compiler_args = idata.Compiler_args.Replace("-o a.out", "-o " + idata.BaseDir + "a.out ");

            string args = "build " + idata.Compiler_args;
            //string args = "build -o " + idata.BaseDir + "a.out " + idata.PathToSource;

            long compileTime;
            var  res = Engine.CallCompiler(compiler, args, out compileTime);

            cdata.CompileTimeMs = compileTime;

            Regex r = new Regex(@"service/usercode/\d+/\d+");

            if (!File.Exists(idata.BaseDir + "a.out"))
            {
                if (res.Count > 1)
                {
                    cdata.Error = Utils.ConcatenateString(res[0], res[1]);
                    cdata.Error = cdata.Error.Replace("# command-line-arguments\n", "");
                    cdata.Error = r.Replace(cdata.Error, "source_file");

                    /*if(cdata.Error != null)
                     * {
                     *      string[] ew = cdata.Error.Split(new string[]{"\n"}, StringSplitOptions.RemoveEmptyEntries);
                     *      string error = "";
                     *      string warning = "";
                     *      foreach(var a in ew)
                     *              if(a.Contains("error: "))
                     *                      error+=a+"\n";
                     *              else if(a.Contains("warning: "))
                     *                      warning+=a+"\n";
                     *      cdata.Error = error;
                     *      cdata.Warning = warning;
                     * }*/
                }
                cdata.Success = false;
                return(cdata);
            }
            if (res.Count > 1 && (!string.IsNullOrEmpty(res[0]) || !string.IsNullOrEmpty(res[1])))
            {
                cdata.Warning = Utils.ConcatenateString(res[0], res[1]);
                cdata.Warning = r.Replace(cdata.Warning, "source_file");
            }
            cdata.ExecuteThis = idata.BaseDir + "a.out";
            cdata.Executor    = "";
            cdata.Success     = true;
            return(cdata);
        }