public ProgramState execute(ProgramState programState)
        {
            ExecutionStack <Statement> executionStack = programState.getExecutionStack();

            executionStack.push(second);
            executionStack.push(first);
            return(programState);
        }
        public ProgramState execute(ProgramState programState)
        {
            ExecutionStack <Statement> executionStack = programState.getExecutionStack();
            SymbolTable <string, int>  symbolTable    = programState.getSymbolTable();

            if (expression.evaluate(symbolTable) != 0)
            {
                executionStack.push(ifBranch);
            }
            else if (elseBranch != null)
            {
                executionStack.push(elseBranch);
            }

            return(programState);
        }
示例#3
0
 /// <summary>
 ///   sets the execstack of the current command to be sent to the server
 /// </summary>
 /// <param name = "execStack">- current execution stack of raise event operations from rt </param>
 internal void SetExecutionStack(ExecutionStack execStack)
 {
     ExecutionStack = new ExecutionStack();
     ExecutionStack.push(MGDataCollection.Instance.getTaskIdById(TaskTag), HandlerId, OperIdx);
     ExecutionStack.pushUpSideDown(execStack);
 }
示例#4
0
文件: Command.cs 项目: rinavin/RCJS
 /// <summary>
 ///   sets the execstack of the current command to be sent to the server
 /// </summary>
 /// <param name = "execStack">- current execution stack of raise event operations from rt </param>
 internal void setExecStack(ExecutionStack execStack)
 {
     _executionStack = new ExecutionStack();
     _executionStack.push(MGDataTable.Instance.getTaskIdById(TaskTag), _handlerId, _operIdx);
     _executionStack.pushUpSideDown(execStack);
 }