org.extex.ocpware.compiler.arith
Class LastChar

java.lang.Object
  extended by org.extex.ocpware.compiler.arith.ArithExpr
      extended by org.extex.ocpware.compiler.arith.LastChar
All Implemented Interfaces:
Expr

public class LastChar
extends ArithExpr
implements Expr

This class represents an arithmetic expression which references a character in the prefix relative to last.

Version:
$Revision:6007 $
Author:
Gerd Neugebauer

Constructor Summary
LastChar(int n)
          Creates a new object.
 
Method Summary
 void outRight(CompilerState cs, boolean withOffset)
          Compile the string expression into a set of ΩCP instructions.
 java.lang.String toString()
          
 
Methods inherited from class org.extex.ocpware.compiler.arith.ArithExpr
needsParen, parse, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LastChar

public LastChar(int n)
Creates a new object.

Parameters:
n - the number of positions from the right
Method Detail

outRight

public void outRight(CompilerState cs,
                     boolean withOffset)
              throws java.io.IOException,
                     ArgmentTooBigException
Compile the string expression into a set of ΩCP instructions.

Specified by:
outRight in interface Expr
Parameters:
cs - the compiler state for lookup
withOffset - use push back instead of output
Throws:
java.io.IOException - in case of an I/O error
TableNotDefinedException - in case that no matching table is known for a symbolic table reference
ArgmentTooBigException - in case that an argument is encountered which does not fit into two bytes
See Also:
Expr.outRight( org.extex.ocpware.compiler.parser.CompilerState, boolean)

toString

public java.lang.String toString()

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