Semantics : AtomicExpr
AtomicExpr ::=
|
( ( :: )? IDENTIFIER | CONST_NAME | FUNCTION_NAME | JavaClassName :: IDENTIFIER | super . IDENTIFIER | this | ( Expr ) | #args | #options | #cmd_args | #prog | $_ | $__ | $$ | $$con | $$timer | $$args | $$fs_result | $$local | $$bsf | column ( ( STRING_LIT | INT_LIT ) ) ) ( [> ( , Expr )* ] | . ( IDENTIFIER | STRING_LIT | ( Expr ) ) | < IDENTIFIER ( : IDENTIFIER )? > | ( -> )? Arguments ) )* |
This represents individual variables, object member access, array access,
function calls and combinations of all these.
The leading :: decorator is to access global scope variables and/or functions.
If :: appears in between two names, the name(s) on the left is a Java class name
and the one on the right is a static member or method.
A name followed by ( ... ) is a function/method call. A name followed by
-> ( ... ) is an indirect function/method call, meaning calling the
function reference that is held in that entity. If ( ) follows other
parentheses or brackets, it is automatically a function reference call.
An expression enclosed in parentheses ( and ) is an atomic expression. This
is the way to invoke methods on literals such as a number or a string. Since the
expression can be evaluated into anything, including a function reference, an array
or a Java object, function call operators and array access operators can follow.
The this variable is used to reference the current object. It is valid only
within class methods.
The super decorator is used only to invoke methods in the parent class. It is
valid only within class methods.
The #args , #options , #cmd_args and #prog built-in constants are for
command-line options. #prog holds the program's name, the path name for the script.
JudoScript supports command-line parameters, that any parameter starting with '-' or
'/' is deemed as an option; it can be a name-value pair, or simply a name whose value
is defaulted to true . These options, if present, are parsed and stored in #options
which is a Struct . All other parameters are collected into the array #args .
The row command-line elements are saved in #cmd_args , so that custom command-line
formats can be implemented.
The $_ built-in variable is used in many occations to represent the "current"
state. These include in catch clause for the exception object (see Block),
in SGML/HTML (see SgmlStatement) and XML (see XmlStatement)
statements for the current tag, in GUI event handlers (see GuiEventsStatement)
for the event object, and in the lines statement (see LinesStatement) for
the current line.
The $__ built-in variable is used in the XML handler for embedded text tags. It
references the parent (enclosing) tag of the current text tag.
The $$ built-in variable is for the default database handle (see
JdbcStatements). The $$con built-in variable is for the default database
connection (see ).
The $$timer built-in variable is the timer object in the schedule statement (see
ScheduleStatement).
The $$args array represents the function call parameters that follow the named
formal parameters in function calls and thread startups. See FormalParameters.
The $$fs_result built-in variable holds the result for file-system listing commands.
The $$local built-in variable is an input text reader for the in-script data that
follows the line of EndScript . See Script.
The $$bsf built-in variable is the one and only BSF object, for embedding JudoScript
in other Java software via BSF.
The column expression is used only in PrintTableDataStatement.