goldengine.java
Class Token

java.lang.Object
  |
  +--goldengine.java.Token

public class Token
extends java.lang.Object

-------------------------------------------------------------------------------------------
Source File: Token.java
Author: Devin Cook, Matthew Hawkins
Description: A representation of a token associated with this grammar.
-------------------------------------------------------------------------------------------
Revision List

      Author          Version         Description
      ------          -------         -----------
      MPH             1.0             First Issue

-------------------------------------------------------------------------------------------
IMPORT: NONE
-------------------------------------------------------------------------------------------


Constructor Summary
Token()
          Token The constructor initialises the data of this Token.
 
Method Summary
 java.lang.Object getData()
          getData This method will get the data of this Token.
 int getKind()
          getKind This method will get the kind of this Token.
 java.lang.String getName()
          getName This method will get the name of this Token.
 Symbol getPSymbol()
          getPSymbol This method will get the parent symbol of this Token.
 int getState()
          getState This method will get the State of this Token.
 int getTableIndex()
          getTableIndex This method will get the table index of this Token.
 java.lang.String getText()
          getText This method will get the text of this Token.
 void setData(java.lang.Object value)
          setData This method will set the data of this token to that passed in.
 void setParentSymbol(Symbol theSymbol)
          setParentSymbol This method will set the parent symbol of this token to that passed in.
 void setState(int newState)
          setState This method will set the state of this token to that passed in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Token

public Token()
Token The constructor initialises the data of this Token.
Method Detail

getState

public int getState()
getState This method will get the State of this Token.
Returns:
The State of this Token.

getKind

public int getKind()
getKind This method will get the kind of this Token. This is contained in the parent symbol, and defined in SymbolTypeConstants.
Returns:
The kind of this Token.

getTableIndex

public int getTableIndex()
getTableIndex This method will get the table index of this Token.
Returns:
The table index of this Token.

getData

public java.lang.Object getData()
getData This method will get the data of this Token.
Returns:
The data of this Token.

getText

public java.lang.String getText()
getText This method will get the text of this Token. This is the text in the parent symbol getText() method.
Returns:
The text of this Token.

getName

public java.lang.String getName()
getName This method will get the name of this Token. This is the name of the parent symbol in the getName() method.
Returns:
The name of this Token.

getPSymbol

public Symbol getPSymbol()
getPSymbol This method will get the parent symbol of this Token.
Returns:
The parent symbol of this Token.

setState

public void setState(int newState)
setState This method will set the state of this token to that passed in.
Parameters:
newState - The new state of the token.

setData

public void setData(java.lang.Object value)
setData This method will set the data of this token to that passed in.
Parameters:
value - The new data of the token.

setParentSymbol

public void setParentSymbol(Symbol theSymbol)
setParentSymbol This method will set the parent symbol of this token to that passed in.
Parameters:
theSymbol - The new parent symbol of the token.