Recognizer#getVocabulary()
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The display name of the token type, for use in error reporting or other user-visible messages which reference specific token types.The token type. tokenType)Gets the display name of a token type. |
| public String | Returns: The string literal associated with the specified token type, ornull if no string literal is associated with the type.The token type. tokenType)Gets the string literal associated with a token type. |
| public int | |
| public String | Returns: The symbolic name associated with the specified token type, ornull if no symbolic name is associated with the type.The token type. tokenType)Gets the symbolic name associated with a token type. |
| getDisplayName | back to summary |
|---|---|
| public String getDisplayName(int tokenType) Gets the display name of a token type. ANTLR provides a default implementation of this method, but
applications are free to override the behavior in any manner which makes
sense for the application. The default implementation returns the first
result from the following list which produces a non-
| |
| getLiteralName | back to summary | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| public String getLiteralName(int tokenType) Gets the string literal associated with a token type. The string returned
by this method, when not The following table shows examples of lexer rules and the literal names assigned to the corresponding token types.
| |||||||||||||
| getMaxTokenType | back to summary |
|---|---|
| public int getMaxTokenType() Returns the highest token type value. It can be used to iterate from zero to that number, inclusively, thus querying all stored entries.
| |
| getSymbolicName | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| public String getSymbolicName(int tokenType) Gets the symbolic name associated with a token type. The string returned
by this method, when not This method supports token types defined by any of the following methods:
The following table shows examples of lexer rules and the literal names assigned to the corresponding token types.
| |||||||||