| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| protected int | |
| protected int | index
What token number is this from 0..n-1 tokens; < 0 implies invalid index |
| protected transient CharStream | |
| protected int | |
| protected int | start
The char position into the input buffer where this token starts |
| protected int | stop
The char position into the input buffer where this token stops |
| protected String | text
We need to be able to change the text once in a while. |
| protected int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | getCharPositionInLine()
Implements org. |
| public CharStream | getInputStream()
Implements org. |
| public int | getLine()
Implements org. |
| public int | |
| public int | |
| public String | |
| public int | getTokenIndex()
Implements org. |
| public int | |
| public void | |
| public void | setCharPositionInLine(int charPositionInLine)
Implements org. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String |
| channel | back to summary |
|---|---|
| protected int channel | |
| charPositionInLine | back to summary |
|---|---|
| protected int charPositionInLine | |
| index | back to summary |
|---|---|
| protected int index What token number is this from 0..n-1 tokens; < 0 implies invalid index | |
| input | back to summary |
|---|---|
| protected transient CharStream input | |
| line | back to summary |
|---|---|
| protected int line | |
| start | back to summary |
|---|---|
| protected int start The char position into the input buffer where this token starts | |
| stop | back to summary |
|---|---|
| protected int stop The char position into the input buffer where this token stops | |
| text | back to summary |
|---|---|
| protected String text We need to be able to change the text once in a while. If this is non-null, then getText should return this. Note that start/stop are not affected by changing this. | |
| type | back to summary |
|---|---|
| protected int type | |
| CommonToken | back to summary |
|---|---|
| public CommonToken(int type) | |
| CommonToken | back to summary |
|---|---|
| public CommonToken(CharStream input, int type, int channel, int start, int stop) | |
| CommonToken | back to summary |
|---|---|
| public CommonToken(int type, String text) | |
| CommonToken | back to summary |
|---|---|
| public CommonToken(Token oldToken) | |
| getChannel | back to summary |
|---|---|
| public int getChannel() Implements org.
| |
| getCharPositionInLine | back to summary |
|---|---|
| public int getCharPositionInLine() Implements org. Doc from org. The index of the first character relative to the beginning of the line 0..n-1
| |
| getInputStream | back to summary |
|---|---|
| public CharStream getInputStream() Implements org. Doc from org. From what character stream was this token created? You don't have to implement but it's nice to know where a Token comes from if you have include files etc... on the input.
| |
| getLine | back to summary |
|---|---|
| public int getLine() Implements org. Doc from org. The line number on which this token was matched; line=1..n
| |
| getStartIndex | back to summary |
|---|---|
| public int getStartIndex() | |
| getStopIndex | back to summary |
|---|---|
| public int getStopIndex() | |
| getText | back to summary |
|---|---|
| public String getText() Implements org. Doc from org. Get the text of the token
| |
| getTokenIndex | back to summary |
|---|---|
| public int getTokenIndex() Implements org. Doc from org. An index from 0..n-1 of the token object in the input stream. This must be valid in order to use the ANTLRWorks debugger.
| |
| getType | back to summary |
|---|---|
| public int getType() Implements org.
| |
| setChannel | back to summary |
|---|---|
| public void setChannel(int channel) Implements org.
| |
| setCharPositionInLine | back to summary |
|---|---|
| public void setCharPositionInLine(int charPositionInLine) Implements org.
| |
| setInputStream | back to summary |
|---|---|
| public void setInputStream(CharStream input) Implements org.
| |
| setLine | back to summary |
|---|---|
| public void setLine(int line) Implements org.
| |
| setStartIndex | back to summary |
|---|---|
| public void setStartIndex(int start) | |
| setStopIndex | back to summary |
|---|---|
| public void setStopIndex(int stop) | |
| setText | back to summary |
|---|---|
| public void setText(String text) Implements org. Override the text for this token. getText() will return this text rather than pulling from the buffer. Note that this does not mean that start/stop indexes are not valid. It means that that input was converted to a new string in the token object.
| |
| setTokenIndex | back to summary |
|---|---|
| public void setTokenIndex(int index) Implements org.
| |
| setType | back to summary |
|---|---|
| public void setType(int type) Implements org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |