antlr
Class Token

java.lang.Object
  |
  +--antlr.Token
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
CommonToken

public class Token
extends Object
implements Cloneable

A token is minimally a token type. Subclasses can add the text matched for the token and line info.


Field Summary
static Token badToken
           
static int EOF_TYPE
           
static int INVALID_TYPE
           
static int MIN_USER_TYPE
           
static int NULL_TREE_LOOKAHEAD
           
static int SKIP
           
 
Constructor Summary
Token()
           
Token(int t)
           
Token(int t, String txt)
           
 
Method Summary
 int getColumn()
           
 String getFilename()
           
 int getLine()
           
 String getText()
           
 int getType()
           
 void setColumn(int c)
           
 void setFilename(String name)
           
 void setLine(int l)
           
 void setText(String t)
           
 void setType(int t)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_USER_TYPE

public static final int MIN_USER_TYPE
See Also:
Constant Field Values

NULL_TREE_LOOKAHEAD

public static final int NULL_TREE_LOOKAHEAD
See Also:
Constant Field Values

INVALID_TYPE

public static final int INVALID_TYPE
See Also:
Constant Field Values

EOF_TYPE

public static final int EOF_TYPE
See Also:
Constant Field Values

SKIP

public static final int SKIP
See Also:
Constant Field Values

badToken

public static Token badToken
Constructor Detail

Token

public Token()

Token

public Token(int t)

Token

public Token(int t,
             String txt)
Method Detail

getColumn

public int getColumn()

getLine

public int getLine()

getFilename

public String getFilename()

setFilename

public void setFilename(String name)

getText

public String getText()

setText

public void setText(String t)

setColumn

public void setColumn(int c)

setLine

public void setLine(int l)

getType

public int getType()

setType

public void setType(int t)

toString

public String toString()
Overrides:
toString in class Object


Copyright 1999-2003 Oliver Zeigermann. All Rights Reserved.