Package: com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes
previous next contents
Package com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes
contains the following classes and interfaces.
Classes and Interfaces |
AssignmentEqnod |
Node that represents an explicit variable assignment (e.g., 'myAsgn,E=ABS(v)+1.0')
or implicit variable assignment (e.g., 'ABS(v)+1.0') in a Mapper equation parse tree. |
BinaryOperationEqnod |
Node that represents a binary operation in a Mapper equation parse tree. |
ConcatEqnod |
Node that represents a concatenation of other equation nodes in a Mapper equation parse tree. |
EquationNodeBase |
Base class that provides for common attributes of equation nodes, all
concrete content node implementations derive from this class. |
ExitEqnod |
Node that represents an EXIT: conditional in a Mapper equation parse tree. |
FirstEqnod |
Node that represents an FIRST: conditional in a Mapper equation parse tree. |
FunctionEqnod |
Node that represents a function (e.g., ABS(x)) in a Mapper equation parse tree. |
IEquationNode |
Represents a parse tree node in a parsed equation. |
IfEqnod |
Node that represents an IF: -THEN: -ELSE:
conditional in a Mapper equation parse tree. |
LiteralEqnod |
Node that represents a literal (e.g., 123, -0.001, "hello", 5M) in a Mapper equation parse tree. |
ReservedWordEqnod |
Node that represents a reserved word (e.g., YEAR$) in a Mapper equation parse tree. |
SignedEqnod |
Node that represents a signed expression (e.g., -100.4, +SQRT(100)) in a Mapper equation parse tree. |
SkipEqnod |
Node that represents an SKIP: conditional in a Mapper equation parse tree. |
SubExpressionEqnod |
Node that represents a sub-expression (parenthesized grouping of terms) in a Mapper equation parse tree. |
VariableEqnod |
Node that represents an internal (e.g., a, myVar%) or external variable (e.g.,
<extVar>, v55) in a Mapper equation parse tree. |
Class: AssignmentEqnod
next
package
Node that represents an explicit variable assignment (e.g., 'myAsgn,E=ABS(v)+1.0')
or implicit variable assignment (e.g., 'ABS(v)+1.0') in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aVariable - equation token that identifies variable (and any options) to hold assigned value.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public AssignmentEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.IEquationToken aVarOrFunc, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Public ctor for initializing an instance of this class.
- Parameters:
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public AssignmentEqnod(long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a binary operation in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
anOperator - equation token that represents a binary operation.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public BinaryOperationEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.IOperatorEqtok anOperator, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a concatenation of other equation nodes in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aNode - initial equation node to add to list of nodes to concatenate.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public ConcatEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aNode, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Base class that provides for common attributes of equation nodes, all
concrete content node implementations derive from this class.
Treat this class as essentially "thread-safe", since it's state is intended to
be immutable once created.
public class com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.EquationNodeBase
extends java.lang.Object
Constructors |
Restricted ctor for initializing an instance of this class.
- Parameters:
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
protected EquationNodeBase(long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents an
EXIT:
conditional in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aConditionNode - boolean or relational node that contains condition to evaluate for exit. If true,
remaining equation nodes are ignored and tuple processing loop is terminated.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public ExitEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aConditionNode, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents an
FIRST:
conditional in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
anExprNode - expression node to evaluate once on initial execution of equations.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public FirstEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode anExprNode, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a function (e.g., ABS(x)) in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aFunction - equation token that represents function.
someArguments - arguments to function (if any) as equation nodes.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public FunctionEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.FunctionEqtok aFunction, java.util.List someArguments, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Represents a parse tree node in a parsed equation.
public interface com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode
Methods |
Get identifier that organizes code on the same Mapper line into "code blocks"
so equation constructs like SKIP: and FIRST: can be
handled properly.
- Returns:
- identifies the code block this equation node belongs to, if any (can be NULL).
public java.lang.Integer getCodeBlockId()
|
Enumerate all external (i.e., RUN) variables referenced by equation parse tree node.
- Returns:
- list of external variable reference information.
public java.util.List getExternalVariableReferences()
|
Get at-sign line from which equation token was parsed.
- Returns:
- at-sign line from which equation token was parsed.
public com.arsi.mj.maprpt.parser.line.types.AtLine getHostLine()
|
Get ordinal that allows for relative ordering of nodes according to the
sequence in which original equation tokens were parsed.
- Returns:
- ordinal that is higher than nodes whose input tokens preceded this node's
input tokens, and lower than nodes whose tokens occurred after this node's
tokens in the input.
public long getOrdinal()
|
Get RUN command parse tree node associated with this parsed equation node.
- Returns:
- command parse tree node (e.g., instance of
ArtParseNode or DcParseNode ).
public com.arsi.mj.maprpt.lexer.ptree.CommandParseNode getParseTreeNode()
|
Get index of first character of token in at-sign line (not counting first
character in at-sign line).
- Returns:
- index of first character of token in at-sign line (not counting
first character in at-sign line).
public int getTokenIndex()
|
Get variable-type-vote for result of equation parse tree node.
- Parameters:
aVarTypeVoteIdent - identifies variable whose type is being voted upon, or NULL if caller is not
examining a parse tree of equations to find the type of a final result variable.
- Returns:
- variable-type-vote for result of evaluating equation node, as can best be determined
at compile time. Can be empty list if abstained from voting, or can contain more than
one vote if multiple results possible (e.g., conditional that returns more than one result).
public java.util.List getVariableTypeVoteForResult(com.arsi.mj.maprpt.lexer.symtab.vartype.VarTypeVoteBase.VarTypeVoteIdentity aVarTypeVoteIdent)
|
Get variable-type-vote for all external (i.e., RUN) variables referenced by equation parse tree node.
- Returns:
- list of external variable type votes.
public java.util.List getVotesForExternalVariableTypes()
|
Set RUN command parse tree node associated with this parsed equation node.
- Parameters:
aCmdNode - command parse tree node associated with this equation node.
public void setParseTreeNode(com.arsi.mj.maprpt.lexer.ptree.CommandParseNode aCmdNode)
|
Node that represents an
IF:
-
THEN:
-
ELSE:
conditional in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Fields |
Boolean or relational node that contains condition to evaluate for branching. public final com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode conditionNode
|
Zero or more assignment or simple expression nodes to apply when condition is false. public final java.util.List elseNodes
|
At least one assignment or simple expression node to apply when condition is true. public final java.util.List thenNodes
|
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aConditionNode - boolean or relational node that contains condition to evaluate for branching.
someThenNodes - one or more assignment or simple expression nodes to apply when condition is true.
someElseNodes - zero or more assignment or simple expression nodes to apply when condition is false.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public IfEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aConditionNode, java.util.List someThenNodes, java.util.List someElseNodes, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a literal (e.g., 123, -0.001, "hello", 5M) in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aLiteral - equation token that represents integer, float, string or calendar literal.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public LiteralEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.ILiteralEqtok aLiteral, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a reserved word (e.g., YEAR$) in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aReserved - equation token that represents reserved word.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public ReservedWordEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.ReservedWordEqtok aReserved, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a signed expression (e.g., -100.4, +SQRT(100)) in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
anExpr - parse tree of equation nodes that comprise sub-expression.
aNegativeFlag - indicates if the expression is negative (true) or positive (false).
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public SignedEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode anExpr, boolean aNegativeFlag, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents an
SKIP:
conditional in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aConditionNode - boolean or relational node that contains condition to evaluate for skipping. If true,
any nodes with the same code block identifier and ordinal higher than this node's
ordinal should be skipped.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public SkipEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aConditionNode, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents a sub-expression (parenthesized grouping of terms) in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aSubExpr - parse tree of equation nodes that comprise sub-expression.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public SubExpressionEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.nodes.IEquationNode aSubExpr, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|
Node that represents an internal (e.g., a, myVar%) or external variable (e.g.,
<extVar>, v55) in a Mapper equation parse tree.
Treat this class as "thread-safe", since it immutable once created.
Constructors |
Public ctor for initializing an instance of this class.
- Parameters:
aVariable - equation token that represents internal or external variable.
anOrdinal - ordinal that allows for relative ordering of nodes according to original token input sequence.
aLine - at-sign line from which equation token was parsed.
aTokenIndex - index of first character of token in at-sign line (not counting first character in at-sign line).
aCodeBlockId - id of code block this node belongs to (may be null to signify code block is not important).
public VariableEqnod(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.IVariableEqtok aVariable, long anOrdinal, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex, java.lang.Integer aCodeBlockId)
|