All Packages Class Hierarchy This Package Previous Next Index
Class openjava.main.KeywordTable
java.lang.Object
|
+----java.util.Dictionary
|
+----java.util.Hashtable
|
+----openjava.main.KeywordTable
- public class KeywordTable
- extends Hashtable
The KeywordTable class presents for node of parse tree.
- See Also:
- Hashtable
-
parent
-
-
KeywordTable()
- constructs empty table
-
KeywordTable(KeywordTable)
- constructs empty table with its parent set.
-
isRegistered(Leaf)
- tests if the specified token is a keyword in this hashtable.
-
isRegistered(String)
- tests if the specified token is a keyword in this hashtable.
-
isRegisteredLocal(Leaf)
- tests if the specified token is a keyword in this hashtable.
-
isRegisteredLocal(String)
- tests if the specified token is a keyword in this hashtable.
-
popScope()
- pop out of the scope
-
pushScope()
- push into a scope
-
put(Leaf)
- registers new keyword
-
put(Leaf, int)
- registers new keyword
-
put(String)
- registers new keyword
-
put(String, int)
- registers new keyword
-
resetToDefault()
-
parent
protected KeywordTable parent
KeywordTable
public KeywordTable()
- constructs empty table
KeywordTable
public KeywordTable(KeywordTable parent)
- constructs empty table with its parent set.
- Parameters:
- parent - Parent table. If this is null,
parent table will be default keywords.
isRegistered
public boolean isRegistered(String str)
- tests if the specified token is a keyword in this hashtable.
- Returns:
- true if specified string was registered yet
isRegistered
public boolean isRegistered(Leaf token)
- tests if the specified token is a keyword in this hashtable.
- Returns:
- true if specified token was registered yet
isRegisteredLocal
public boolean isRegisteredLocal(String str)
- tests if the specified token is a keyword in this hashtable.
- Returns:
- true if specified string was registered yet
isRegisteredLocal
public boolean isRegisteredLocal(Leaf token)
- tests if the specified token is a keyword in this hashtable.
- Returns:
- true if specified token was registered yet
put
public void put(String str,
int id)
- registers new keyword
- Parameters:
- str - String to be registered
- id - Number presenting for the kind of token
put
public void put(Leaf token,
int id)
- registers new keyword
- Parameters:
- str - Leaf to be registered
- See Also:
- Leaf
put
public void put(String str)
- registers new keyword
- Parameters:
- str - String to be registered
put
public void put(Leaf token)
- registers new keyword
- Parameters:
- str - String to be registered
pushScope
public KeywordTable pushScope()
- push into a scope
popScope
public KeywordTable popScope()
- pop out of the scope
resetToDefault
protected void resetToDefault()
All Packages Class Hierarchy This Package Previous Next Index