Package: com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens
previous next contents
Package com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens
contains the following classes and interfaces.
Classes and Interfaces 
BooleanOperatorEqtok 
Represents a boolean operator such as AND or OR encountered while parsing an equation. 
CalendarLiteralEqtok 
Represents an "calendar" literal such as 30d or 6M
encountered while parsing an equation. 
ConditionalDirectiveEqtok 
Represents a conditional directive such as IF and SKIP . 
ElseDirectiveEqtok 
Represents ELSE directive encountered while parsing an equation. 
EquationTokenBase 
Base class that provides for common attributes of equation tokens, all "true"
concrete content token implementations derive from this class. 
ExecutableDirectiveEqtok 
Represents an executable directive such as THEN ,
ELSE and FIRST . 
ExitDirectiveEqtok 
Represents EXIT directive encountered while parsing an equation. 
ExternalVariableEqtok 
Represents a Mapper named or numbered variable, array or string bounds reference
encountered while parsing an equation. 
FirstDirectiveEqtok 
Represents FIRST directive encountered while parsing an equation. 
FloatLiteralEqtok 
Represents an floating point literal (e.g., 1776, +1, 05) encountered while parsing an equation. 
FunctionEqtok 
Represents a function such as ABS or PI
encountered while parsing an equation. 
GroupBeginEqtok 
Represents the beginning of a group of terms (i.e., left parenthesis)
encountered while parsing an equation. 
GroupEndEqtok 
Represents the end of a group of terms (i.e., right parenthesis) encountered
while parsing an equation. 
IDirectiveEqtok 
Marker interface for a directive such as IF , THEN , SKIP ,
FIRST , etc. encountered when parsing an equation. 
IEquationToken 
Represents a token parsed from a CAL or DC
equation, or a CHG calculation expression. 
IfDirectiveEqtok 
Represents IF directive encountered while parsing an equation. 
ILiteralEqtok 
Marker interface for a numeric or string literal encountered while parsing an equation. 
IntegerLiteralEqtok 
Represents an integer literal (e.g., 1776, +1, 05) encountered while parsing an equation. 
InternalVariableEqtok 
Represents a variable encountered while parsing an equation that is internal to the
command and equation, as opposed to an external Mapper variable declared by LDV
or LDA . 
IOperatorEqtok 
Represents a binary or unary operator such as + , *
and = encountered while parsing an equation. 
IVariableEqtok 
Represents a variable reference encountered while parsing an equation. 
MathOperatorEqtok 
Represents a mathematical operator such as addition (+) or multiplication (*)
encountered while parsing an equation. 
OperatorEqtokBase 
Simple, abstract, base implementation of precedence for operator tokens. 
RelationalOperatorEqtok 
Represents a relational operator such as equals (=), greater (>) or
lessthanorequal (<=, =<) encountered while parsing an equation. 
ReservedWordEqtok 
Represents a Mapper reserved word (e.g., DRW$ ) encountered
while parsing an equation. 
SkipDirectiveEqtok 
Represents SKIP directive encountered while parsing an equation. 
StringLiteralEqtok 
Represents a string literal (e.g., "hello, world" or
'hello, yourself') encountered while parsing an equation. 
ThenDirectiveEqtok 
Represents THEN directive encountered while parsing an equation. 
Class: BooleanOperatorEqtok
next
package
Represents a boolean operator such as AND or OR encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aBoolop  Boolean operator represented by this token.
aPrecedence  relative magnitude for ordering evaluation of operations.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public BooleanOperatorEqtok(com.arsi.mj.maprpt.lexer.ptree.symbol.BooleanOperator aBoolop, int aPrecedence, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents an "calendar" literal such as
30d
or
6M
encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Calendar part of literal (e.g., M, D, Y). public final java.lang.Character calendarMnemonic

Value of calendar literal in days (e.g.,. 1Y = 365 days). public final java.lang.Long days

Value of original integer part of literal. public final java.lang.Long literal

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLiteral  integer literal value.
aMnemonic  upper case mnemonic that identifies the type of calendar unit (e.g., 'D' = days).
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public CalendarLiteralEqtok(java.lang.Long aLiteral, java.lang.Character aMnemonic, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a conditional directive such as
IF
and
SKIP
.
Constructors 
Restricted ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
protected ConditionalDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents
ELSE
directive encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Token in equation that represents this directive. public static final java.lang.String ELSE_TOKEN = "ELSE"

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public ElseDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Base class that provides for common attributes of equation tokens, all "true"
concrete content token implementations derive from this class.
Treat this class as essentially "threadsafe", since it's state is intended to
be immutable once created.
public class com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.EquationTokenBase
extends java.lang.Object
Constructors 
Restricted ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
protected EquationTokenBase(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Methods 
public java.lang.Integer getCodeBlockId()

public final com.arsi.mj.maprpt.parser.line.types.AtLine getHostLine()

public long getOrdinal()

public final int getTokenIndex()

public void setCodeBlockId(java.lang.Integer anId)

Represents an executable directive such as
THEN
,
ELSE
and
FIRST
.
Constructors 
Restricted ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
protected ExecutableDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents
EXIT
directive encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Token in equation that represents this directive. public static final java.lang.String EXIT_TOKEN = "EXIT"

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public ExitDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a Mapper named or numbered variable, array or string bounds reference
encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aVarExpr  concatenation expression composed of a single variable dereference.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public ExternalVariableEqtok(com.arsi.mj.maprpt.lexer.ptree.expr.ConcatExpr aVarExpr, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents
FIRST
directive encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Token in equation that represents this directive. public static final java.lang.String FIRST_TOKEN = "FIRST"

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public FirstDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents an floating point literal (e.g., 1776, +1, 05) encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Value of floating point literal. public final java.lang.Double literal

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLiteral  floating point literal value.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public FloatLiteralEqtok(java.lang.Double aLiteral, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a function such as
ABS
or
PI
encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aFunction  function represented by this token.
someFunctionArgs  function arguments, if any (list can be empty), as tokenized equations themselves.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public FunctionEqtok(com.arsi.mj.maprpt.lexer.ptree.cmd.equation.function.IEquationFunction aFunction, java.util.List someFunctionArgs, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents the beginning of a group of terms (i.e., left parenthesis)
encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLiteral  string literal value.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public GroupBeginEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents the end of a group of terms (i.e., right parenthesis) encountered
while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLiteral  string literal value.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public GroupEndEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Marker interface for a directive such as
IF
,
THEN
,
SKIP
,
FIRST
, etc. encountered when parsing an equation.
Represents a token parsed from a
CAL
or
DC
equation, or a
CHG
calculation expression.
public interface com.arsi.mj.maprpt.lexer.ptree.cmd.equation.tokens.IEquationToken
Fields 
Code block for FIRST: nodes (lowest possible coe block ID) public static final java.lang.Integer INITIALIZER_CODE_BLOCK

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 token belongs to, if any (can be NULL).
public java.lang.Integer getCodeBlockId()

Get atsign line from which equation token was parsed.
 Returns:
 atsign 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 tokens according to the
sequence in which tokens were parsed.
 Returns:
 ordinal that is higher than tokens that precede this token in the input,
and lower than tokens that occur after this token in the input.
public long getOrdinal()

Get index of first character of token in atsign line (not counting first
character in atsign line).
 Returns:
 index of first character of token in atsign line (not counting
first character in atsign line).
public int getTokenIndex()

Represents
IF
directive encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Token in equation that represents this directive. public static final java.lang.String IF_TOKEN = "IF"

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public IfDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Marker interface for a numeric or string literal encountered while parsing an equation.
Represents an integer literal (e.g., 1776, +1, 05) encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Value of integer literal. public final java.lang.Long literal

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLiteral  integer literal value.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public IntegerLiteralEqtok(java.lang.Long aLiteral, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a variable encountered while parsing an equation that is internal to the
command and equation, as opposed to an external Mapper variable declared by
LDV
or
LDA
. For example, internal variables for
CAL
and
DC
commands are letters of the alphabet by default.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aName  name of internal variable.
aBounds  string bounds to apply to variable, if any (can be NULL).
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public InternalVariableEqtok(java.lang.String aName, com.arsi.mj.maprpt.lexer.ptree.symbol.StringBounds aBounds, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a binary or unary operator such as
+
,
*
and
=
encountered while parsing an equation.
Methods 
Get precedence of this operator as relative magnitude.
 Returns:
 relative, integer magnitude to be used to order evaluation of operations.
public int getPrecedence()

Represents a variable reference encountered while parsing an equation.
Represents a mathematical operator such as addition (+) or multiplication (*)
encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aMathop  Mathematical operator represented by this token.
aPrecedence  relative magnitude for ordering evaluation of operations.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public MathOperatorEqtok(com.arsi.mj.maprpt.lexer.ptree.symbol.MathOperator aMathop, int aPrecedence, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Simple, abstract, base implementation of precedence for operator tokens.
Constructors 
Restricted ctor for initializing an instance of this class.
 Parameters:
aPrecedence  relative magnitude for ordering evaluation of operations.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
protected OperatorEqtokBase(int aPrecedence, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Methods 
public int getPrecedence()

Represents a relational operator such as equals (=), greater (>) or
lessthanorequal (<=, =<) encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aRelop  relational operator represented by this token.
aPrecedence  relative magnitude for ordering evaluation of operations.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public RelationalOperatorEqtok(com.arsi.mj.maprpt.lexer.ptree.symbol.RelationalOperator aRelop, int aPrecedence, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a Mapper reserved word (e.g.,
DRW$
) encountered
while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Represents
SKIP
directive encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Token in equation that represents this directive. public static final java.lang.String SKIP_TOKEN = "SKIP"

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public SkipDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents a string literal (e.g.,
"hello, world"
or
'hello, yourself') encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Value of string literal. public final java.lang.String literal

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLiteral  string literal value.
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public StringLiteralEqtok(java.lang.String aLiteral, com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)

Represents
THEN
directive encountered while parsing an equation.
Treat this class as threadsafe since it is immutable once created.
Fields 
Token in equation that represents this directive. public static final java.lang.String THEN_TOKEN = "THEN"

Constructors 
Public ctor for initializing an instance of this class.
 Parameters:
aLine  atsign line from which equation token was parsed.
aTokenIndex  index of first character of token in atsign line (not counting first character in atsign line).
public ThenDirectiveEqtok(com.arsi.mj.maprpt.parser.line.types.AtLine aLine, int aTokenIndex)
