VocabularyImpl

This class provides a default implementation of the {@link Vocabulary} interface.

Constructors

this
this(string[] literalNames, string[] symbolicNames)

Constructs a new instance of {@link VocabularyImpl} from the specified literal and symbolic token names.

this
this(string[] literalNames, string[] symbolicNames, string[] displayNames)

Constructs a new instance of {@link VocabularyImpl} from the specified literal, symbolic, and display token names.

Members

Functions

getDisplayName
string getDisplayName(int tokenType)
Undocumented in source. Be warned that the author may not have intended to support it.
getLiteralName
string getLiteralName(int tokenType)
Undocumented in source. Be warned that the author may not have intended to support it.
getMaxTokenType
int getMaxTokenType()
Undocumented in source. Be warned that the author may not have intended to support it.
getSymbolicName
string getSymbolicName(int tokenType)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

fromTokenNames
Vocabulary fromTokenNames(string[] tokenNames)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

EMPTY_NAMES
string[] EMPTY_NAMES;
Undocumented in source.
displayNames
string[] displayNames;
Undocumented in source.
literalNames
string[] literalNames;
Undocumented in source.
symbolicNames
string[] symbolicNames;
Undocumented in source.

Inherited Members

From Vocabulary

getMaxTokenType
int getMaxTokenType()

@uml Returns the highest token type value. It can be used to iterate from zero to that number, inclusively, thus querying all stored entries. @return the highest token type value

getLiteralName
string getLiteralName(int tokenType)

@uml Gets the string literal associated with a token type. The string returned by this method, when not {@code null}, can be used unaltered in a parser grammar to represent this token type.

getSymbolicName
string getSymbolicName(int tokenType)

@uml Gets the symbolic name associated with a token type. The string returned by this method, when not {@code null}, can be used unaltered in a parser grammar to represent this token type.

getDisplayName
string getDisplayName(int tokenType)

@uml Gets the display name of a token type.

Meta