Package antlr
Class ImportVocabTokenManager
java.lang.Object
antlr.SimpleTokenManager
antlr.ImportVocabTokenManager
- All Implemented Interfaces:
TokenManager
,Cloneable
Static implementation of the TokenManager, used for importVocab option
-
Field Summary
FieldsFields inherited from class antlr.SimpleTokenManager
antlrTool, maxToken, name, readOnly, vocabulary
-
Constructor Summary
ConstructorsConstructorDescriptionImportVocabTokenManager
(Grammar grammar, String filename_, String name_, Tool tool_) -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
define
(TokenSymbol ts) define a token.void
define a token.boolean
importVocab token manager is read-only if output would be same as inputint
Get the next unused token type.Methods inherited from class antlr.SimpleTokenManager
getName, getTokenStringAt, getTokenSymbol, getTokenSymbolAt, getTokenSymbolElements, getTokenSymbolKeys, getVocabulary, mapToTokenSymbol, maxTokenType, setName, setReadOnly, tokenDefined
-
Field Details
-
grammar
-
-
Constructor Details
-
ImportVocabTokenManager
-
-
Method Details
-
clone
- Specified by:
clone
in interfaceTokenManager
- Overrides:
clone
in classSimpleTokenManager
-
define
define a token.- Specified by:
define
in interfaceTokenManager
- Overrides:
define
in classSimpleTokenManager
-
define
define a token. Intended for use only when reading the importVocab file. -
isReadOnly
public boolean isReadOnly()importVocab token manager is read-only if output would be same as input- Specified by:
isReadOnly
in interfaceTokenManager
- Overrides:
isReadOnly
in classSimpleTokenManager
-
nextTokenType
public int nextTokenType()Get the next unused token type.- Specified by:
nextTokenType
in interfaceTokenManager
- Overrides:
nextTokenType
in classSimpleTokenManager
-