Package antlr
Class TokenWithIndex
- java.lang.Object
-
- antlr.Token
-
- antlr.CommonToken
-
- antlr.TokenWithIndex
-
- All Implemented Interfaces:
java.lang.Cloneable
public class TokenWithIndex extends CommonToken
This token knows what index 0..n-1 it is from beginning of stream. Designed to work with TokenStreamRewriteEngine.java
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
index
Index into token array indicating position in input stream-
Fields inherited from class antlr.CommonToken
col, line, text
-
Fields inherited from class antlr.Token
badToken, EOF_TYPE, INVALID_TYPE, MIN_USER_TYPE, NULL_TREE_LOOKAHEAD, SKIP, type
-
-
Constructor Summary
Constructors Constructor Description TokenWithIndex()
TokenWithIndex(int i, java.lang.String t)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIndex()
void
setIndex(int i)
java.lang.String
toString()
-
Methods inherited from class antlr.CommonToken
getColumn, getLine, getText, setColumn, setLine, setText
-
Methods inherited from class antlr.Token
getFilename, getType, setFilename, setType
-
-
-
-
Method Detail
-
setIndex
public void setIndex(int i)
-
getIndex
public int getIndex()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classCommonToken
-
-