Class SymbolTable

java.lang.Object
com.googlecode.aviator.lexer.SymbolTable
All Implemented Interfaces:
Serializable

public class SymbolTable extends Object implements Serializable
Symbol table
See Also:
  • Field Details

  • Constructor Details

    • SymbolTable

      public SymbolTable()
  • Method Details

    • reserveKeyword

      private static void reserveKeyword(Variable v)
    • isReservedKeyword

      public static boolean isReservedKeyword(String name)
    • isReservedKeyword

      public static boolean isReservedKeyword(Variable v)
    • isReserved

      public boolean isReserved(String name)
      Check variable has been reserved?
      Parameters:
      name -
      Returns:
    • tryReserveKeyword

      public static Variable tryReserveKeyword(Variable var)
      Try to reserve key word, return the reserved variable if success, otherwise return itself.
      Parameters:
      var -
      Returns:
    • getVariable

      public Variable getVariable(String name)
      Get variable by name
      Parameters:
      name -
      Returns:
    • reserve

      public Variable reserve(String lexeme)
    • reserve

      public Token<?> reserve(Variable variable)