public class Tables
extends java.lang.Object
| Constructor and Description |
|---|
Tables() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
This clears all definitions from all (symbol and type) tables.
|
ClassType |
declareClass(java.lang.String name,
java.util.AbstractList members,
java.util.AbstractList types,
java.util.AbstractList fieldInits,
java.util.AbstractList typeParameters) |
void |
defineBuiltIn(java.lang.String name,
Type[] domains,
Type range,
Instruction builtin) |
void |
defineBuiltIn(java.lang.String name,
Type type,
Instruction builtin) |
void |
defineBuiltIn(java.lang.String name,
Type domain,
Type range,
Instruction builtin) |
void |
defineBuiltIn(java.lang.String name,
Type domain1,
Type domain2,
Type range,
Instruction builtin) |
void |
defineBuiltIn(java.lang.String name,
Type domain1,
Type domain2,
Type domain3,
Type range,
Instruction builtin) |
void |
defineBuiltIn(Symbol symbol,
Type[] domains,
Type range,
Instruction builtin) |
void |
defineBuiltIn(Symbol symbol,
Type type,
Instruction builtin) |
void |
defineBuiltIn(Symbol symbol,
Type domain,
Type range,
Instruction builtin) |
void |
defineBuiltIn(Symbol symbol,
Type domain1,
Type domain2,
Type range,
Instruction builtin) |
void |
defineBuiltIn(Symbol symbol,
Type domain1,
Type domain2,
Type domain3,
Type range,
Instruction builtin) |
TypeDefinition |
defineBuiltinNewType(java.lang.String name,
Type definition)
Registers a builtin new opaque type definition for the specified name with the given type.
|
TypeDefinition |
defineBuiltinNewType(java.lang.String name,
Type definition,
java.util.AbstractList parameters)
Registers a builtin new opaque type definition for the specified name with the given type
and parameters.
|
TypeDefinition |
defineBuiltinTypeAlias(java.lang.String name,
Type definition)
Registers a builtin type alias definition for the specified name with the given type.
|
TypeDefinition |
defineBuiltinTypeAlias(java.lang.String name,
Type definition,
java.util.AbstractList parameters)
Registers a builtin type alias definition for the specified name with the given type and parameters.
|
Symbol |
defineEqualitySymbol(java.lang.String equality) |
TypeDefinition |
defineNewType(java.lang.String name,
Type definition)
Registers a new (opaque) type definition for the specified name with the given type.
|
TypeDefinition |
defineNewType(java.lang.String name,
Type definition,
java.util.AbstractList parameters)
Registers a new (opaque) type definition for the specified name with the given type and the
list of type parameters.
|
TypeDefinition |
defineTypeAlias(java.lang.String name,
Type definition)
Registers a type alias definition for the specified name with the given type.
|
TypeDefinition |
defineTypeAlias(java.lang.String name,
Type definition,
java.util.AbstractList parameters)
Registers a type alias definition for the specified name with the given type and the
list of type parameters.
|
Global |
equality() |
Symbol |
equalitySymbol() |
Type |
getDefinedType(java.lang.String name)
Returns the already defined type with the specified name from the type table.
|
Type |
getType(java.lang.String name)
Returns the type defined with the specified name in the type table; or,
if no type is defined with this name, a new registered undeclared class type
with this name.
|
Type |
getType(java.lang.String name,
java.util.AbstractList types)
Returns the type defined with the specified name in the type table
instantiated with the given types.
|
Global |
in() |
boolean |
isDefined(java.lang.String name)
Returns true iff the specified name is that of a defined symbol.
|
boolean |
isDefinedScalar(java.lang.String name)
Returns true iff the specified name is that of a defined symbol
with at least one non-functional type.
|
boolean |
isEquality(java.lang.String name) |
void |
reset()
This resets the (symbol and type) tables, erasing all definitions except
for the built-ins.
|
void |
setInSymbol(java.lang.String symbol) |
void |
showDefined()
This lists all the defined symbol in the (random) order of the symbol table's iterator.
|
void |
showOrderedSymbols()
This lists all the defined symbol in the order in which they have been defined.
|
void |
showSortedSymbols()
This lists all the defined symbol in lexicographic order.
|
void |
showSymbols() |
void |
showTypes()
Shows the declared classes.
|
Symbol |
symbol(java.lang.String name) |
Symbol |
symbol(java.lang.String name,
boolean flag) |
public final boolean isEquality(java.lang.String name)
throws UndefinedEqualityException
UndefinedEqualityExceptionpublic final Symbol defineEqualitySymbol(java.lang.String equality)
public final Symbol equalitySymbol() throws UndefinedEqualityException
UndefinedEqualityExceptionpublic final Global equality() throws UndefinedEqualityException
UndefinedEqualityExceptionpublic final Global in()
public final void setInSymbol(java.lang.String symbol)
public final void clear()
public final void reset()
public final Symbol symbol(java.lang.String name)
public final Symbol symbol(java.lang.String name, boolean flag)
public final boolean isDefined(java.lang.String name)
public final boolean isDefinedScalar(java.lang.String name)
public final void showSymbols()
public final void showSortedSymbols()
public final void showOrderedSymbols()
public final void showDefined()
public final ClassType declareClass(java.lang.String name, java.util.AbstractList members, java.util.AbstractList types, java.util.AbstractList fieldInits, java.util.AbstractList typeParameters) throws ClassDeclarationException
ClassDeclarationExceptionpublic final TypeDefinition defineTypeAlias(java.lang.String name, Type definition) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineTypeAlias(java.lang.String name, Type definition, java.util.AbstractList parameters) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineBuiltinTypeAlias(java.lang.String name, Type definition) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineBuiltinTypeAlias(java.lang.String name, Type definition, java.util.AbstractList parameters) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineNewType(java.lang.String name, Type definition) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineNewType(java.lang.String name, Type definition, java.util.AbstractList parameters) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineBuiltinNewType(java.lang.String name, Type definition) throws TypeDefinitionException
TypeDefinitionExceptionpublic final TypeDefinition defineBuiltinNewType(java.lang.String name, Type definition, java.util.AbstractList parameters) throws TypeDefinitionException
TypeDefinitionExceptionpublic final Type getDefinedType(java.lang.String name)
public final Type getType(java.lang.String name)
public final Type getType(java.lang.String name, java.util.AbstractList types) throws StaticSemanticsErrorException
StaticSemanticsErrorExceptionpublic final void showTypes()
public final void defineBuiltIn(Symbol symbol, Type type, Instruction builtin) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(java.lang.String name,
Type type,
Instruction builtin)
throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(Symbol symbol, Type domain, Type range, Instruction builtin) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(java.lang.String name,
Type domain,
Type range,
Instruction builtin)
throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(Symbol symbol, Type domain1, Type domain2, Type range, Instruction builtin) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(java.lang.String name,
Type domain1,
Type domain2,
Type range,
Instruction builtin)
throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(Symbol symbol, Type domain1, Type domain2, Type domain3, Type range, Instruction builtin) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(java.lang.String name,
Type domain1,
Type domain2,
Type domain3,
Type range,
Instruction builtin)
throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(Symbol symbol, Type[] domains, Type range, Instruction builtin) throws DuplicateCodeEntryException
DuplicateCodeEntryExceptionpublic final void defineBuiltIn(java.lang.String name,
Type[] domains,
Type range,
Instruction builtin)
throws DuplicateCodeEntryException
DuplicateCodeEntryException