org.waxeye.input
Interface IParserInput

All Known Implementing Classes:
InputBuffer

public interface IParserInput

An interface for parser input.

Author:
Orlando Hill

Field Summary
static int EOF
          The end of the file marker.
 
Method Summary
 int consume()
          Gets the next character from the input and moves the position forward 1.
 int getPosition()
          Gets the position marker in the input.
 int peek()
          Gets the next character from the input but maintains the position.
 void setPosition(int position)
          Sets the position marker of the input to the given value.
 

Field Detail

EOF

static final int EOF
The end of the file marker.

See Also:
Constant Field Values
Method Detail

consume

int consume()
Gets the next character from the input and moves the position forward 1.

Returns:
The next character or EOF if end of input reached.

peek

int peek()
Gets the next character from the input but maintains the position.

Returns:
The next character or EOF if end of input reached.

getPosition

int getPosition()
Gets the position marker in the input.

Returns:
Returns the position marker in the input.

setPosition

void setPosition(int position)
Sets the position marker of the input to the given value. If the position given is less than 0 then the position is set to 0.

Parameters:
position - The position to set.


Waxeye Parser Generator