RuleTagToken

@uml A {@link Token} object representing an entire subtree matched by a parser rule; e.g., {@code <expr>}. These tokens are created for {@link TagChunk} chunks where the tag corresponds to a parser rule.

Constructors

this
this(string ruleName, int bypassTokenType)

@uml Constructs a new instance of {@link RuleTagToken} with the specified rule name and bypass token type and no label.

this
this(string ruleName, int bypassTokenType, string label)

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

Members

Functions

getChannel
int getChannel()

@uml @override <p>Rule tag tokens are always placed on the {@link #DEFAULT_CHANNEL}.</p>

getCharPositionInLine
int getCharPositionInLine()

@uml @override

getInputStream
CharStream getInputStream()

@uml @override

getLabel
string getLabel()

@uml Gets the label associated with the rule tag.

getLine
int getLine()

@uml @override

getRuleName
string getRuleName()

@uml Gets the name of the rule associated with this rule tag.

getText
Variant getText()

@uml @override <p>This method returns the rule tag formatted with {@code <} and {@code >} delimiters.</p>

getTokenIndex
int getTokenIndex()

@uml @override

getTokenSource
TokenSource getTokenSource()

@uml @override

getType
int getType()

@uml @override <p>Rule tag tokens have types assigned according to the rule bypass transitions created during ATN deserialization.</p>

startIndex
int startIndex()

@uml @override

stopIndex
int stopIndex()

@uml @override

toString
string toString()

@uml @override

Inherited Members

From Token

getText
Variant getText()

Get the text of the token.

getType
int getType()

Get the token type of the token

getLine
int getLine()

The line number on which the 1st character of this token was matched, line=1..n

getCharPositionInLine
int getCharPositionInLine()

The index of the first character of this token relative to the beginning of the line at which it occurs, 0..n-1

getChannel
int getChannel()

Return the channel this token. Each token can arrive at the parser on a different channel, but the parser only "tunes" to a single channel. The parser ignores everything not on DEFAULT_CHANNEL.

getTokenIndex
int getTokenIndex()

An index from 0..n-1 of the token object in the input stream. This must be valid in order to print token streams and use TokenRewriteStream.

startIndex
int startIndex()
Undocumented in source.
stopIndex
int stopIndex()
Undocumented in source.
getTokenSource
TokenSource getTokenSource()

Gets the {@link TokenSource} which created this token.

getInputStream
CharStream getInputStream()

Gets the {@link CharStream} from which this token was derived.

Meta