Next: , Previous: , Up: Expression Evaluator Types   [Index]


3.22.2.8 struct x1f4_operator_type

typedef struct x1f4_operator_type {
    const char *name;
    int (*operator)(void *, void **), priority, type;
    const int *args;
    unsigned flags, length;
    const void *extension1, *extension2;
} x1f4_operator_type;

The struct x1f4_operator_type record describes symbolic operators.

See Prefix Unary Operators.

See Infix Binary Operators.

name

The name field is the operator name.

See Operator Character Set.

length

The length field is the operator name length, i.e. the number of characters (not including the terminal null) making up the operator name.

type

The type field is the operator symbolic type, i.e. the type to which it evaluates. It may be one of X1f4_E4_BILL, X1f4_E4_MODE, X1f4_E4_REAL and X1f4_E4_TEXT or it may indicate an application defined opaque type, case in which it is greater than X1f4_E4_LAST.

See Symbolic Types.

See Application Defined Types.

flags

The flags field is a bitwise OR of zero or more operator and function flag bits and infix binary operator flag bits or prefix unary operator flag.

See Binary Operator Flags.

See Operator And Function Flags.

See Operator Flags.

See Prefix Unary Operator Flags.

args

The args field indicates the type of operator arguments. It should point a memory location at which an int array of 1 for prefix unary operators and 2 for binary infix operators elements is stored. The type of one operator argument is indicated by the corresponding array element, i.e. the type of the first operator argument is indicated by the first array element, the type of the second operator argument is indicated by the second array element. The type of operator arguments may be one of X1f4_E4_BILL, X1f4_E4_MODE, X1f4_E4_REAL and X1f4_E4_TEXT or it may indicate an application defined opaque type, case in which it is greater than X1f4_E4_LAST.

See Symbolic Types.

See Application Defined Types.

operator

The operator field is the address of the routine performing the symbolic operator logic.

The routine is supplied two arguments when called. The first is the address at which the operator result is to be stored. The second is an array of addresses from which the operator arguments are to be read.

The routine is expected to return 0 if it completes execution successfully, non zero otherwise. In the latter case the expression evaluation will be terminated.

Returning one of the error class indications for non successful execution will allow error recovery for the constructs capable of.

See Error Classes.

See Limiting The Scope Of Errors.

priority

The priority field regulates the expression evaluation when different infix binary operators occur in the same expression evaluation scope. The operators are evaluated starting with the ones having the smalled priority values to the ones having the greatest priority values.

The priority field has no defined meaning for prefix unary operators.

Note that there is only one defined associativity, the left to right one.

extension1

The extension1 field describes various operator extensions. It is only interpreted if the X1f4_E4_E1ST_LINK bit is included in the value of the flags attribute.

When present, it points a struct x1f4_1stscope_type record.

See struct x1f4_1stscope_type.

See Operator Flags.

extension2

The extension2 field describes various operator extensions. It is only interpreted if the X1f4_E4_E2ND_LINK bit is included in the value of the flags attribute.

When present, it points a struct x1f4_2ndscope_type record.

See struct x1f4_2ndscope_type.

See Operator Flags.

See Expressive Operators.


Next: , Previous: , Up: Expression Evaluator Types   [Index]