itec.minicompiler
Class Token

java.lang.Object
  extended byitec.minicompiler.Token
Direct Known Subclasses:
IdentToken, NumberToken, SimpleToken

public abstract class Token
extends java.lang.Object

The Token implements a sequence of characters and/or numbers the Scanner can work with.

The Token is defined abstract so that no instance of it can be created but a subclass with more specialised attributes has to be used.

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

Field Summary
private  int kind
          The Kind of the Token (Keyword, Ident, Number, ...)
 
Constructor Summary
Token()
           
 
Method Summary
 int getKind()
          Return the kind of the actual Token.
 void setKind(int k)
          Set the kind of the actual Token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kind

private int kind
The Kind of the Token (Keyword, Ident, Number, ...)

Constructor Detail

Token

public Token()
Method Detail

getKind

public int getKind()
Return the kind of the actual Token.

Returns:
The kind of the Token

setKind

public void setKind(int k)
Set the kind of the actual Token.

Parameters:
k - The new kind of the Token