Public Member Functions | |
| Object | clone () |
| void | define (TokenSymbol ts) |
| String | getName () |
| String | getTokenStringAt (int idx) |
| TokenSymbol | getTokenSymbol (String sym) |
| TokenSymbol | getTokenSymbolAt (int idx) |
| Enumeration | getTokenSymbolElements () |
| Enumeration | getTokenSymbolKeys () |
| Vector | getVocabulary () |
| boolean | isReadOnly () |
| void | mapToTokenSymbol (String name, TokenSymbol sym) |
| int | maxTokenType () |
| int | nextTokenType () |
| void | setName (String name_) |
| void | setReadOnly (boolean ro) |
| boolean | tokenDefined (String symbol) |
Protected Attributes | |
| int | maxToken = Token.MIN_USER_TYPE |
| Vector | vocabulary |
| Tool | antlrTool |
| String | name |
| boolean | readOnly = false |
Package Functions | |
| SimpleTokenManager (String name_, Tool tool_) | |
| antlr.SimpleTokenManager.SimpleTokenManager | ( | String | name_, | |
| Tool | tool_ | |||
| ) | [package] |
| Object antlr.SimpleTokenManager.clone | ( | ) |
Implements antlr.TokenManager.
Reimplemented in antlr.ImportVocabTokenManager.
References antlr.SimpleTokenManager.antlrTool, antlr.collections.impl.Vector.clone(), antlr.SimpleTokenManager.clone(), antlr.SimpleTokenManager.maxToken, antlr.SimpleTokenManager.name, antlr.Tool.panic(), and antlr.SimpleTokenManager.vocabulary.
Referenced by antlr.SimpleTokenManager.clone().
| void antlr.SimpleTokenManager.define | ( | TokenSymbol | ts | ) |
define a token
Implements antlr.TokenManager.
Reimplemented in antlr.ImportVocabTokenManager.
References antlr.collections.impl.Vector.ensureCapacity(), antlr.GrammarSymbol.getId(), antlr.TokenSymbol.getTokenType(), antlr.SimpleTokenManager.mapToTokenSymbol(), antlr.collections.impl.Vector.setElementAt(), and antlr.SimpleTokenManager.vocabulary.
Referenced by antlr.SimpleTokenManager.SimpleTokenManager().
| String antlr.SimpleTokenManager.getName | ( | ) |
Simple token manager doesn't have a name -- must be set externally
Implements antlr.TokenManager.
References antlr.SimpleTokenManager.name.
| String antlr.SimpleTokenManager.getTokenStringAt | ( | int | idx | ) |
Get a token symbol by index
Implements antlr.TokenManager.
References antlr.collections.impl.Vector.elementAt(), and antlr.SimpleTokenManager.vocabulary.
Referenced by antlr.SimpleTokenManager.getTokenSymbolAt().
| TokenSymbol antlr.SimpleTokenManager.getTokenSymbol | ( | String | sym | ) |
Get the TokenSymbol for a string
Implements antlr.TokenManager.
Referenced by antlr.SimpleTokenManager.getTokenSymbolAt().
| TokenSymbol antlr.SimpleTokenManager.getTokenSymbolAt | ( | int | idx | ) |
Get a token symbol by index
Implements antlr.TokenManager.
References antlr.SimpleTokenManager.getTokenStringAt(), and antlr.SimpleTokenManager.getTokenSymbol().
| Enumeration antlr.SimpleTokenManager.getTokenSymbolElements | ( | ) |
Get an enumerator over the symbol table
Implements antlr.TokenManager.
| Enumeration antlr.SimpleTokenManager.getTokenSymbolKeys | ( | ) |
Implements antlr.TokenManager.
| Vector antlr.SimpleTokenManager.getVocabulary | ( | ) |
Get the token vocabulary (read-only).
Implements antlr.TokenManager.
References antlr.SimpleTokenManager.vocabulary.
| boolean antlr.SimpleTokenManager.isReadOnly | ( | ) |
Simple token manager is not read-only
Implements antlr.TokenManager.
Reimplemented in antlr.ImportVocabTokenManager.
| void antlr.SimpleTokenManager.mapToTokenSymbol | ( | String | name, | |
| TokenSymbol | sym | |||
| ) |
Map a label or string to an existing token symbol
Implements antlr.TokenManager.
Referenced by antlr.SimpleTokenManager.define().
| int antlr.SimpleTokenManager.maxTokenType | ( | ) |
Get the highest token type in use
Implements antlr.TokenManager.
References antlr.SimpleTokenManager.maxToken.
| int antlr.SimpleTokenManager.nextTokenType | ( | ) |
Get the next unused token type
Implements antlr.TokenManager.
Reimplemented in antlr.ImportVocabTokenManager.
References antlr.SimpleTokenManager.maxToken.
| void antlr.SimpleTokenManager.setName | ( | String | name_ | ) |
Set the name of the token manager
Implements antlr.TokenManager.
References antlr.SimpleTokenManager.name.
| void antlr.SimpleTokenManager.setReadOnly | ( | boolean | ro | ) |
Implements antlr.TokenManager.
References antlr.SimpleTokenManager.readOnly.
Referenced by antlr.DefineGrammarSymbols.endOptions(), and antlr.ImportVocabTokenManager.ImportVocabTokenManager().
| boolean antlr.SimpleTokenManager.tokenDefined | ( | String | symbol | ) |
Is a token symbol defined?
Implements antlr.TokenManager.
Tool antlr.SimpleTokenManager.antlrTool [protected] |
int antlr.SimpleTokenManager.maxToken = Token.MIN_USER_TYPE [protected] |
String antlr.SimpleTokenManager.name [protected] |
boolean antlr.SimpleTokenManager.readOnly = false [protected] |
Referenced by antlr.ImportVocabTokenManager.isReadOnly(), and antlr.SimpleTokenManager.setReadOnly().
Vector antlr.SimpleTokenManager.vocabulary [protected] |
1.7.0