Package: com.arsi.mj.maprpt.lexer.symtab
previous next contents
Package com.arsi.mj.maprpt.lexer.symtab
contains the following classes and interfaces.
Classes and Interfaces |
ISupportsVariableReference |
Defines mechanism for target parse node (or other object) to list variable references,
but not variable declarations (see ISupportsScalarDeclaration and
ISupportsArrayDeclaration instead). |
ISymbolTable |
Defines a simple mechanism for storing and manipulating symbol table entries. |
ISymbolTableEntry |
Marker interface that denotes the implementing class is a symbol table entry. |
ISymbolTableVariable |
Define symbol table entry for a variable or array. |
SymbolTableIdentifier |
Stores canonical identifier (i.e., unique Java identifier) for symbol table variable. |
SymbolTableVariableBase |
Abstract base class for symbol table variable entries. |
VarArrayType |
Qualifies variable identity as array or scalar. |
VariableIdentity |
Represents identity of variable. |
VariableReferenceIdentity |
Represents identity of variable referenced in a Mapper RUN statement. |
VarIdentType |
Defines variable identity as name or number. |
Interface: ISupportsVariableReference
next
package
Defines mechanism for target parse node (or other object) to list variable references,
but not variable declarations (see
ISupportsScalarDeclaration
and
ISupportsArrayDeclaration
instead).
public interface com.arsi.mj.maprpt.lexer.symtab.ISupportsVariableReference
Methods |
Enumerate all variables referenced (not declared) by parse node (or other object).
- Returns:
- list of variable reference information.
public java.util.List referencedVariables()
|
Defines a simple mechanism for storing and manipulating symbol table entries.
public interface com.arsi.mj.maprpt.lexer.symtab.ISymbolTable
Marker interface that denotes the implementing class is a symbol table entry.
public interface com.arsi.mj.maprpt.lexer.symtab.ISymbolTableEntry
Define symbol table entry for a variable or array.
Methods |
Get parse tree nodes that declare or re-define variable.
- Returns:
- parse tree nodes, concrete class expected to be
CommandParseNode .
public java.util.Set declarationParseTreeNodes()
|
Get fundamental, scalar type of variable, may be more than one if
variable redefined or variable contains different type of data from
the declared type. public java.util.Set getDataTypes()
|
Get unique Java identifier of variable, if known at the time (usually requires post
processing of symbol table). public com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier getJavaIdentifier()
|
Get Mapper identity of variable: name or number and scope. public com.arsi.mj.maprpt.lexer.symtab.VariableIdentity getMapperIdentity()
|
Get variable type as it would be specified in a Mapper RUN, may be more
than one if variable redefined or variable contains different type of data
from the declared type. public java.util.Set getVariableTypes()
|
Is this variable an array? public boolean isArray()
|
Get parse tree nodes that reference variable but do not declare or re-define it.
- Returns:
- parse tree nodes, concrete class expected to be
CommandParseNode .
public java.util.Set referenceParseTreeNodes()
|
Stores canonical identifier (i.e., unique Java identifier) for symbol table variable.
public class com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier
extends java.lang.Object
Constructors |
Public ctor for initializing an instance of this class for default, generated identifiers.
- Parameters:
aJavaIdent - Java identifier for variable.
public SymbolTableIdentifier(java.lang.String aJavaIdent)
|
Public ctor for initializing an instance of this class for custom identifiers.
- Parameters:
aJavaIdent - Java identifier for variable.
anIdentSource - specifies the source of the identifier (NULL if default, generated Java identifier).
public SymbolTableIdentifier(java.lang.String aJavaIdent, com.arsi.mj.maprpt.lexer.symtab.SymbolTableIdentifier.IdentifierSource anIdentSource)
|
Abstract base class for symbol table variable entries.
Constructors |
Restricted ctor for initializing an instance of this class.
- Parameters:
aVarIdent - identity of variable: name or number and scope.
anArrayFlag - true if variable is an array, false if scalar.
protected SymbolTableVariableBase(com.arsi.mj.maprpt.lexer.symtab.VariableIdentity aVarIdent, boolean anArrayFlag)
|
Qualifies variable identity as array or scalar.
public final class com.arsi.mj.maprpt.lexer.symtab.VarArrayType
extends java.lang.Enum
Represents identity of variable.
public class com.arsi.mj.maprpt.lexer.symtab.VariableIdentity
extends java.lang.Object
Constructors |
Restricted ctor for initializing an instance of this class.
- Parameters:
anIdentType - identifies variable as named or numbered.
anIdentValue - name (String ) or number (Integer ) of variable.
aScope - scope of variable.
public VariableIdentity(com.arsi.mj.maprpt.lexer.symtab.VarIdentType anIdentType, java.lang.Object anIdentValue, com.arsi.mj.VariableScope aScope)
|
Methods |
public boolean equals(java.lang.Object anObject)
|
public int hashCode()
|
Does variable identity indicate this is an equation function?
- Returns:
- true if variable is actually an equation function, false if RUN variable or internal variable.
public boolean isFunction()
|
Does variable identity indicate this is a variable internal to an equation?
- Returns:
- true if variable is internal to an equation, false if RUN variable or equation function.
public boolean isInternalVariable()
|
Does variable identity indicate this is a RUN variable, and not an internal variable
or function from an equation?
- Returns:
- true if variable is RUN variable, false if internal variable or equation function.
public boolean isRunVariable()
|
Make name for equation functions that can appear as variables such that name distinguishes
function from RUN variables.
- Parameters:
aSimpleFunction - a simple function name.
- Returns:
- name that distinguishes equation functions from RUN variables.
public static java.lang.String makeFunctionName(java.lang.String aSimpleFunction)
|
Make name for variables internal to equations that distinguishes name from RUN variables.
- Parameters:
aSimpleVariable - a simple variable name.
- Returns:
- name that distinguishes internal variables from RUN variables.
public static java.lang.String makeInternalVariableName(java.lang.String aSimpleVariable)
|
Convert variable identity to something that resembles Mapper source string.
- Returns:
- variable identity as something like a Mapper source string.
public java.lang.String toMapperString()
|
Represents identity of variable referenced in a Mapper RUN statement.
Methods |
public boolean equals(java.lang.Object anObject)
|
public int hashCode()
|
Get canonical variable identity for comparing to other identities in symbol table.
- Returns:
- canonical variable identity for comparison and lookup.
public com.arsi.mj.maprpt.lexer.symtab.VariableIdentity variableIdentityForSymbolTable()
|
Defines variable identity as name or number.
public final class com.arsi.mj.maprpt.lexer.symtab.VarIdentType
extends java.lang.Enum