public class Symbol
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static Symbol |
COLLECTION
This is a dummy symbol that is given the types allowed for collections.
|
static Symbol |
INDEX_SET
This is a dummy symbol that is given the types allowed for array index sets.
|
static Symbol |
INDEXABLE
This is a dummy symbol that is given the types allowed for map index sets.
|
| Constructor and Description |
|---|
Symbol(java.lang.String name) |
Symbol(java.lang.String name,
int index) |
| Modifier and Type | Method and Description |
|---|---|
void |
defineBuiltIn(Type type,
Instruction builtIn)
Installs this symbol as a built-in with specified type and instruction.
|
boolean |
equals(java.lang.Object other) |
CodeEntry |
getCodeEntry(Type type)
|
CodeEntry |
getCodeEntry(Type type,
boolean noDuplicates)
|
int |
index() |
boolean |
isDefined() |
boolean |
isDefined(Type type) |
java.lang.String |
name() |
DefinedEntry |
registerCodeEntry(Type type)
This method registers a definitively checked type of this global symbol.
|
void |
removeLatestEntry()
Removes the latest code entry in this symbol's type table.
|
Symbol |
setNoCurrying(boolean flag) |
void |
showCodeEntries() |
void |
showDefinedEntries() |
java.lang.String |
toString() |
ArrayList |
typeTable() |
public static final Symbol INDEX_SET
public static final Symbol INDEXABLE
public Symbol(java.lang.String name)
public Symbol(java.lang.String name,
int index)
public final java.lang.String name()
public final int index()
public final ArrayList typeTable()
public final Symbol setNoCurrying(boolean flag)
public final DefinedEntry registerCodeEntry(Type type) throws DefinitionException
DefinitionExceptionpublic final CodeEntry getCodeEntry(Type type, boolean noDuplicates) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void removeLatestEntry()
public final void defineBuiltIn(Type type, Instruction builtIn) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final boolean isDefined()
public final boolean isDefined(Type type)
public final boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic final void showDefinedEntries()
public final void showCodeEntries()
public final java.lang.String toString()
toString in class java.lang.Object