org.millscript.millscript.action
Class SwitchAction

java.lang.Object
  extended by org.millscript.millscript.action.Action
      extended by org.millscript.millscript.action.SwitchAction
All Implemented Interfaces:
org.millscript.commons.alert.AlertOrigin

public final class SwitchAction
extends Action

This class implements the action for a switch expression.

See Also:
SwitchExpr, SwitchSyntax

Constructor Summary
SwitchAction(Action a, Action[] b, int[] s, Action[] c, Action d)
          Constructs a new switch action with the specified choice, predicate, case-body lookup, case-body and default actions.
 
Method Summary
 void action(Machine mc)
          Performs this action, on the specified machine.
 
Methods inherited from class org.millscript.millscript.action.Action
act, act1, getLineNumber, getOrigin, predAct, setContext, setLineNumber, setOrigin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwitchAction

public SwitchAction(Action a,
                    Action[] b,
                    int[] s,
                    Action[] c,
                    Action d)
Constructs a new switch action with the specified choice, predicate, case-body lookup, case-body and default actions.

Parameters:
a - the choice action
b - the array of predicate actions
s - the array for predicate to case-body action lookups
c - the array of case-body actions
d - the default action
Method Detail

action

public void action(Machine mc)
Description copied from class: Action
Performs this action, on the specified machine. This method must be implemented in sub-classes to perform the required actions.

Specified by:
action in class Action
Parameters:
mc - the machine to perform this action on
See Also:
Action.action(org.millscript.millscript.vm.Machine)


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.