Vocabulary.getSymbolicName

@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.

<p>This method supports token types defined by any of the following methods:</p>

<ul> <li>Tokens created by lexer rules.</li> <li>Tokens defined in a <code>tokens{}</code> block in a lexer or parser grammar.</li> <li>The implicitly defined {@code EOF} token, which has the token type {@link Token#EOF}.</li> </ul> * <p>The following table shows examples of lexer rules and the literal names assigned to the corresponding token types.</p>

<table> <tr> <th>Rule</th> <th>Symbolic Name</th> </tr> <tr> <td>{@code THIS : 'this';}</td> <td>{@code THIS}</td> </tr> <tr> <td>{@code SQUOTE : '\'';}</td> <td>{@code SQUOTE}</td> </tr> <tr> <td>{@code ID : [A-Z]+;}</td> <td>{@code ID}</td> </tr> </table>

@param tokenType The token type.

@return The symbolic name associated with the specified token type, or {@code null} if no symbolic name is associated with the type.

interface Vocabulary
string
getSymbolicName
()

Meta