jfun.parsec

Class PositionedToken

public class PositionedToken extends Object implements Serializable

Deprecated: Use Tok instead.

This class carries the position information of a token.

Author: Ben Yu 2004-11-7

Constructor Summary
PositionedToken(int i, int l, Object tok)
Create a PositionedToken object.
Method Summary
intgetIndex()
gets the index of the token in the orginal CharSequence.
intgetLength()
Gets the length of the token.
ObjectgetToken()
gets the token.
StringtoString()

Constructor Detail

PositionedToken

public PositionedToken(int i, int l, Object tok)
Create a PositionedToken object.

Parameters: i the starting index. l the length of the token. tok the token.

Method Detail

getIndex

public int getIndex()
gets the index of the token in the orginal CharSequence.

Returns: the index.

getLength

public int getLength()
Gets the length of the token.

Returns: the length of the token.

getToken

public Object getToken()
gets the token.

Returns: the token.

toString

public String toString()