Package antlr

Interface TokenManager

All Known Implementing Classes:
ImportVocabTokenManager, SimpleTokenManager

interface TokenManager
Interface that describes the set of defined tokens
  • Method Details

    • clone

      Object clone()
    • define

      void define(TokenSymbol ts)
      define a token symbol
    • getName

      String getName()
      Get the name of the token manager
    • getTokenStringAt

      String getTokenStringAt(int idx)
      Get a token string by index
    • getTokenSymbol

      TokenSymbol getTokenSymbol(String sym)
      Get the TokenSymbol for a string
    • getTokenSymbolAt

      TokenSymbol getTokenSymbolAt(int idx)
    • getTokenSymbolElements

      Enumeration getTokenSymbolElements()
      Get an enumerator over the symbol table
    • getTokenSymbolKeys

      Enumeration getTokenSymbolKeys()
    • getVocabulary

      Vector getVocabulary()
      Get the token vocabulary (read-only).
      Returns:
      A Vector of Strings indexed by token type
    • isReadOnly

      boolean isReadOnly()
      Is this token manager read-only?
    • mapToTokenSymbol

      void mapToTokenSymbol(String name, TokenSymbol sym)
    • maxTokenType

      int maxTokenType()
      Get the highest token type in use
    • nextTokenType

      int nextTokenType()
      Get the next unused token type
    • setName

      void setName(String n)
    • setReadOnly

      void setReadOnly(boolean ro)
    • tokenDefined

      boolean tokenDefined(String symbol)
      Is a token symbol defined?