org.extex.ocpware.compiler.state
Class StatePush
java.lang.Object
org.extex.ocpware.compiler.state.StatePush
- All Implemented Interfaces:
- RightState
public class StatePush
- extends java.lang.Object
- implements RightState
This state change instruction pushes the current state to the state stack and
sets the current state to a new value. In the input stream it is represented
by a sequence of th following form:
<push: 〈state〉>
Here 〈state〉 denotes the symbolic name of a state.
- Version:
- $Revision:6007 $
- Author:
- Gerd Neugebauer
|
Constructor Summary |
StatePush(java.lang.String state)
Creates a new object. |
|
Method Summary |
void |
compile(CompilerState cs,
boolean withOffset)
Translate a right state expression into a set of instructions. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StatePush
public StatePush(java.lang.String state)
- Creates a new object.
- Parameters:
state - the state
compile
public void compile(CompilerState cs,
boolean withOffset)
throws java.io.IOException,
StateNotDefinedException,
ArgmentTooBigException
- Translate a right state expression into a set of instructions.
- Specified by:
compile in interface RightState
- Parameters:
cs - the compiler statewithOffset - push back instead of output
- Throws:
java.io.IOException - in case of an error
StateNotDefinedException
ArgmentTooBigException - in case that an argument is encountered
which does not fit into two bytes- See Also:
RightState.compile(
org.extex.ocpware.compiler.parser.CompilerState, boolean)
toString
public java.lang.String toString()
-
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()