antlr

Class ImportVocabTokenManager

class ImportVocabTokenManager extends SimpleTokenManager implements Cloneable

Static implementation of the TokenManager, used for importVocab option
Field Summary
protected Grammargrammar
Constructor Summary
ImportVocabTokenManager(Grammar grammar, String filename_, String name_, Tool tool_)
Method Summary
Objectclone()
voiddefine(TokenSymbol ts)
define a token.
voiddefine(String s, int ttype)
define a token.
booleanisReadOnly()
importVocab token manager is read-only if output would be same as input
intnextTokenType()
Get the next unused token type.

Field Detail

grammar

protected Grammar grammar

Constructor Detail

ImportVocabTokenManager

ImportVocabTokenManager(Grammar grammar, String filename_, String name_, Tool tool_)

Method Detail

clone

public Object clone()

define

public void define(TokenSymbol ts)
define a token.

define

public void define(String s, int ttype)
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

nextTokenType

public int nextTokenType()
Get the next unused token type.