antlr
class SimpleTokenManager extends Object implements TokenManager, Cloneable
| Field Summary | |
|---|---|
| protected Tool | antlrTool |
| protected int | maxToken |
| protected String | name |
| protected boolean | readOnly |
| protected Vector | vocabulary |
| Constructor Summary | |
|---|---|
| SimpleTokenManager(String name_, Tool tool_) | |
| Method Summary | |
|---|---|
| Object | clone() |
| void | define(TokenSymbol ts) define a token |
| String | getName() Simple token manager doesn't have a name -- must be set externally |
| String | getTokenStringAt(int idx) Get a token symbol by index |
| TokenSymbol | getTokenSymbol(String sym) Get the TokenSymbol for a string |
| TokenSymbol | getTokenSymbolAt(int idx) Get a token symbol by index |
| Enumeration | getTokenSymbolElements() Get an enumerator over the symbol table |
| Enumeration | getTokenSymbolKeys() |
| Vector | getVocabulary() Get the token vocabulary (read-only). |
| boolean | isReadOnly() Simple token manager is not read-only |
| void | mapToTokenSymbol(String name, TokenSymbol sym) Map a label or string to an existing token symbol |
| int | maxTokenType() Get the highest token type in use |
| int | nextTokenType() Get the next unused token type |
| void | setName(String name_) Set the name of the token manager |
| void | setReadOnly(boolean ro) |
| boolean | tokenDefined(String symbol) Is a token symbol defined? |
Returns: A Vector of TokenSymbol