private static void Expl1() { var mrt = new Component(0x6400000); db: { var var = @"space ac{ class AV{ System.int g; constructor AV(){g=4;int y=M(2);} function int M(int a){int l; if(a>0) l=a+M(a-1);else l= a; return l;} } }"; var symentic = new Symentic(); var typeCalc = new TypeCalc(); var d = new Assembly("MV"); var lexical = new Lexical(d, mrt.Cache.Cache); var builder = new Pile(var); var compile = new Compile(var); var parser = new Parser(builder); var system = new Classes.Compile.System(compile, symentic, lexical, parser, typeCalc, d, mrt); system.Lexical.StreamWriter.Reserve(8 * 6); if (!system.Compile.Excecute()) { goto db; } var e_ = 25635; mrt.Process.Execute(new InitialProcessData(6, e_, e_ * 3, e_ * 2, e_ * 4, 0)); system.Assembly["ac"].Types.Clear(); } }
public LoadClasses(ByteCodeMapper byteCodeMapper) { _byteCodeMapper = byteCodeMapper; _typeCalc = new TypeCalc(_byteCodeMapper); byteCodeMapper.ClassLoader = this; Optimum = new Optimum(_byteCodeMapper); Constants = new Constants(this); Caller = new CallManager(this); }
public string GetStringType() { TypeCalc tc = GetTypeCalc(); if (tc == TypeCalc.Complex) { return("Comp"); } return("Real"); }
public void Reset() { if (_isTotal) { strHistory = ""; _isTotal = false; } _typeCalc = TypeCalc.Real; strCalculate = "0"; }
public System(Compile compile, Symentic symentic, Lexical lexical, Parser parser, TypeCalc typeCalc, Assembly assembly, Component mrt) { Compile = compile; Symentic = symentic; Lexical = lexical; Parser = parser; this.TypeCalc = typeCalc; compile.System = this; symentic.System = this; lexical.System = this; parser.System = this; typeCalc.System = this; this.Assembly = assembly; }
public ControllerManager() { strCalculate = "0"; strHistory = ""; _typeCalc = TypeCalc.Real; _isUsing = false; _proc = new Proc <iNumber>(); _mem = new Memory <iNumber>(); /* * Main._cm.MC(); * Main.CorrectInput(trackBar1.Value); * Main._cm._base = trackBar1.Value; */ }
public void SetTypeCalc(TypeCalc _type, string Im = "+") { if (_type == TypeCalc.Complex) { if (GetTypeCalc() == _type) { string tmp = strCalculate.Substring(0, strCalculate.IndexOf('i')); tmp = tmp.Substring(0, tmp.Length - 1); tmp += Im + "i" + strCalculate.Substring(strCalculate.IndexOf('i') + 1); strCalculate = tmp; } else { strCalculate += Im + "i"; } } if (_type == TypeCalc.Frac && strCalculate.Contains('.')) { _type = TypeCalc.Real; } _typeCalc = _type; }
public void BackSpace() { if (_isTotal) { strHistory = ""; _isTotal = false; } if (strCalculate.Length <= 0) { return; } if (_isUsing) { strCalculate = "0"; _isUsing = false; return; } strCalculate = strCalculate.Substring(0, strCalculate.Length - 1); if (strCalculate.Length > 0) { if (strCalculate[strCalculate.Length - 1] == '-' || strCalculate[strCalculate.Length - 1] == '+') { strCalculate = strCalculate.Substring(0, strCalculate.Length - 1); } } if (_typeCalc == TypeCalc.Frac && strCalculate.Contains("/") == false) { _typeCalc = TypeCalc.Real; } if (_typeCalc == TypeCalc.Complex && strCalculate.Contains("i") == false) { _typeCalc = TypeCalc.Real; } if (strCalculate.Length <= 0) { strCalculate = "0"; } }