CSTNode produced by the Lexer.
antlr.Parser , antlr.Token , Reduction, Types
| Modifier and Type | Field and Description |
|---|---|
| public static final Token | |
| private int | |
| public static final Token | |
| private int | |
| private int | |
| private String | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Reduction | asReduction()
Implements abstract org. Reduction from this token.
|
| public Reduction | asReduction(CSTNode second)
Creates a |
| public Reduction | asReduction(CSTNode second, CSTNode third)
Creates a |
| public Reduction | asReduction(CSTNode second, CSTNode third, CSTNode fourth)
Creates a |
| public Token | |
| public CSTNode | get(int index)
Implements abstract org. |
| public int | getMeaning()
Returns the meaning of this node.
|
| public Token | getRoot()
Implements abstract org. |
| public String | getRootText()
Returns the text of the root node.
|
| public int | getStartColumn()
Overrides org. |
| public int | getStartLine()
Returns the starting line of the node.
|
| public String | |
| public int | |
| public static Token | newDecimal(String text, int startLine, int startColumn)
Creates a token that represents a decimal number. |
| public static Token | newIdentifier(String text, int startLine, int startColumn)
Creates a token that represents an identifier. |
| public static Token | |
| public static Token | |
| public static Token | |
| public static Token | |
| public static Token | newSymbol(int type, int startLine, int startColumn)
Creates a token that represents a symbol, using a library for the text. |
| public static Token | |
| public CSTNode | setMeaning(int meaning)
Sets the meaning for this node (and its root Token).
|
| public void | |
| public int | size()
Implements abstract org. |
| EOF | back to summary |
|---|---|
| public static final Token EOF | |
| meaning | back to summary |
|---|---|
| private int meaning | |
| NULL | back to summary |
|---|---|
| public static final Token NULL | |
| startColumn | back to summary |
|---|---|
| private int startColumn | |
| startLine | back to summary |
|---|---|
| private int startLine | |
| text | back to summary |
|---|---|
| private String text | |
| type | back to summary |
|---|---|
| private int type | |
| Token | back to summary |
|---|---|
| public Token(int type, String text, int startLine, int startColumn) Initializes the Token with the specified information. | |
| Token | back to summary |
|---|---|
| private Token() Initializes the NULL Token. | |
| asReduction | back to summary |
|---|---|
| public Reduction asReduction() Implements abstract org. Creates a | |
| asReduction | back to summary |
|---|---|
| public Reduction asReduction(CSTNode second) Creates a | |
| asReduction | back to summary |
|---|---|
| public Reduction asReduction(CSTNode second, CSTNode third) Creates a | |
| asReduction | back to summary |
|---|---|
| public Reduction asReduction(CSTNode second, CSTNode third, CSTNode fourth) Creates a | |
| dup | back to summary |
|---|---|
| public Token dup() Returns a copy of this Token. | |
| get | back to summary |
|---|---|
| public CSTNode get(int index) Implements abstract org. Returns the specified element, or null. | |
| getMeaning | back to summary |
|---|---|
| public int getMeaning() Overrides org. Returns the meaning of this node. If the node isEmpty(), returns the type of Token.NULL. | |
| getRoot | back to summary |
|---|---|
| public Token getRoot() Implements abstract org. Returns the root of the node. By convention, all nodes have
a Token as the first element (or root), which indicates the type
of the node. May return null if the node | |
| getRootText | back to summary |
|---|---|
| public String getRootText() Overrides org. Returns the text of the root node. Uses | |
| getStartColumn | back to summary |
|---|---|
| public int getStartColumn() Overrides org. Returns the starting column of the node. Returns -1 if not known. | |
| getStartLine | back to summary |
|---|---|
| public int getStartLine() Overrides org. Returns the starting line of the node. Returns -1 if not known. | |
| getText | back to summary |
|---|---|
| public String getText() Returns the text of the token. Equivalent to
| |
| getType | back to summary |
|---|---|
| public int getType() Overrides org. Returns the actual type of the node. If the node isEmpty(), returns the type of Token.NULL. | |
| newDecimal | back to summary |
|---|---|
| public static Token newDecimal(String text, int startLine, int startColumn) Creates a token that represents a decimal number. | |
| newIdentifier | back to summary |
|---|---|
| public static Token newIdentifier(String text, int startLine, int startColumn) Creates a token that represents an identifier. | |
| newInteger | back to summary |
|---|---|
| public static Token newInteger(String text, int startLine, int startColumn) Creates a token that represents an integer. | |
| newKeyword | back to summary |
|---|---|
| public static Token newKeyword(String text, int startLine, int startColumn) Creates a token that represents a keyword. Returns null if the specified text isn't a keyword. | |
| newPlaceholder | back to summary |
|---|---|
| public static Token newPlaceholder(int type) Creates a token with the specified meaning. | |
| newString | back to summary |
|---|---|
| public static Token newString(String text, int startLine, int startColumn) Creates a token that represents a double-quoted string. | |
| newSymbol | back to summary |
|---|---|
| public static Token newSymbol(int type, int startLine, int startColumn) Creates a token that represents a symbol, using a library for the text. | |
| newSymbol | back to summary |
|---|---|
| public static Token newSymbol(String type, int startLine, int startColumn) Creates a token that represents a symbol, using a library for the type. | |
| setMeaning | back to summary |
|---|---|
| public CSTNode setMeaning(int meaning) Overrides org. Sets the meaning for this node (and its root Token). Not valid if the node isEmpty(). Returns this token, for convenience. | |
| setText | back to summary |
|---|---|
| public void setText(String text) Not advisable, but if you need to adjust the token's text, this will do it. | |
| size | back to summary |
|---|---|
| public int size() Implements abstract org. Returns the number of elements in the node (including root). | |