Base class for RUN command parsers that contain common methods.
Treat this class as "thread-hostile", as an instance is designed to be created,
used and discarded by a single thread.
Methods |
As part of parsing arguments, advance token past the comma we expect to
occur after the argument just parsed (unless reached end of command or
lexer). The caller must skip any blanks before calling this method.
- Parameters:
anInitialToken - last token returned by from lexer, and the current token from
the caller's perspective (should not be a blank token).
aLexer - lexer for obtaining additional tokens.
aUserRID - report ID string that is meaningful to user as an error context.
aLineNumber - line number in report where aCommandName command occurs.
aCommandName - name of Mapper command being parsed, for diagnostic purposes.
- Returns:
- NULL if no advancement possible because
anInitialToken indicates
end of command or lexer, otherwise next token after optional blanks and
expected comma (this method advances past any blanks before and after comma).
protected com.arsi.mj.maprpt.lexer.tokens.IMaprptToken advanceTokenPastComma(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, java.lang.String aUserRID, int aLineNumber, java.lang.String aCommandName)
|
Check concatenation expression for a variable declaration and reduce to a
declared variable expression. Such variable declarations may occur instead
of more typical variable dereferences (e.g., V55f6.2 instead of v55) while
parsing commands not dedicated to variable definition such as LDV .
- Parameters:
aConcatExpr - concatenation expression to check for a variable declaration.
aCabinetNumber - cabinet of Mapper report where expression originated.
aDrawerLetter - drawer of Mapper report where expression originated.
aReportNumber - report number of Mapper report where expression originated.
aLineNumber - line number where aConcatExpr was encountered in Mapper report.
- Returns:
- a declared variable expression that can replace
aConcatExpr ,
or NULL if a declared variable expression was not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.expr.DeclaredVariableExpr checkAndReduceDeclaredVariable(com.arsi.mj.maprpt.lexer.ptree.expr.ConcatExpr aConcatExpr, int aCabinetNumber, char aDrawerLetter, int aReportNumber, int aLineNumber)
|
Create parse tree from one or more Mapper statements that originated from another Mapper report.
- Parameters:
aMapperCodeSnippet - one or more Mapper statements embedded in a single line, which may consist of an
empty line (e.g., blanks or only a period). For example, CLV LDV,Z v1s6='X' .
aTokenReplCtx - token replacements (token name and replacement value) extracted from :DEFINEs
by parent lexer where Mapper statements originated.
anAppCtx - application context for looking up report names and other beans.
aCabinetNumber - cabinet of Mapper report where Mapper statements originated.
aDrawerLetter - drawer of Mapper report where Mapper statements originated.
aReportNumber - report number of Mapper report where Mapper statements originated.
aLineNumber - line number in Mapper report where Mapper statements originated.
- Throws:
MJTranslateException - if the parse tree cannot be constructed.
- Returns:
- the parse tree for the Mapper statements.
protected com.arsi.mj.maprpt.lexer.ptree.MaprptParseTree codeSnippetParsetree(java.lang.String aMapperCodeSnippet, com.arsi.mj.maprpt.lexer.TokenReplacementContext aTokenReplCtx, org.springframework.context.ApplicationContext anAppCtx, int aCabinetNumber, char aDrawerLetter, int aReportNumber, int aLineNumber) throws com.arsi.mj.MJTranslateException
|
Parse a single variable reference from the input as a concatenation expression.
- Parameters:
anInitialToken - a less-than (start of named variable) or alphanumeric (start of numbered variable) token.
aLexer - lexer for obtaining additional tokens.
aConcatEndOfExpr - terminate parsing of one-shot concatenation expression to extract variable reference,
text or other construct (e.g., reserved word) if token matches one of these types.
aUserRID - report ID string that is meaningful to user as an error context.
aLineNumber - line number in report where command that contains equation occurs.
- Returns:
- single concatenation expression that is a
IVariableDerefExpr .
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ConcatExprResult doOneShotParseOfVariable(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ConcatEndOfExprOneshotImpl aConcatEndOfExpr, java.lang.String aUserRID, int aLineNumber)
|
Create a lexer that serves only to parse a Mapper expression that originated
from another Mapper report.
- Parameters:
aMapperExpr - a Mapper "concatenation" expression, e.g., 'A'v1(1-4z)TIC$ .
aCabinetNumber - cabinet of Mapper report where expression originated.
aDrawerLetter - drawer of Mapper report where expression originated.
aReportNumber - report number of Mapper report where expression originated.
aLineNumber - line number in Mapper report where expression originated.
- Throws:
MJTranslateException - if the lexer cannot be constructed.
- Returns:
- the expression lexer.
protected com.arsi.mj.maprpt.lexer.MaprptLexer expressionLexer(java.lang.String aMapperExpr, int aCabinetNumber, char aDrawerLetter, int aReportNumber, int aLineNumber) throws com.arsi.mj.MJTranslateException
|
Attempt to parse an array subscript such as [5] from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as an array subscript.
- Throws:
MJTranslateException - if closing, right bracket not found in input.
- Returns:
- array subscript, or NULL if array subscript not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.symbol.ArraySubscript parseArraySubscript(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer) throws com.arsi.mj.MJTranslateException
|
Parse an optional cabinet and drawer (CD) specification, which includes results identified
by negative numbers (examples of CD include 16,B , 'order drawer' ,
-0 , v1,v2 , ,) from the Mapper report lexer. This
method eats all tokens it reads except for the last token read, so invoke only when a CD
specification is the next thing expected in the input.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens.
aNamedReportLookup - lookup class for resolving Mapper report names (may be NULL).
- Returns:
- CDR result that represents cabinet and drawer (report number is always NULL),
a result number or NULL
cdr if empty cabinet and drawer (, ).
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.CdrResult parseCd(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.namedrpt.NamedReportLookup aNamedReportLookup)
|
Parse an optional cabinet and drawer (CD) specification, which includes results identified
by negative numbers (examples of CD include 16,B , 'order drawer' ,
-0 , v1,v2 , ,) from the Mapper report lexer. This
method eats all tokens it reads except for the last token read, so invoke only when a CD
specification is the next thing expected in the input.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens.
aNamedReportLookup - lookup class for resolving Mapper report names (may be NULL).
aCabinetEndOfExpr - determines if end of cabinet concatenation expression has been reached.
aDrawerEndOfExpr - determines if end of drawer concatenation expression has been reached.
- Returns:
- CDR result that represents cabinet and drawer (report number is always NULL),
a result number or NULL
cdr if empty cabinet and drawer (, ).
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.CdrResult parseCd(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.namedrpt.NamedReportLookup aNamedReportLookup, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aCabinetEndOfExpr, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aDrawerEndOfExpr)
|
Parse a cabinet, drawer and report number (CDR) specification, which includes
results identified by negative numbers (examples of CDR include 16,B,5 ,
'order report' , -0 , v1,v2,v3 ) from the Mapper
report lexer. This method eats all tokens it reads except for the last token read, so
invoke only when a CDR specification is the next thing expected in the input.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens.
aNamedReportLookup - lookup class for resolving Mapper report names (may be NULL).
- Returns:
- CDR result that represents cabinet, drawer and report number or a result number.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.CdrResult parseCdr(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.namedrpt.NamedReportLookup aNamedReportLookup)
|
Parse a cabinet, drawer and report number (CDR) specification, which includes
results identified by negative numbers (examples of CDR include 16,B,5 ,
'order report' , -0 , v1,v2,v3 ) from the Mapper
report lexer. This method eats all tokens it reads except for the last token read, so
invoke only when a CDR specification is the next thing expected in the input.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens.
aNamedReportLookup - lookup class for resolving Mapper report names (may be NULL).
aCabinetEndOfExpr - determines if end of cabinet concatenation expression has been reached.
aDrawerEndOfExpr - determines if end of drawer concatenation expression has been reached.
aReportEndOfExpr - determines if end of report concatenation expression has been reached.
- Returns:
- CDR result that represents cabinet, drawer and report number or a result number.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.CdrResult parseCdr(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.namedrpt.NamedReportLookup aNamedReportLookup, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aCabinetEndOfExpr, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aDrawerEndOfExpr, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aReportEndOfExpr)
|
Attempt to parse a concatenation expression from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as a concatenation expression.
anEofParser - parser to detect end of concatenation expression.
aTreatReservedWordAsLiteralFlag - if true, treat reserved words as literal text (e.g., DATE1$ is treated
as the string "DATE1$" instead of current date in YYMMDD format).
aGreedyTextFlag - if true, create text object as soon as text is recognized, otherwise text may
be accumulated until other parts of expression (e.g., variable) are recognized.
- Returns:
- concatenation expression, or NULL if concatenation expression not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ConcatExprResult parseConcatExpr(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr anEofParser, boolean aTreatReservedWordAsLiteralFlag, boolean aGreedyTextFlag)
|
Attempt to parse a "jump" expression (e.g., target of a GTO ) from
the input, where the input has been typically been found enclosed in
parentheses such as "(0100)", "(end)" and "( lin +v1 )".
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens (tokens are eaten and not pushed back).
aConcatEndOfExpr - determines when end of concatenation expression has been reached.
someEndingTokenTypes - token last read after parsing jump expression must match one of these types.
aUserRID - report ID string that is meaningful to user as an error context.
aLineNumber - line number where anInitialToken was encountered in Mapper report.
aJumpExprString - string that is likely to contain a jump expression for diagnostic purposes only,
pass as NULL if not known.
- Returns:
- NULL if jump expression was not recognized, otherwise a literal callback that stores
a literal label or line offset, or a concatenation expression that encompasses jump
expression, which may be a combination of literals (e.g., an integer, "END",
"lin +5", "RPX 22") and variable references (simple variable name or number,
array subscript, etc.).
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.JumpExprResult parseJumpExpression(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aConcatEndOfExpr, java.lang.Class someEndingTokenTypes, java.lang.String aUserRID, int aLineNumber, java.lang.String aJumpExprString)
|
Attempt to parse a "jump" expression (e.g., target of a GTO ) from
the input string, where the input has been typically been found enclosed in
parentheses such as "(0100)", "(end)" and "( lin +v1 )".
- Parameters:
aJumpExprString - string that is likely to contain a jump expression (this string is not
enclosed in parentheses; opening and closing parenthesis have been removed).
aCabinetNumber - cabinet of Mapper report where expression originated.
aDrawerLetter - drawer of Mapper report where expression originated.
aReportNumber - report number of Mapper report where expression originated.
aLineNumber - line number where aJumpExprString was encountered in Mapper report.
- Returns:
- NULL if jump expression was not recognized, otherwise a literal callback that stores
a literal label or line offset, or a concatenation expression that encompasses jump
expression, which may be a combination of literals (e.g., an integer, "END", "lin +5")
and variable references (simple variable name or number, array subscript, etc.).
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.JumpExprResult parseJumpExpression(java.lang.String aJumpExprString, int aCabinetNumber, char aDrawerLetter, int aReportNumber, int aLineNumber)
|
Parse a concatenation expression from the input, then parse a literal, or
combination of text, variable(s) and/or reserved word(s) from the expression.
The literal and reserved words must conform to expectations. This method eats
all tokens it reads except for the last token read, so invoke only when an
element initializer is the next thing expected in the input.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens.
aConcatEndOfExpr - determines if end of concatenation expression has been reached.
aValidator - validates and captures any literal recognized by this method.
someReservedWords - classes of reserved words that are considered valid.
aGreedyTextFlag - if true, create text object as soon as text is recognized, otherwise text may
be accumulated until other parts of expression (e.g., variable) are recognized.
aLineNumber - line number where anInitialToken was encountered in Mapper report.
- Throws:
MJTranslateException - if an error occurs parsing an expression from the input, or parsing a literal,
variable or reserved word from the expression.
- Returns:
- concatenation expression, or NULL if no expression (
ConcatExprResult.concatExpr
may be NULL as well and should be checked by caller); if a literal is recognized by
this method, it should be captured by aValidator .
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ConcatExprResult parseLiteralVariableOrReserved(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.IConcatEndOfExpr aConcatEndOfExpr, com.arsi.mj.maprpt.lexer.ptree.cmd.litcbk.ILiteralCallback aValidator, java.util.List someReservedWords, boolean aGreedyTextFlag, int aLineNumber) throws com.arsi.mj.MJTranslateException
|
Attempt to parse a reformat directive such as (p) from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as an array subscript.
- Returns:
- reformat directive, or NULL if reformat directive not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.symbol.Reformat parseReformat(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer)
|
Attempt to parse a re-formatting string bounds such as (4-7z)
from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as a string bounds.
- Returns:
- parse result object, or NULL if re-formatting string bounds not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.symbol.ReformatStringBounds parseReformatStringBounds(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer)
|
Parse a relational operator (e.g., EQ , < , notgt )
from the Mapper report lexer. This method eats all tokens it reads except for the last
token read, so invoke only when a relational operator is the next thing expected in the input.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer,
expected to be first token that comprise relational operator.
aLexer - lexer for obtaining additional tokens.
aUserRID - report ID string that is meaningful to user as an error context.
aLineNumber - line number in report where command option occurs.
- Throws:
MJTranslateException - if no relational operator was recognized.
- Returns:
- result that contains relational operator.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.RelationalOperatorResult parseRelationalOperator(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, java.lang.String aUserRID, int aLineNumber) throws com.arsi.mj.MJTranslateException
|
Attempt to parse reserved word from specified token and the token that
follows (i.e., alphanumeric followed by a dollar sign) resembles a reserved
word. The reserved word can further be checked against a list of legal
reserved words before being returned as a valid reserved word.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as a valid reserved word.
- Returns:
- result containing reserved word that was parsed and recognized, or NULL
if tokens do not resemble a reserved word, or if parsed reserved word is
not legal. When a reserved word is returned, the caller must read from
the lexer get the next token after the reserved word.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ReservedWordParseResult parseReservedWord(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, java.util.List someReservedWords)
|
Parse a report name, result number literal or expression that resolves to a
result number from contents of a quoted string.
- Parameters:
aQSToken - quoted string whose contents are to be parsed.
aNamedReportLookup - lookup class for resolving Mapper report names (may be NULL).
aCabinetNumber - cabinet of Mapper report where expression originated.
aDrawerLetter - drawer of Mapper report where expression originated.
aReportNumber - report number of Mapper report where expression originated.
aLineNumber - line number where aQSToken was encountered in Mapper report.
- Throws:
MJTranslateException - if an error occurs parsing the contents of the quoted string.
- Returns:
- object that stores the return value from parsing, either a cabinet, drawer
and report number, a literal result number (e.g.,
-1 ) or an
expression that evaluates at run-time to a result number.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.CabinetAsQuotedStringResult parseRptnameOrResultFromQuotedString(com.arsi.mj.maprpt.lexer.tokens.cmd.QuotedStringToken aQSToken, com.arsi.mj.maprpt.namedrpt.NamedReportLookup aNamedReportLookup, int aCabinetNumber, char aDrawerLetter, int aReportNumber, int aLineNumber) throws com.arsi.mj.MJTranslateException
|
Parse size in variable declaration that is itself defined by a named or numbered variable
reference. Size should have been determined to be defined by a variable reference before
this method is called, as it expects an initial token that starts a variable reference and
consumes additional tokens while parsing the rest of the variable reference.
- Parameters:
anInitialToken - a less-than (start of named variable) or alphanumeric (start of numbered variable) token.
aLexer - lexer for obtaining additional tokens (tokens are eaten and not pushed back).
aTypeChar - upper-case character that represent a valid Mapper variable type (e.g., 'F', 'S').
aConcatEndOfExpr - terminate parsing of one-shot concatenation expression to extract variable
reference if token matches one of these types.
- Returns:
- parsed variable size and type.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.VariableTypeSizeResult parseSizeAsVariable(com.arsi.mj.maprpt.lexer.tokens.ICommandToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, char aTypeChar, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ConcatEndOfExprOneshotImpl aConcatEndOfExpr)
|
Attempt to parse a string bounds such as (4-7) or (0-3)
from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as a string bounds.
- Returns:
- parse result object, or NULL if string bounds not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.symbol.StringBounds parseStringBounds(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer)
|
Attempt to parse a variable reference (e.g., v100 , <myvar> )
from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as a variable reference.
- Returns:
- parse result object (where a non-NULL
varRef indicates that a
variable reference was recognized and parsed) or NULL if no variable reference
recognized.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.VariableReferenceResult parseVariableReference(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer)
|
Attempt to parse a variable type and size (e.g., s20 , f7.2 )
from the Mapper report lexer.
- Parameters:
anInitialToken - initial token to examine returned from a previous call to lexer.
aLexer - lexer for obtaining additional tokens; these tokens are pushed back by this
method if the input is not recognized as a variable type and size.
aConcatEndOfExpr - terminate parsing of one-shot concatenation expression to extract variable
reference if token matches one of these types.
- Returns:
- parse result object, or NULL if variable type and size were not recognized.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.VariableTypeSizeResult parseVariableTypeSize(com.arsi.mj.maprpt.lexer.tokens.IMaprptToken anInitialToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.ConcatEndOfExprOneshotImpl aConcatEndOfExpr)
|
Reduce concatenation expression that is assumed to be a run-time jump expression so
that expression no longer contains LIN or RPX literal text.
However, we count on these text expressions being initially present in the concatenation
expression so the jump destination of the expression can be determined.
- Parameters:
aConcatExpr - concatenation expression assumed to be run-time jump expression, the expression
is modified by this method if LIN or RPX text isn found.
- Returns:
- the jump destination, determined by checking for
LIN or RPX
text in expression; if neither found, defaults to JumpDestination.LABEL .
public static com.arsi.mj.maprpt.lexer.ptree.cmd.ctrlflow.jumps.JumpInfoBase.JumpDestination reduceJumpExpr(com.arsi.mj.maprpt.lexer.ptree.expr.ConcatExpr aConcatExpr)
|
Do read-ahead of lexer to do simple check that token following a less-than token
resemble the start of a named variable (i.e., alphanumeric follows, or another
less-than token then followed by an alphanumeric).
- Parameters:
aLessThanToken - initial less-than token parsed from lexer.
aLexer - lexer for obtaining additional tokens; tokens that resemble a named variable
are pushed back onto lexer before returning true .
aNoResemblancePushback - queue where token(s) that do not resemble a named variable are pushed back
before returning false (including aLessThanToken ).
- Returns:
- true if resembles a named variable, false if not.
protected boolean resemblesNamedVariableRef(com.arsi.mj.maprpt.lexer.tokens.cmd.LessThanToken aLessThanToken, com.arsi.mj.maprpt.lexer.MaprptLexer aLexer, java.util.Deque aNoResemblancePushback)
|
Determine if alphanumeric string looks like a numbered variable declaration, e.g., "V100",
"vv25", "v34i6", "v28H15", "V75f6" (rest of floating point truncated because period
stops parsing of alphanumeric token), etc.
- Parameters:
aVarname - string that is candidate numbered variable name.
aLine - at-sign line where this token was parsed.
- Returns:
- parse result object if string appears to be a numbered variable, or NULL if string
does not appear to be a numbered variable.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.LooksLikeNumvarResult resemblesNumberedVariableDecl(java.lang.String aVarname, com.arsi.mj.maprpt.parser.line.types.AtLine aLine)
|
Determine if alphanumeric string looks like a numbered variable reference, e.g.,
"V100", "vv25". No attempt is made to qualify alphanumeric string contents after
the initial portion that resembles a numbered variable reference.
- Parameters:
aVarname - string that is candidate numbered variable name.
aLine - at-sign line where this token was parsed.
- Returns:
- parse result object if string appears to be a numbered variable, or NULL if string
does not appear to be a numbered variable.
protected com.arsi.mj.maprpt.lexer.ptree.cmd.RunCommandParserBase.LooksLikeNumvarResult resemblesNumberedVariableRef(java.lang.String aVarname, com.arsi.mj.maprpt.parser.line.types.AtLine aLine)
|
Given a character that signifies a Mapper variable type (e.g., 'S', 'F', 'I'),
return the corresponding Mapper data type enumeration constant.
- Parameters:
aTypeChar - a type character (e.g., 's', 'F').
- Returns:
- corresponding Mapper data type enumeration, or NULL if none.
protected com.arsi.mj.datatype.MaprptDataType typeCharToDataType(char aTypeChar)
|