Any implementation of this standard will be functioning within a configuration. In practice, the boundary between what is implemented especially to support Rexx and what is provided by the system will vary from system to system. This clause describes what they shall together do to provide the configuration for the Rexx language processing which is described in this standard.
We don’t want to add undue « magic » to this section. It seems we will need the concept of a « reference » (equivalent to a machine address) so that this section can at least have composite objects as arguments. (As it already does but these are not Rexx objects) Possibly we could unify « reference » with « variable pool number » since object one-to-one with its variable pool is a fair model. That way we don’t need a new primitive for comparison of two references.
JAVA is only a « reference » for NetRexx so some generalized JAVA-like support is needed for that. It would provide the answers to what classes were in the context, what their method signatures were etc.
The interface to the configuration is described in terms of functions. The notation for describing the interface functionally uses the name given to the function, followed by any arguments. This does not constrain how a specific implementation provides the function, nor does it imply that the order of arguments is significant for a specific implementation.
The names of the functions are used throughout this standard; the names used for the arguments are used only in this clause and nnn.
The name of a function refers to its usage. A function whose name starts with
– Config_ is used only from the language processor when processing programs;
– API_ is part of the application programming interface and is accessible from programs which are not written in the Rexx language;
– Trap_ is not provided by the language processor but may be invoked by the language processor. As its result, each function shall return a completion Response. This is a string indicating how the function behaved. The completion response may be the character ‘N’ indicating the normal behavior occurred; otherwise the first character is an indicator of a different behavior and the remainder shall be suitable as a human-readable description of the function’s behavior.
This standard defines any additional results from Config_ functions as made available to the language processor in variables. This does not constrain how a particular implementation should return these results.
Notation for completion response and conditions
As alternatives to the normal indicator ‘N’, each function may return a completion response with indicator ‘X’ or ‘S’; other possible indicators are described for each function explicitly. The indicator ‘X’ means that the function failed because resources were exhausted. The indicator ‘S’ shows that the configuration was unable to perform the function.
Certain indicators cause conditions to be raised. The possible raising of these conditions is implicit in the use of the function; it is not shown explicitly when the functions are used in this standard.
The implicit action is
call #Raise ‘SYNTAX’, Message, Description
#Raise raises the condition, see nnn.
Message is determined by the indicator in the completion response. If the indicator is ‘X’ then
Message is 5.1. If the indicator is ‘S’ then Message is 48.1.
Description is the description in the completion response.
The ‘SYNTAX’ condition 5.1 can also be raised by any other activity of the language processor.
The processing initiation interface consists of a function which the configuration shall provide to invoke the language processor.
We could do REQUIRES in a macro-expansion way by adding an argument to Config_SourceChar to specify the source file. However, I’m assuming we will prefer to recursively « run » each required file. One of the results of that will be the classes and methods made public by that REQUIRES subject.
API_Start(How, Source, Environment, Arguments, Streams, Traps, Provides)
How is one of ‘COMMAND’, ‘FUNCTION’, or ‘SUBROUTINE’ and indicates how the program is invoked.
What does OOI say for How when running REQUIREd files?
Source is an identification of the source of the program to be processed.
Environment is the initial value of the environment to be used in processing commands. This has components for the name of the environment and how the input and output of commands is to be directed.
Arguments is the initial argument list to be used in processing. This has components to specify the number of arguments, which arguments are omitted, and the values of arguments that are not omitted.
Streams has components for the default input stream to be used and the default output streams to be used.
Traps is the list of traps to be used in processing (see nnn). This has components to specify whether each trap is omitted or not.
This function starts the execution of a Rexx program.
If the program was terminated due to a RETURN or EXIT instruction without an expression the completion response is ‘N’.
If the program was terminated due to a RETURN or EXIT instruction with an expression the indicator in the completion response is ‘R’ and the description of the completion response is the value of the expression.
If the program was terminated due to an error the indicator in the completion response is ‘E’ and the description in the completion response comprises information about the error that terminated processing.
If How was ‘REQUIRED’ and the completion response was not ‘E’, the Provides argument is set to reference classes made available. See nnn for the semantics of these classes.
Source programs and character sets
The configuration shall provide the ability to access source programs (see nnn).
Source programs consist of characters belonging to the following categories:
A character shall belong to only one category.
The following characters represent the category of characters called syntactic_characters, identified by their names. The glyphs used to represent them in this document are also shown. Syntactic_characters shall be available in every configuration:
– & ampersand;
– ‘ apostrophe, single quotation mark, single quote;
– * asterisk, star;
– blank, space;
– A-Zcapital letters A through Z;
– : colon;
– , comma;
– 0-9digits zero through nine;
– = equal sign;
– ! exclamation point, exclamation mark;
– > greater-than sign;
– – hyphen, minus sign;
– < less-than sign;
– [ left bracket, left square bracket;
– ( left parenthesis;
– % percent sign;
– . period, decimal point, full stop, dot;
– + plus sign;
– ? question mark;
– » quotation mark, double quote;
– \ reverse slant, reverse solidus, backslash;
– ] right bracket, right square bracket;
– ) right parenthesis;
– ; semicolon;
– / slant, solidus, slash;
– a-zsmall letters a through z;
– ~ tilde, twiddle;
– _ underline, low line, underscore;
– | vertical line, bar, vertical bar.
A configuration may have a category of characters in source programs called extra_letters. Extra_letters are determined by the configuration.
A configuration may have a category of characters in source programs called other_blank_characters. Other_blank_characters are determined by the configuration. Only the following characters represent possible characters of this category:
– carriage return;
– form feed;
– horizontal tabulation;
– new line;
– vertical tabulation.
A configuration may have a category of characters in source programs called other_negators.
Other_negators are determined by the configuration. Only the following characters represent possible characters of this category. The glyphs used to represent them in this document are also shown:
– ^ circumflex accent, caret;
– ¬ not sign.
A configuration may have a category of characters in source programs called other_characters.
Other_characters are determined by the configuration.
Configuration characters and encoding
The configuration characters and encoding interface consists of functions which the configuration shall provide which are concerned with the encoding of characters. The following functions shall be provided:
Supply the characters of the source program in sequence, together with the EOL and EOS events. The EOL event represents the end of a line. The EOS event represents the end of the source program. The EOS event must only occur immediately after an EOL event. Either a character or an event is supplied on each invocation, by setting #Outcome.
If this function is unable to supply a character because the source program encoding is incorrect the indicator of the completion response is ‘E’ and the description of the completion information is the encoding which is incorrect, in hexadecimal notation.
Get other_blank_characters (see nnn).
Set #Outcome to a string of zero or more distinct characters in arbitrary order. Each character is one that the configuration considers equivalent to the character Blank for the purposes of parsing.
Character is the character to be translated to uppercase.
Translate Character to uppercase. Set #Outcome to the translated character. Characters which have been subject to this translation are referred to as being in uppercase. Config_Upper applied to a character in uppercase must not change the character.
Character is the character to be translated to lowercase.
Translate Character to lowercase. Set #Outcome to the translated character. Characters which have been subject to this translation are referred to as being in lowercase. Config_Lower applied to a character in lowercase must not change the character. Config_Upper of the outcome of Config_Lower(Character) shall be the original character.
Character1 is the character to be compared with Character2.
Character2 is the character to be compared with Character1.
Compare two characters. Set #Outcome to
– ‘equal’ if Character1 is equal to Character2;
– ‘greater’ if Character1 is greater than Character2;
– ‘lesser’ if Character1 is less than Character2.
The function shall exhibit the following characteristics. If Config_Compare(a,b) produces
– ‘equal’ then Config_Compare(b,a) produces ‘equal’;
– ‘greater’ then Config_Compare(b,a) produces ‘lesser’;
– ‘lesser’ then Config_Compare(b,a) produces ‘greater’;
– ‘equal’ and Config_Compare(b,c) produces ‘equal’ then Config_Compare(a,c) produces ‘equal’;
– ‘greater’ and Config_Compare(b,c) produces ‘greater’ then Config_Compare(a,c) produces ‘greater’;
– ‘lesser’ and Config_Compare(b,c) produces ‘lesser’ then Config_Compare(a,c) produces ‘lesser’;
– ‘equal’ then Config_Compare(a,c) and Config_Compare(b,c) produce the same value.
Syntactic characters which are different characters shall not compare equal by Config_Compare, see nnn.
Binary is a sequence of digits, each ‘0’ or ‘1’. The number of digits shall be a multiple of eight.
Translate Binary to a coded string. Set #Outcome to the resulting string. The string may, or may not, correspond to a sequence of characters.
String is a string.
Translate String to a sequence of digits, each ‘0’ or ‘1’. Set #Outcome to the result. This function is the inverse of Config_B2C.
String is a string.
n is an integer identifying a position within String.
Copy the n-th character from String. The leftmost character is the first character. Set #Outcome to the resulting character.
If this function is unable to supply a character because there is no n-th character in String the indicator of the completion response is ‘M’.
If this function is unable to supply a character because the encoding of String is incorrect the indicator of the completion response is ‘E’ and the description of the completion information is the encoding which is incorrect, in hexadecimal notation.
String is a string.
Set #Outcome to the length of the string, that is, the number of characters in the string.
If this function is unable to determine a length because the encoding of String is incorrect, the indicator of the completion response is ‘E’ and the description of the completion information is the encoding which is incorrect, in hexadecimal notation.
Character1 is the null string, or a single character.
Character2 is the null string, or a single character.
If Character1 is the null string then let LowBound be a lowest ranked character in the character set according to the ranking order provided by Config_Compare; otherwise let LowBound be Character1. If Character2 is the null string then let HighBound be a highest ranked character in the character set according to the ranking order provided by Config_Compare; otherwise let HighBound be Character2If #Outcome after Config_Compare(LowBound,HighBound) has a value of
– ‘equal’ then #Outcome is set to LowBound;
– ‘lesser’ then #Outcome is set to the sequence of characters between LowBound and HighBound inclusively, in ranking order;
– ‘greater’ then #Outcome is set to the sequence of characters HighBound and larger, in ranking order, followed by the sequence of characters LowBound and smaller, in ranking order.
5.14 Variable pool
5.12 Configuration routines
5.11 Configuration characteristics
5.10 External variable pools
5.8 External data queue
5.7 External routines
6.3 Syntactic equivalence
6.2 Replacement of insertions
126.96.36.199 Error message prefix
6.1.6 Creation of messages
6.1.5 Choice of messages
6.1.4 Nested IF instructions
6.1.3 Clauses and line numbers
6.1.2 Trace-only labels
6.1.1 VAR_SYMBOL matching
6.1 Syntactic information
6.3.2 Syntax level
6.3.1 Syntax elements
6 Syntax constructs
9.5.7 DO loop tracing
9.5.5 Command to the configuration
9.4 Clause termination
9.3 Clause initialization
9.2 Routine initialization
9.1 Method initialization
8.2.1 Program initialization and message texts
7.1.1 Use of Config_ExternalRoutine
7.5.6 The value of a message term
7.5.5 The value of a method
7.5.4 The value of a function
7.5.3 The value of a label
7.5.2 Evaluation of arguments
7.4.10 Arithmetic operations
7.4.9 The value of an expression
7.4.8 The value of an and_expression
7.4.7 The value of a comparison
7.4.6 The value of a concatenation
7.4.5 The value of an addition
7.4.4 The value of a multiplication
7.4.3 The value of a power_expression
7.4.2 The value of a prefix_expression
7.4.1 The value of a term
7.4 Expressions and operators
7.3.2 Value of a reserved symbol
7.3.1 Derived names
7.3 Value of a variable
10.1 Character built-in functions
10.2.2 Raising the SYNTAX condition
10.2.1 Radix conversion
10.2.2 Date calculations
10.2.1 Argument checking
10.2 Routines used by built-in functions
10 Built-in functions
9.6.2 Messages during execution
9.6.1 Raising of conditions
9.6 Conditions and Messages
9.5.35 Trace output
188.8.131.52 NUMERIC FUZZ
184.108.40.206 NUMERIC FORM
220.127.116.11 NUMERIC DIGITS
9.5.18 Message term
9.5.16 Execution of labels
12 Provided classes
11.5 The message class
11.4 The supplier class
11.3.1 The array class
11.3 The string class
11.2.3 The method class
11.2.2 The class class
11.2.1 The object class
11.2 Object, class and method
11 Built-in classes