Class InterpreterDataForBasicSymbols

java.lang.Object
de.monticore.interpreter.util.InterpreterData
de.monticore.interpreter.util.InterpreterDataForBasicSymbols

public class InterpreterDataForBasicSymbols extends de.monticore.interpreter.util.InterpreterData
The InterpreterData for most cases; It maps BasicSymbols to values, i.e., variables to values and functions to behavior.
  • Field Details

  • Constructor Details

    • InterpreterDataForBasicSymbols

      public InterpreterDataForBasicSymbols()
  • Method Details

    • getFrameLayoutStack

      public Stack<MIFrameLayoutForBasicSymbols> getFrameLayoutStack()
      Returns:
      the current frame layout.
    • getFunctions

      public Map<FunctionSymbol,de.monticore.values.MCValueFunction> getFunctions()
      Never(!) edit this map yourself.
      Returns:
      the map of defined functions.
    • defineFunction

      public void defineFunction(FunctionSymbol funcSym, de.monticore.values.MCValueFunction value)
      Links a behavior to a function symbol
      Parameters:
      funcSym - the function symbol to link behavior to
      value - the behavior
    • getFunctionSupplier

      public Supplier<de.monticore.values.MCValueFunction> getFunctionSupplier(FunctionSymbol funcSym)
      Returns the function behavior as a Supplier (to break recursion)
      Parameters:
      funcSym - the function symbol to get the behavior for
      Returns:
      The Behavior linked to the function symbol
    • reset

      public void reset()
      Overrides:
      reset in class de.monticore.interpreter.util.InterpreterData