SIMPLE-ARRAY-DATA

SIMPLE-ARRAY-DATA is composed of lists of SIMPLE-DATA which are separated by WHITESPACE. There are two kinds of SIMPLE-ARRAY-DATA,

SIMPLE-ARRAY-DATA -> SIMPLE-VECTOR-DATA|SIMPLE-MATRIX-DATA

and SIMPLE-VECTOR-DATA can be of two types,

SIMPLE-VECTOR-DATA -> FIXED-VECTOR-DATA|VARIABLE-VECTOR-DATA

The definitions of each of these types are:

VARIABLE-VECTOR-DATA -> STRVEC|BINVEC|INTVEC|REALVEC|CPXVEC
FIXED-VECTOR-DATA    -> STRVEC(D)|BINVEC(D)|INTVEC(D)|REALVEC(D)|CPXVEC(D)

D  -> POSITIVE-INT

STRVEC(D) -> {STR }D
BINVEC(D) -> {BIN }D
INTVEC(D)   -> {INT }D
REALVEC(D)    -> {PLAIN-REAL }D [UNIT-SPECIFIER]
CPXVEC(D)   -> {PLAIN-REAL PLAIN-REAL }D [UNIT-SPECIFIER]

STRVEC -> { {STR }* }
BINVEC -> { {BIN }* }
INTVEC   -> { {INT }* }
REALVEC    -> { {PLAIN-REAL }* } [UNIT-SPECIFIER]
CPXVEC   -> { {PLAIN-REAL PLAIN-REAL }* } [UNIT-SPECIFIER]
In the above definitions the grammar element D stands for an integer which also forms part of the name of other grammar element symbol, for example STRVEC(D). STRVEC(D) thus stands for an infinite number of specific grammar element symbols, STRVEC(1), STRVEC(2), ..., etc. According to the definition of STRVEC(D), it is a sequence of STR elements separated by whitespace of length D.

As for REAL and CPX, vectors of these types may be followed by a UNIT-SPECIFIER, which is used to convert he values of the entire vector into an internal units system.

Unlike SIMPLE-VECTOR-DATA, SIMPLE-MATRIX-DATA can only be of the fixed variety,

SIMPLE-MATRIX-DATA ->
   STRMAT(D(1),...,D(N))|BINMAT(D(1),...,D(N))|INTMAT(D(1),...,D(N))|
   REALMAT(D(1),...,D(N))|CPXMAT(D(1),...,D(N))

N    -> 2|3|4|5
D(N) -> POSITIVE-INT
L    -> PRODUCT(D(1),...,D(N))

STRMAT(D(1),D(2)) -> [by_row|by_column] {STR }L
BINMAT(D(1),D(2)) -> [by_row|by_column] {BIN }L
INTMAT(D(1),D(2))   -> [by_row|by_column] {INT }L
REALMAT(D(1),D(2))    -> [by_row|by_column] {PLAIN-REAL }L [UNIT-SPECIFIER]
CPXMAT(D(1),D(2))   -> [by_row|by_column] {PLAIN-REAL PLAIN-REAL }L [UNIT-SPECIFIER]

M    -> 3|4|5

STRMAT(D(1),...,D(M)) -> {STR }L
BINMAT(D(1),...,D(M)) -> {BIN }L
INTMAT(D(1),...,D(M))   -> {INT }L
REALMAT(D(1),...,D(M))    -> {PLAIN-REAL }L [UNIT-SPECIFIER]
CPXMAT(D(1),...,D(M))   -> {PLAIN-REAL PLAIN-REAL }L [UNIT-SPECIFIER]
As before M and D(M) stands for any positive integers, and they form part of the name of other grammar elements, for example REALMAT(D(1),D(2)). Also, in the above definitions, PRODUCT(D(1),...,D(N)) stands for the integer which is the product of the integers D(1) to D(N) inclusive. That is, L is the number of elements in the array.

From these definitions, it is seen that two dimensional matrices are slightly different to three and higher dimensional matrices: two dimensional matrices may be preceded by the descriptor by_row, or by_column. This is to indicate whether the following sequence of SIMPLE-DATA is to be interpreted as being inputted in either row order, or column order, respectively. The default order is by_row, and this is set when the program is compiled. For multidimensional arrays, the default order is always so that the first index of the multidimensional array increments most rapidly---that is, the normal Fortran column order.

As usual, matrices of REAL and CPX values may be followed by a UNIT-SPECIFIER which will convert the inputted matrix DATA from the specified unit system, into the default internal unit system.