Package antlr
Class TokenWithIndex
java.lang.Object
antlr.Token
antlr.CommonToken
antlr.TokenWithIndex
- All Implemented Interfaces:
Cloneable
This token knows what index 0..n-1 it is from beginning of stream.
Designed to work with TokenStreamRewriteEngine.java
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
Index into token array indicating position in input streamFields 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 -
Method Summary
Methods inherited from class antlr.CommonToken
getColumn, getLine, getText, setColumn, setLine, setText
Methods inherited from class antlr.Token
getFilename, getType, setFilename, setType
-
Field Details
-
index
int indexIndex into token array indicating position in input stream
-
-
Constructor Details
-
TokenWithIndex
public TokenWithIndex() -
TokenWithIndex
-
-
Method Details
-
setIndex
public void setIndex(int i) -
getIndex
public int getIndex() -
toString
- Overrides:
toString
in classCommonToken
-