org.opencores.verilogp
Class Dictionary
java.lang.Object
|
+--org.opencores.verilogp.Dictionary
- public class Dictionary
- extends java.lang.Object
has all identifiers listed
|
Field Summary |
protected static int |
ASSIGN
|
protected static int |
ENDMODULE
|
private java.util.Hashtable |
ht
1024 entries initially, should be enough for most applications |
protected static int |
INPUT
|
protected java.lang.String[] |
keywords
all keyword that may occur |
protected static int |
MODULE
|
protected static int |
OUTPUT
|
protected static int |
PRIMITIVES
|
protected static int |
PRIMITIVES_END
|
protected static int |
WIRE
|
|
Constructor Summary |
Dictionary()
constructs new dictionary |
|
Method Summary |
void |
add(java.lang.String name,
java.lang.Object o)
puts name in dictionary and link it with object o |
java.lang.Object |
get(java.lang.String name)
tries to find object based on its name |
int |
getKeyword(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
ht
private java.util.Hashtable ht
- 1024 entries initially, should be enough for most applications
keywords
protected final java.lang.String[] keywords
- all keyword that may occur
MODULE
protected static final int MODULE
ENDMODULE
protected static final int ENDMODULE
WIRE
protected static final int WIRE
INPUT
protected static final int INPUT
OUTPUT
protected static final int OUTPUT
ASSIGN
protected static final int ASSIGN
PRIMITIVES
protected static final int PRIMITIVES
PRIMITIVES_END
protected static final int PRIMITIVES_END
Dictionary
public Dictionary()
- constructs new dictionary
get
public java.lang.Object get(java.lang.String name)
- tries to find object based on its name
- Parameters:
name - object name- Returns:
- Object found, null if no match
add
public void add(java.lang.String name,
java.lang.Object o)
- puts name in dictionary and link it with object o
- Parameters:
name - object nameo - value
getKeyword
public int getKeyword(java.lang.String name)