org.extex.ocpware.compiler.left
Class AliasLeft

java.lang.Object
  extended by org.extex.ocpware.compiler.left.AliasLeft
All Implemented Interfaces:
Left

public class AliasLeft
extends java.lang.Object
implements Left

This class represents a reference to an alias as left item.

Version:
$Revision:6007 $
Author:
Gerd Neugebauer

Constructor Summary
AliasLeft(java.lang.String ref)
          Creates a new object.
 
Method Summary
 java.util.List<java.lang.Integer> genLeft(State state, CompilerState cs)
          Compile the left item and add the appropriate instructions to the state.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasLeft

public AliasLeft(java.lang.String ref)
Creates a new object.

Parameters:
ref - the reference
Method Detail

genLeft

public java.util.List<java.lang.Integer> genLeft(State state,
                                                 CompilerState cs)
                                          throws java.io.IOException,
                                                 ArgmentTooBigException,
                                                 AliasNotDefinedException
Compile the left item and add the appropriate instructions to the state. As a result a list of indices into the code is returned which should need to be fixed. This fix inserts the position of the code into the places given. Thus it is possible to put destinations for goto statements into the holes.

Specified by:
genLeft in interface Left
Parameters:
state - the current state
cs - the compiler state
Returns:
the list of instructions to fix
Throws:
AliasNotDefinedException - in case that no matching alias is known for a symbolic table reference
java.io.IOException - in case of an I/O error
ArgmentTooBigException - in case that an argument is encountered which does not fit into two bytes
See Also:
Left.genLeft( org.extex.ocpware.compiler.parser.State, CompilerState)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()