org.holtz.zoe.zoel
Class ZoelVM
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZoelVM
public ZoelVM(ZoelVMHost h,
ExpressionList main)
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)