예제 #1
0
 public void Call(Interpreter shadowee)
 {
     var oldstate = shadowee.GetState ();
     var newstate = Interpreter
         .GrabShadow (shadowee)
         .Feed (Source)
         .Interpret ()
         .GetState ();
     shadowee.SetState (newstate);
 }
예제 #2
0
 internal QoState()
 {
     Interpreter = null;
     Input = string.Empty;
     Output = string.Empty;
     MemoryImage = new int[0];
     StackImage = new int[0];
     Functions = new QoFunction[0];
     Errors = new QoDebugMessage[0];
 }
예제 #3
0
 public QoState(Interpreter interpreter)
 {
     Interpreter = interpreter;
     Input = interpreter.Input;
     Output = interpreter.Output;
     ProgramCounter = interpreter.ProgramCounter;
     CellPointer = interpreter.CellPointer;
     InputPointer = interpreter.InputPointer;
     MemoryImage = interpreter.Memory;
     StackImage = interpreter.Stack;
     Functions = interpreter.Functions;
     Errors = interpreter.Errors;
 }
예제 #4
0
 public static Interpreter GrabShadow(Interpreter shadowee)
 {
     var interpreter = new Interpreter (shadowee.hosted, true);
     interpreter.SetState (shadowee.GetState ());
     return interpreter;
 }