

Public Member Functions | |
| CommonToken (int type) | |
| CommonToken (CharStream input, int type, int channel, int start, int stop) | |
| CommonToken (int type, String text) | |
| CommonToken (Token oldToken) | |
| int | getType () |
| void | setLine (int line) |
| String | getText () |
| void | setText (String text) |
| int | getLine () |
| int | getCharPositionInLine () |
| void | setCharPositionInLine (int charPositionInLine) |
| int | getChannel () |
| void | setChannel (int channel) |
| void | setType (int type) |
| int | getStartIndex () |
| void | setStartIndex (int start) |
| int | getStopIndex () |
| void | setStopIndex (int stop) |
| int | getTokenIndex () |
| void | setTokenIndex (int index) |
| CharStream | getInputStream () |
| void | setInputStream (CharStream input) |
| String | toString () |
Protected Attributes | |
| int | type |
| int | line |
| int | charPositionInLine = -1 |
| int | channel = DEFAULT_CHANNEL |
| transient CharStream | input |
| String | text |
| int | index = -1 |
| int | start |
| int | stop |
Definition at line 32 of file CommonToken.java.
| org.antlr.runtime.CommonToken.CommonToken | ( | int | type | ) |
Definition at line 54 of file CommonToken.java.
| org.antlr.runtime.CommonToken.CommonToken | ( | CharStream | input, | |
| int | type, | |||
| int | channel, | |||
| int | start, | |||
| int | stop | |||
| ) |
Definition at line 58 of file CommonToken.java.
| org.antlr.runtime.CommonToken.CommonToken | ( | int | type, | |
| String | text | |||
| ) |
Definition at line 66 of file CommonToken.java.
| org.antlr.runtime.CommonToken.CommonToken | ( | Token | oldToken | ) |
Definition at line 72 of file CommonToken.java.
| int org.antlr.runtime.CommonToken.getType | ( | ) |
| void org.antlr.runtime.CommonToken.setLine | ( | int | line | ) |
| String org.antlr.runtime.CommonToken.getText | ( | ) |
Get the text of the token
Implements org.antlr.runtime.Token.
Definition at line 93 of file CommonToken.java.
| void org.antlr.runtime.CommonToken.setText | ( | String | text | ) |
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.
Implements org.antlr.runtime.Token.
Definition at line 109 of file CommonToken.java.
| int org.antlr.runtime.CommonToken.getLine | ( | ) |
The line number on which this token was matched; line=1..n
Implements org.antlr.runtime.Token.
Definition at line 113 of file CommonToken.java.
| int org.antlr.runtime.CommonToken.getCharPositionInLine | ( | ) |
The index of the first character relative to the beginning of the line 0..n-1
Implements org.antlr.runtime.Token.
Definition at line 117 of file CommonToken.java.
| void org.antlr.runtime.CommonToken.setCharPositionInLine | ( | int | charPositionInLine | ) |
| int org.antlr.runtime.CommonToken.getChannel | ( | ) |
| void org.antlr.runtime.CommonToken.setChannel | ( | int | channel | ) |
| void org.antlr.runtime.CommonToken.setType | ( | int | type | ) |
| int org.antlr.runtime.CommonToken.getStartIndex | ( | ) |
Definition at line 137 of file CommonToken.java.
| void org.antlr.runtime.CommonToken.setStartIndex | ( | int | start | ) |
Definition at line 141 of file CommonToken.java.
| int org.antlr.runtime.CommonToken.getStopIndex | ( | ) |
Definition at line 145 of file CommonToken.java.
| void org.antlr.runtime.CommonToken.setStopIndex | ( | int | stop | ) |
Definition at line 149 of file CommonToken.java.
| int org.antlr.runtime.CommonToken.getTokenIndex | ( | ) |
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.
Implements org.antlr.runtime.Token.
Definition at line 153 of file CommonToken.java.
| void org.antlr.runtime.CommonToken.setTokenIndex | ( | int | index | ) |
| CharStream org.antlr.runtime.CommonToken.getInputStream | ( | ) |
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.
Implements org.antlr.runtime.Token.
Definition at line 161 of file CommonToken.java.
| void org.antlr.runtime.CommonToken.setInputStream | ( | CharStream | input | ) |
| String org.antlr.runtime.CommonToken.toString | ( | ) |
Definition at line 169 of file CommonToken.java.
int org.antlr.runtime.CommonToken.type [protected] |
Definition at line 33 of file CommonToken.java.
int org.antlr.runtime.CommonToken.line [protected] |
Definition at line 34 of file CommonToken.java.
int org.antlr.runtime.CommonToken.charPositionInLine = -1 [protected] |
Definition at line 35 of file CommonToken.java.
int org.antlr.runtime.CommonToken.channel = DEFAULT_CHANNEL [protected] |
Definition at line 36 of file CommonToken.java.
transient CharStream org.antlr.runtime.CommonToken.input [protected] |
Definition at line 37 of file CommonToken.java.
String org.antlr.runtime.CommonToken.text [protected] |
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.
Definition at line 43 of file CommonToken.java.
int org.antlr.runtime.CommonToken.index = -1 [protected] |
What token number is this from 0..n-1 tokens; < 0 implies invalid index
Definition at line 46 of file CommonToken.java.
int org.antlr.runtime.CommonToken.start [protected] |
The char position into the input buffer where this token starts
Definition at line 49 of file CommonToken.java.
int org.antlr.runtime.CommonToken.stop [protected] |
The char position into the input buffer where this token stops
Definition at line 52 of file CommonToken.java.
1.5.5