TokenTagToken

@uml {@link Token} object representing a token of a particular type; e.g., {@code <ID>}. These tokens are created for {@link TagChunk} chunks where the tag corresponds to a lexer rule or token type.

Constructors

this
this(string tokenName, int type)

@uml Constructs a new instance of {@link TokenTagToken} for an unlabeled tag with the specified token name and type.

this
this(string tokenName, int type, string label)

@uml Constructs a new instance of {@link TokenTagToken} with the specified token name, type, and label.

Members

Functions

getLabel
string getLabel()

@uml Gets the label associated with the rule tag.

getText
Variant getText()

@uml <p>The implementation for {@link TokenTagToken} returns the token tag formatted with {@code <} and {@code >} delimiters.</p> @override

getTokenName
string getTokenName()

@uml Gets the token name. @return The token name.

toString
string toString()

@uml <p>The implementation for {@link TokenTagToken} returns a string of the form {@code tokenName:type}.</p> @override

Inherited Members

From CommonToken

EMPTY_SOURCE
TokenFactorySourcePair EMPTY_SOURCE;

An empty {@link Pair} which is used as the default value of {@link #source} for tokens that do not have a source.

type
int type;

This is the backing field for {@link #getType} and {@link #setType}.

line
int line;

This is the backing field for {@link #getLine} and {@link #setLine}.

charPositionInLine
int charPositionInLine;

This is the backing field for {@link #getCharPositionInLine} and {@link #setCharPositionInLine}.

channel
int channel;

This is the backing field for {@link #getChannel} and {@link #setChannel}.

source
TokenFactorySourcePair source;

This is the backing field for {@link #getTokenSource} and {@link #getInputStream}.

text
Variant text;

This is the backing field for {@link #getText} when the token text is explicitly set in the constructor or via {@link #setText}.

index
size_t index;

This is the backing field for {@link #getTokenIndex} and {@link #setTokenIndex}.

startIndex_
size_t startIndex_;

This is the backing field for {@link #getStartIndex} and {@link #setStartIndex}. @uml @read @write

stopIndex_
size_t stopIndex_;

This is the backing field for {@link #getStopIndex} and {@link #setStopIndex}. @uml @read @write

getType
int getType()
Undocumented in source. Be warned that the author may not have intended to support it.
setLine
void setLine(int line)
Undocumented in source. Be warned that the author may not have intended to support it.
getText
Variant getText()

@uml @override

setText
void setText(Variant text)

Explicitly set the text for this token. If {code text} is not {@code null}, then {@link #getText} will return this value rather than extracting the text from the input.

getLine
int getLine()

@uml @override

getCharPositionInLine
int getCharPositionInLine()

@uml @override

setCharPositionInLine
void setCharPositionInLine(int charPositionInLine)
Undocumented in source. Be warned that the author may not have intended to support it.
getChannel
int getChannel()

@uml @override

setChannel
void setChannel(int channel)

@uml @override

setType
void setType(int type)

@uml @override

getTokenIndex
size_t getTokenIndex()

@uml @override

setTokenIndex
void setTokenIndex(size_t index)

@uml @override

getTokenSource
TokenSource getTokenSource()

@uml @override

getInputStream
CharStream getInputStream()

@uml @override

toString
string toString()

@uml @override

startIndex
size_t startIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
startIndex
void startIndex(size_t startIndex)
Undocumented in source. Be warned that the author may not have intended to support it.
stopIndex
size_t stopIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
stopIndex
void stopIndex(size_t stopIndex)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta