org.jawk.intermediate
Interface PositionForInterpretation

All Superinterfaces:
Position

public interface PositionForInterpretation
extends Position

An interface to a tuple position for interpretation.

This is differentiated from a position interface for compilation because compilation requires linear access (i.e., non-jumps) to the tuple list, while interpretation requires this as well as jump capability.


Method Summary
 int current()
           
 void jump(Address address)
          Reposition to the tuple located at a particular address.
 void jump(int idx)
          Reposition to the tuple located at a particular index into the tuple list (queue)..
 
Methods inherited from interface org.jawk.intermediate.Position
addressArg, arg, boolArg, classArg, intArg, isEOF, lineNumber, next, opcode
 

Method Detail

jump

void jump(Address address)
Reposition to the tuple located at a particular address. This is usually done in a response to an if condition. However, this is also done to perform loops, etc.

Parameters:
address - The target address for the jump.

current

int current()
Returns:
The current index into the tuple list (queue) of the tuple located at the current position.

jump

void jump(int idx)
Reposition to the tuple located at a particular index into the tuple list (queue)..

Parameters:
idx - The target index for the jump.