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()voiddefine(TokenSymbol ts) define a token.voiddefine a token.booleanimportVocab token manager is read-only if output would be same as inputintGet 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:
clonein interfaceTokenManager- Overrides:
clonein classSimpleTokenManager
-
define
define a token.- Specified by:
definein interfaceTokenManager- Overrides:
definein 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:
isReadOnlyin interfaceTokenManager- Overrides:
isReadOnlyin classSimpleTokenManager
-
nextTokenType
public int nextTokenType()Get the next unused token type.- Specified by:
nextTokenTypein interfaceTokenManager- Overrides:
nextTokenTypein classSimpleTokenManager
-