org.holtz.zoe.zoel
Class ZoelVM

java.lang.Object
  extended by org.holtz.zoe.zoel.ZoelVM

public class ZoelVM
extends java.lang.Object

A virtual machine that executes Zoel code for a ZoelVMHost.

Author:
Brian Holtz

Nested Class Summary
static class ZoelVM.Turn
          Whether a ZoelVM has executed a turn-ending Operation.
 
Constructor Summary
ZoelVM(ZoelVMHost h, ExpressionList main)
           
 
Method Summary
 ZoelVM.Turn next()
          Step until turn ends
 Literal peek()
           
 ZoelVM poke(Literal val)
           
 Literal pop()
           
 ZoelVM push(boolean val)
           
 ZoelVM push(double val)
           
 ZoelVM push(Literal val)
           
 java.lang.String toString(java.lang.String statementSeparator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoelVM

public ZoelVM(ZoelVMHost h,
              ExpressionList main)
Method Detail

poke

public ZoelVM poke(Literal val)

peek

public Literal peek()

pop

public Literal pop()

push

public ZoelVM push(double val)

push

public ZoelVM push(boolean val)

push

public ZoelVM push(Literal val)

next

public ZoelVM.Turn next()
Step until turn ends

Returns:
Continues if steps > host.maxStepsPerTurn() Finished if step() returned Finished Exited if the program ended

toString

public java.lang.String toString(java.lang.String statementSeparator)