edu.cornell.cs.cs4120.iota.lexer
Interface IotaToken


public interface IotaToken

A token (also called a symbol or a lexeme) in the Iota language.


Method Summary
 boolean equals(Object that)
          Returns whether two tokens are equal.
 Position position()
          The position at which this token occurs in the source.
 IotaTokenType type()
          The type of this token.
 String value()
          The string of characters comprising the token in the source.
 

Method Detail

type

IotaTokenType type()
The type of this token.

Returns:
this token's type

position

Position position()
The position at which this token occurs in the source.

Returns:
this token's position

value

String value()
The string of characters comprising the token in the source.

Returns:
the tokne's value

equals

boolean equals(Object that)
Returns whether two tokens are equal. Two tokens are equal if and only if they have the same types and values and occur in the same position in the source.

Overrides:
equals in class Object
Parameters:
that - the object with which to compare
Returns:
true iff this and that are equal