Ejemplo n.º 1
0
 def execute_ea(self,*evalArgs):
     stack =[]
     for arg in evalArgs:
         if(arg == new(LispSymbol,"++bc++")):
             bc =""
             for b in self.bytecode.bytecode_txt:
                 bc+=(str(b)+"\n")
             return new(LispString,bc)
         if(arg == new(LispSymbol,"++op++")):
             return self.optcode
         stack.append(arg)
     return BCMachine.executeBC(self.bytecode, self.literals, stack, self.env)
Ejemplo n.º 2
0
 def execute(self,env, *unEvalArgs): 
     stack=[]
     param= []
     for i in range(len(unEvalArgs)):
         evalParam = LISP.Eval.evall(unEvalArgs[i],env)
         if(evalParam == new(LispSymbol,"++bc++")):
             bc =""
             for b  in self.bytecode.bytecode_txt:
                 bc+=(str(b)+"\n")
             return new(LispString,bc)
         if(evalParam == new(LispSymbol,"++op++")):
             return self.optcode
         param.append(evalParam)
         i=i+1
     self.env.setParameterList(param)
     for p in param:
         stack.append(p)
     return BCMachine.executeBC(self.bytecode,self.literals,stack, self.env)