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
string 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
string text;

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

index
int index;

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

start
int start;

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

stop
int stop;

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

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
string getText()

@uml @override

setText
void setText(string text)

@uml @override 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

getStartIndex
int getStartIndex()

@uml @override

setStartIndex
void setStartIndex(int start)
Undocumented in source. Be warned that the author may not have intended to support it.
getStopIndex
int getStopIndex()

@uml @override

setStopIndex
void setStopIndex(int stop)
Undocumented in source. Be warned that the author may not have intended to support it.
getTokenIndex
int getTokenIndex()

@uml @override

setTokenIndex
void setTokenIndex(int index)

@uml @override

getTokenSource
TokenSource getTokenSource()

@uml @override

getInputStream
CharStream getInputStream()

@uml @override

toString
string toString()

@uml @override

Meta