Class Stack


  • public final class Stack
    extends java.lang.Object
    Class Stack defines the runtime stack that's used by the FormCalc scripting engine. Specifically, the FormCalc interpreter is a stack machine; it doesn't have general purpose registers. Rather all intermediate values are preserved on a stack.

    For example, when the FormCalc interpreter performs an add instruction, it will pop two operands off the stack, add them together, and push the result onto the stack.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CalcSymbol peek​(int nOffset)
      Peeks at a symbol within this Stack object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • peek

        public CalcSymbol peek​(int nOffset)
        Peeks at a symbol within this Stack object.
        Parameters:
        nOffset - an offset within the stack.
        Returns:
        the symbol within the stack.