Class ExecutionStack

All Implemented Interfaces:
Serializable, Cloneable, Iterable<PsyObject>, Collection<PsyObject>, List<PsyObject>, RandomAccess, SequencedCollection<PsyObject>

public class ExecutionStack extends Stack<PsyObject>
An interpreter’s execution stack.
See Also:
  • Constructor Details

    • ExecutionStack

      public ExecutionStack()
      Constructs an empty stack.
  • Method Details

    • enterLoop

      public void enterLoop()
      Enters the loop environment. Pushes the loop mark onto this stack.
    • checkLoop

      public boolean checkLoop()
    • exitLoop

      public void exitLoop() throws PsyInvalidExitException
      Exits the innermost loop environment. Pops all the elements from this stack upto the first loop mark.
      Throws:
      PsyInvalidExitException - when there is not loop mark on this stack.
    • enterStop

      public void enterStop()
      Enters the stopped environment. Pushes the stop mark onto this stack.
    • checkStop

      public boolean checkStop()
    • exitStop

      public void exitStop()
    • clone

      public ExecutionStack clone()
      Overrides:
      clone in class ArrayList<PsyObject>