|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.action.Action
public abstract class Action
This class represents the base class of all actions in MillScript. As such all actions must extend this class, or one of it's sub-classes. An action is the result of compiling an expression and is the final stage of compilation.
Expr,
Syntax| Constructor Summary | |
|---|---|
Action()
|
|
| Method Summary | |
|---|---|
void |
act(Machine mc)
This method wraps action, to perform general purpose
exception handling. |
java.lang.Object |
act1(Machine mc)
Returns the last object pushed onto the stack, after performing this action. |
abstract void |
action(Machine mc)
Performs this action, on the specified machine. |
int |
getLineNumber()
|
java.lang.String |
getOrigin()
|
boolean |
predAct(Machine mc)
Returns the boolean value of the last object pushed onto the stack, after performing this action. |
void |
setContext(java.lang.String fname,
int ln)
|
void |
setLineNumber(int n)
|
void |
setOrigin(java.lang.String o)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Action()
| Method Detail |
|---|
public final void act(Machine mc)
action, to perform general purpose
exception handling. Generally this method would be called to perform
an action, rather than action directly.
mc - the machine to perform this action onpublic final java.lang.Object act1(Machine mc)
act method
and poping a result off the machine's stack.
mc - the machine to perform this action on
public abstract void action(Machine mc)
mc - the machine to perform this action onpublic int getLineNumber()
getLineNumber in interface org.millscript.commons.alert.AlertOriginAlertOrigin.getLineNumber()public java.lang.String getOrigin()
getOrigin in interface org.millscript.commons.alert.AlertOriginAlertOrigin.getOrigin()public final boolean predAct(Machine mc)
act1 method, but it requires that the last value on the
stack is a Boolean.
mc - the machine to perform this action on
public final void setContext(java.lang.String fname,
int ln)
setContext in interface org.millscript.commons.alert.AlertOriginAlertOrigin.setContext(java.lang.String, int)public void setLineNumber(int n)
setLineNumber in interface org.millscript.commons.alert.AlertOriginAlertOrigin.setLineNumber(int)public void setOrigin(java.lang.String o)
setOrigin in interface org.millscript.commons.alert.AlertOriginAlertOrigin.setOrigin(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||