TagChunk

@uml Represents a placeholder tag in a tree pattern. A tag can have any of the following forms.

<ul> <li>{@code expr}: An unlabeled placeholder for a parser rule {@code expr}.</li> <li>{@code ID}: An unlabeled placeholder for a token of type {@code ID}.</li> <li>{@code e:expr}: A labeled placeholder for a parser rule {@code expr}.</li> <li>{@code id:ID}: A labeled placeholder for a token of type {@code ID}.</li> </ul>

This class does not perform any validation on the tag or label names aside from ensuring that the tag is a non-null, non-empty string.

Constructors

this
this(string tag)

@uml Construct a new instance of {@link TagChunk} using the specified tag and no label. * @param tag The tag, which should be the name of a parser rule or token type.

this
this(string label, string tag)

@uml Construct a new instance of {@link TagChunk} using the specified label and tag.

Members

Functions

getLabel
string getLabel()

@uml et the label, if any, assigned to this chunk.

getTag
string getTag()

@uml Get the tag for this chunk.

toString
string toString()

@uml This method returns a text representation of the tag chunk. Labeled tags are returned in the form {@code label:tag}, and unlabeled tags are returned as just the tag name. @override

Meta