itec.minicompiler
Class SimpleToken

java.lang.Object
  extended byitec.minicompiler.Token
      extended byitec.minicompiler.SimpleToken
All Implemented Interfaces:
ConstantsInterface

public class SimpleToken
extends Token
implements ConstantsInterface

The SimpleToken implements a keyword or an operation found in the source code. It has no further information than the kind of the keyword or operation.

Version:
1.0 (29.09.2004)
Author:
Stefan Leitner, Stefan Schauer

Field Summary
 
Fields inherited from class itec.minicompiler.Token
 
Fields inherited from interface itec.minicompiler.ConstantsInterface
ACTUALPARAMETERS, AND, ARRAY, ARRAYTYPE, ASSIGNMENT, BECOMES, BEGIN, COLON, COMMA, CONST, DECLARATIONS, DIV, DO, ELSE, ELSIF, EMPTY, END, EPSILON, EQUAL, ERR_EXP_ARRAY, ERR_EXP_BECOMES, ERR_EXP_COLON, ERR_EXP_COMMA, ERR_EXP_DO, ERR_EXP_END, ERR_EXP_EQUAL, ERR_EXP_IDENT, ERR_EXP_IF, ERR_EXP_LPAREN, ERR_EXP_MODULE, ERR_EXP_OF, ERR_EXP_PERIOD, ERR_EXP_PROCEDURE, ERR_EXP_RBRAK, ERR_EXP_RECORD, ERR_EXP_REPEAT, ERR_EXP_RPAREN, ERR_EXP_SEMICOLON, ERR_EXP_THEN, ERR_EXP_UNTIL, ERR_EXP_WHILE, ERR_INV_FACTOR, ERR_INV_STATEMENT, ERR_INV_TYPE, ERR_INVALID_CHARACTER, ERR_NOT_EXP_DECLARATIONS, ERR_NOT_EXP_FACTOR, ERR_NOT_EXP_STATEMENT, ERR_NOT_EXP_TYPE, ERR_NOT_TERMINATED, ERR_NUMBER_TOO_HIGH, EXPRESSION, FACTOR, FIELDLIST, FORMALPARAMETERS, FPSECTION, GEQ, GREATER, IDENT, IDENTLIST, IF, IFSTATEMENT, KEYWORD, LBRAK, LEQ, LESS, LPAREN, MINICOMP, MINUS, MOD, MODULE, NOT, NOTEQUAL, NUMBER, OF, OR, PERIOD, PLUS, PROCEDURE, PROCEDUREBODY, PROCEDURECALL, PROCEDUREDECLARATION, PROCEDUREHEADING, RBRAK, RECORD, RECORDTYPE, REPEAT, REPEATSTATEMENT, RPAREN, SELECTOR, SEMICOLON, SIMPLEEXPRESSION, SINGLE, STATEMENT, STATEMENTSEQUENCE, TERM, THEN, TIMES, TYP, TYPE, UNTIL, VAR, WHILE, WHILESTATEMENT
 
Constructor Summary
SimpleToken(int k)
          Initialize the SimpleToken with a kind k.
 
Method Summary
 java.lang.String stringRep()
          Generate a String-representation of the kind of the actual SimpleToken.
 java.lang.String toString()
          Generate a String-representation of the SimpleToken using the stringRep method.
 
Methods inherited from class itec.minicompiler.Token
getKind, setKind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleToken

public SimpleToken(int k)
Initialize the SimpleToken with a kind k.

Parameters:
k - The kind of the SimpleToken
Method Detail

stringRep

public java.lang.String stringRep()
Generate a String-representation of the kind of the actual SimpleToken.

Returns:
The String-representation of the kind

toString

public java.lang.String toString()
Generate a String-representation of the SimpleToken using the stringRep method.

See Also:
Object.toString()