public void Run(DuAnalyzedProject project) { Logger.LogMessage("INTERPRETATING...", Logger.LogLevel.Warning); ConsoleHandler.Global.WriteLine(new string('-', 30)); ctx = new InterpretatorContext() { Project = project }; project.AnalysedCode.InvokeForAll(s => { ctx.ExecutablesIterators.Add(-1); for (int i = 0; i < s.Executables.Count; i++) { ctx.ExecutablesIterators[0] = i; s.Executables[i].OnStart(ctx); } ctx.ExecutablesIterators.RemoveAt(0); }); var main = project.AnalysedCode[0]; ctx.ExecutablesIterators.Clear(); Execute(new NullBlock(main.Executables, null)); Logger.LogMessage("Program has finished", Logger.LogLevel.Console); }
public DuAnalyzedProject Run(DuProject project) { Logger.LogMessage("ANALYSING STADE START", Logger.LogLevel.Warning); var analyzedProject = new DuAnalyzedProject(project); foreach (var item in project.CodeFiles) { Logger.LogMessage("Analysing File at " + item.FileInfo.Path, Logger.LogLevel.Info); NonLecsicAnalys(item); Logger.LogMessage("File prepared to analize", Logger.LogLevel.Info); var analyzed = BlockSplitingAndTypping(item); Logger.LogMessage("Block and Instructions defined", Logger.LogLevel.Info); analyzed = AliasReplace(analyzed); Logger.LogMessage("Alias replace complite", Logger.LogLevel.Info); analyzedProject.AnalysedCode.Add(analyzed); Logger.LogMessage("File analize complite", Logger.LogLevel.Info); } Logger.LogMessage("Finalizing...", Logger.LogLevel.Info); analyzedProject = FinalizeAnalyse(analyzedProject); Logger.LogMessage("ANALYSING STADE END", Logger.LogLevel.Warning); return(analyzedProject); }
private static DuAnalyzedProject FinalizeAnalyse(DuAnalyzedProject analyzedProject) { return(analyzedProject); }