You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
277 lines
9.4 KiB
Plaintext
277 lines
9.4 KiB
Plaintext
[[alternator-def]]
|
|
== Supporting Command Selectors
|
|
|
|
To further enchance the set of minimal commands for useful computation, the following command selectors and its supportive alternatives are defined.
|
|
|
|
An implementation is required to support these selectors, but it may not support all of its alternatives.
|
|
|
|
[[alternator-def-set]]
|
|
=== SET
|
|
|
|
*Alternatives*
|
|
|
|
SET_VAR_INT VAR_INT INT
|
|
SET_VAR_FLOAT VAR_FLOAT FLOAT
|
|
SET_LVAR_INT LVAR_INT INT
|
|
SET_LVAR_FLOAT LVAR_FLOAT FLOAT
|
|
SET_VAR_INT_TO_VAR_INT VAR_INT VAR_INT
|
|
SET_LVAR_INT_TO_LVAR_INT LVAR_INT LVAR_INT
|
|
SET_VAR_FLOAT_TO_VAR_FLOAT VAR_FLOAT VAR_FLOAT
|
|
SET_LVAR_FLOAT_TO_LVAR_FLOAT LVAR_FLOAT LVAR_FLOAT
|
|
SET_VAR_FLOAT_TO_LVAR_FLOAT VAR_FLOAT LVAR_FLOAT
|
|
SET_LVAR_FLOAT_TO_VAR_FLOAT LVAR_FLOAT VAR_FLOAT
|
|
SET_VAR_INT_TO_LVAR_INT VAR_INT LVAR_INT
|
|
SET_LVAR_INT_TO_VAR_INT LVAR_INT VAR_INT
|
|
SET_VAR_INT_TO_CONSTANT VAR_INT INPUT_INT
|
|
SET_LVAR_INT_TO_CONSTANT VAR_INT INPUT_INT
|
|
SET_VAR_TEXT_LABEL VAR_TEXT_LABEL TEXT_LABEL
|
|
SET_LVAR_TEXT_LABEL LVAR_TEXT_LABEL TEXT_LABEL
|
|
|
|
*Side-effects*
|
|
|
|
Sets the variable on the left to the value on the right.
|
|
|
|
*Constraints*
|
|
|
|
The translation environment must enforce the following constraints.
|
|
|
|
A variable cannot be assigned to another variable of different entity type. If the right variable has no entity type but the left one does, the program is ill-formed. If the left variable has no entity type, the entity type of the right variable is assigned to it.
|
|
|
|
[[alternator-def-cset]]
|
|
=== CSET
|
|
|
|
*Alternatives*
|
|
|
|
CSET_VAR_INT_TO_VAR_FLOAT VAR_INT VAR_FLOAT
|
|
CSET_VAR_FLOAT_TO_VAR_INT VAR_FLOAT VAR_INT
|
|
CSET_LVAR_INT_TO_VAR_FLOAT LVAR_INT VAR_FLOAT
|
|
CSET_LVAR_FLOAT_TO_VAR_INT LVAR_FLOAT VAR_INT
|
|
CSET_VAR_INT_TO_LVAR_FLOAT VAR_INT LVAR_FLOAT
|
|
CSET_VAR_FLOAT_TO_LVAR_INT VAR_FLOAT LVAR_INT
|
|
CSET_LVAR_INT_TO_LVAR_FLOAT LVAR_INT LVAR_FLOAT
|
|
CSET_LVAR_FLOAT_TO_LVAR_INT LVAR_FLOAT LVAR_INT
|
|
|
|
*Side-effects*
|
|
|
|
Sets the variable on the left to the value of the variable on the right converted to the left type.
|
|
|
|
[[alternator-def-add-thing-to-thing]]
|
|
=== ADD_THING_TO_THING
|
|
|
|
*Alternatives*
|
|
|
|
ADD_VAL_TO_INT_VAR VAR_INT INT
|
|
ADD_VAL_TO_FLOAT_VAR VAR_FLOAT FLOAT
|
|
ADD_VAL_TO_INT_LVAR LVAR_INT INT
|
|
ADD_VAL_TO_FLOAT_LVAR LVAR_FLOAT FLOAT
|
|
ADD_INT_VAR_TO_INT_VAR VAR_INT VAR_INT
|
|
ADD_FLOAT_VAR_TO_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
ADD_INT_LVAR_TO_INT_LVAR LVAR_INT LVAR_INT
|
|
ADD_FLOAT_LVAR_TO_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
ADD_INT_VAR_TO_INT_LVAR LVAR_INT VAR_INT
|
|
ADD_FLOAT_VAR_TO_FLOAT_LVAR LVAR_FLOAT VAR_FLOAT
|
|
ADD_INT_LVAR_TO_INT_VAR VAR_INT LVAR_INT
|
|
ADD_FLOAT_LVAR_TO_FLOAT_VAR VAR_FLOAT LVAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Adds the value on the right to the variable on the left.
|
|
|
|
[[alternator-def-sub-thing-from-thing]]
|
|
=== SUB_THING_FROM_THING
|
|
|
|
*Alternatives*
|
|
|
|
SUB_VAL_FROM_INT_VAR VAR_INT INT
|
|
SUB_VAL_FROM_FLOAT_VAR VAR_FLOAT FLOAT
|
|
SUB_VAL_FROM_INT_LVAR LVAR_INT INT
|
|
SUB_VAL_FROM_FLOAT_LVAR LVAR_FLOAT FLOAT
|
|
SUB_INT_VAR_FROM_INT_VAR VAR_INT VAR_INT
|
|
SUB_FLOAT_VAR_FROM_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
SUB_INT_LVAR_FROM_INT_LVAR LVAR_INT LVAR_INT
|
|
SUB_FLOAT_LVAR_FROM_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
SUB_INT_VAR_FROM_INT_LVAR LVAR_INT VAR_INT
|
|
SUB_FLOAT_VAR_FROM_FLOAT_LVAR LVAR_FLOAT VAR_FLOAT
|
|
SUB_INT_LVAR_FROM_INT_VAR VAR_INT LVAR_INT
|
|
SUB_FLOAT_LVAR_FROM_FLOAT_VAR VAR_FLOAT LVAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Substracts the value on the right from the variable on the left.
|
|
|
|
[[alternator-def-mult-thing-by-thing]]
|
|
=== MULT_THING_BY_THING
|
|
|
|
*Alternatives*
|
|
|
|
MULT_INT_VAR_BY_VAL VAR_INT INT
|
|
MULT_FLOAT_VAR_BY_VAL VAR_FLOAT FLOAT
|
|
MULT_INT_LVAR_BY_VAL LVAR_INT INT
|
|
MULT_FLOAT_LVAR_BY_VAL LVAR_FLOAT FLOAT
|
|
MULT_INT_VAR_BY_INT_VAR VAR_INT VAR_INT
|
|
MULT_FLOAT_VAR_BY_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
MULT_INT_LVAR_BY_INT_LVAR LVAR_INT LVAR_INT
|
|
MULT_FLOAT_LVAR_BY_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
MULT_INT_VAR_BY_INT_LVAR VAR_INT LVAR_INT
|
|
MULT_FLOAT_VAR_BY_FLOAT_LVAR VAR_FLOAT LVAR_FLOAT
|
|
MULT_INT_LVAR_BY_INT_VAR LVAR_INT VAR_INT
|
|
MULT_FLOAT_LVAR_BY_FLOAT_VAR LVAR_FLOAT VAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Multiplites the variable on the left by the value on the right.
|
|
|
|
[[alternator-def-div-thing-by-thing]]
|
|
=== DIV_THING_BY_THING
|
|
|
|
*Alternatives*
|
|
|
|
DIV_INT_VAR_BY_VAL VAR_INT INT
|
|
DIV_FLOAT_VAR_BY_VAL VAR_FLOAT FLOAT
|
|
DIV_INT_LVAR_BY_VAL LVAR_INT INT
|
|
DIV_FLOAT_LVAR_BY_VAL LVAR_FLOAT FLOAT
|
|
DIV_INT_VAR_BY_INT_VAR VAR_INT VAR_INT
|
|
DIV_FLOAT_VAR_BY_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
DIV_INT_LVAR_BY_INT_LVAR LVAR_INT LVAR_INT
|
|
DIV_FLOAT_LVAR_BY_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
DIV_INT_VAR_BY_INT_LVAR VAR_INT LVAR_INT
|
|
DIV_FLOAT_VAR_BY_FLOAT_LVAR VAR_FLOAT LVAR_FLOAT
|
|
DIV_INT_LVAR_BY_INT_VAR LVAR_INT VAR_INT
|
|
DIV_FLOAT_LVAR_BY_FLOAT_VAR LVAR_FLOAT VAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Divides the variable on the left by the value on the right.
|
|
|
|
[[alternator-def-abs]]
|
|
=== ABS
|
|
|
|
*Alternatives*
|
|
|
|
ABS_VAR_INT VAR_INT
|
|
ABS_LVAR_INT LVAR_INT
|
|
ABS_VAR_FLOAT VAR_FLOAT
|
|
ABS_LVAR_FLOAT LVAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Computes the absolute value of a variable's value and store the result in the same variable.
|
|
|
|
[[alternator-def-add-thing-to-thing-timed]]
|
|
=== ADD_THING_TO_THING_TIMED
|
|
|
|
*Alternatives*
|
|
|
|
ADD_TIMED_VAL_TO_FLOAT_VAR VAR_FLOAT FLOAT
|
|
ADD_TIMED_VAL_TO_FLOAT_LVAR LVAR_FLOAT FLOAT
|
|
ADD_TIMED_FLOAT_VAR_TO_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
ADD_TIMED_FLOAT_LVAR_TO_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
ADD_TIMED_FLOAT_LVAR_TO_FLOAT_VAR VAR_FLOAT LVAR_FLOAT
|
|
ADD_TIMED_FLOAT_VAR_TO_FLOAT_LVAR LVAR_FLOAT VAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Adds the value on the right multipled by the frame delta time to the variable on the left.
|
|
|
|
[[alternator-def-sub-thing-from-thing-timed]]
|
|
=== SUB_THING_FROM_THING_TIMED
|
|
|
|
*Alternatives*
|
|
|
|
SUB_TIMED_VAL_FROM_FLOAT_VAR VAR_FLOAT FLOAT
|
|
SUB_TIMED_VAL_FROM_FLOAT_LVAR LVAR_FLOAT FLOAT
|
|
SUB_TIMED_FLOAT_VAR_FROM_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
SUB_TIMED_FLOAT_LVAR_FROM_FLOAT_VAR VAR_FLOAT LVAR_FLOAT
|
|
SUB_TIMED_FLOAT_VAR_FROM_FLOAT_LVAR LVAR_FLOAT VAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Substracts the value on the right multipled by the frame delta time from the variable on the left.
|
|
|
|
[[alternator-def-is-thing-equal-to-thing]]
|
|
=== IS_THING_EQUAL_TO_THING
|
|
|
|
*Alternatives*
|
|
|
|
IS_INT_VAR_EQUAL_TO_NUMBER VAR_INT INT
|
|
IS_INT_LVAR_EQUAL_TO_NUMBER LVAR_INT INT
|
|
IS_INT_VAR_EQUAL_TO_INT_VAR VAR_INT VAR_INT
|
|
IS_INT_LVAR_EQUAL_TO_INT_LVAR LVAR_INT LVAR_INT
|
|
IS_INT_VAR_EQUAL_TO_INT_LVAR VAR_INT LVAR_INT
|
|
IS_FLOAT_VAR_EQUAL_TO_NUMBER VAR_FLOAT FLOAT
|
|
IS_FLOAT_LVAR_EQUAL_TO_NUMBER LVAR_FLOAT FLOAT
|
|
IS_FLOAT_VAR_EQUAL_TO_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
IS_FLOAT_LVAR_EQUAL_TO_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
IS_FLOAT_VAR_EQUAL_TO_FLOAT_LVAR VAR_FLOAT LVAR_FLOAT
|
|
IS_INT_VAR_EQUAL_TO_CONSTANT VAR_INT INPUT_INT
|
|
IS_INT_LVAR_EQUAL_TO_CONSTANT LVAR_INT INPUT_INT
|
|
IS_VAR_TEXT_LABEL_EQUAL_TO_TEXT_LABEL VAR_TEXT_LABEL TEXT_LABEL
|
|
IS_LVAR_TEXT_LABEL_EQUAL_TO_TEXT_LABEL LVAR_TEXT_LABEL TEXT_LABEL
|
|
IS_INT_LVAR_EQUAL_TO_INT_VAR LVAR_INT VAR_INT
|
|
IS_FLOAT_LVAR_EQUAL_TO_FLOAT_VAR LVAR_FLOAT VAR_FLOAT
|
|
|
|
*Side-effects*
|
|
|
|
Returns whether the value on the left is equal the value on the right.
|
|
|
|
[[alternator-def-is-thing-greater-than-thing]]
|
|
=== IS_THING_GREATER_THAN_THING
|
|
|
|
*Alternatives*
|
|
|
|
IS_INT_VAR_GREATER_THAN_NUMBER VAR_INT INT
|
|
IS_INT_LVAR_GREATER_THAN_NUMBER LVAR_INT INT
|
|
IS_NUMBER_GREATER_THAN_INT_VAR INT VAR_INT
|
|
IS_NUMBER_GREATER_THAN_INT_LVAR INT LVAR_INT
|
|
IS_INT_VAR_GREATER_THAN_INT_VAR VAR_INT VAR_INT
|
|
IS_INT_LVAR_GREATER_THAN_INT_LVAR LVAR_INT LVAR_INT
|
|
IS_INT_VAR_GREATER_THAN_INT_LVAR VAR_INT LVAR_INT
|
|
IS_INT_LVAR_GREATER_THAN_INT_VAR LVAR_INT VAR_INT
|
|
IS_FLOAT_VAR_GREATER_THAN_NUMBER VAR_FLOAT FLOAT
|
|
IS_FLOAT_LVAR_GREATER_THAN_NUMBER LVAR_FLOAT FLOAT
|
|
IS_NUMBER_GREATER_THAN_FLOAT_VAR FLOAT VAR_FLOAT
|
|
IS_NUMBER_GREATER_THAN_FLOAT_LVAR FLOAT LVAR_FLOAT
|
|
IS_FLOAT_VAR_GREATER_THAN_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
IS_FLOAT_LVAR_GREATER_THAN_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
IS_FLOAT_VAR_GREATER_THAN_FLOAT_LVAR VAR_FLOAT LVAR_FLOAT
|
|
IS_FLOAT_LVAR_GREATER_THAN_FLOAT_VAR LVAR_FLOAT VAR_FLOAT
|
|
IS_INT_VAR_GREATER_THAN_CONSTANT VAR_INT INPUT_INT
|
|
IS_INT_LVAR_GREATER_THAN_CONSTANT LVAR_INT INPUT_INT
|
|
IS_CONSTANT_GREATER_THAN_INT_VAR INPUT_INT VAR_INT
|
|
IS_CONSTANT_GREATER_THAN_INT_LVAR INPUT_INT LVAR_INT
|
|
|
|
*Side-effects*
|
|
|
|
Returns whether the value on the left is greater than the value on the right.
|
|
|
|
[[alternator-def-is-thing-greater-or-equal-to-thing]]
|
|
=== IS_THING_GREATER_OR_EQUAL_TO_THING
|
|
|
|
*Alternatives*
|
|
|
|
IS_INT_VAR_GREATER_OR_EQUAL_TO_NUMBER VAR_INT INT
|
|
IS_INT_LVAR_GREATER_OR_EQUAL_TO_NUMBER LVAR_INT INT
|
|
IS_NUMBER_GREATER_OR_EQUAL_TO_INT_VAR INT VAR_INT
|
|
IS_NUMBER_GREATER_OR_EQUAL_TO_INT_LVAR INT LVAR_INT
|
|
IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_VAR VAR_INT VAR_INT
|
|
IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_LVAR LVAR_INT LVAR_INT
|
|
IS_INT_VAR_GREATER_OR_EQUAL_TO_INT_LVAR VAR_INT LVAR_INT
|
|
IS_INT_LVAR_GREATER_OR_EQUAL_TO_INT_VAR LVAR_INT VAR_INT
|
|
IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_NUMBER VAR_FLOAT FLOAT
|
|
IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_NUMBER LVAR_FLOAT FLOAT
|
|
IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_VAR FLOAT VAR_FLOAT
|
|
IS_NUMBER_GREATER_OR_EQUAL_TO_FLOAT_LVAR FLOAT LVAR_FLOAT
|
|
IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_VAR VAR_FLOAT VAR_FLOAT
|
|
IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR LVAR_FLOAT LVAR_FLOAT
|
|
IS_FLOAT_VAR_GREATER_OR_EQUAL_TO_FLOAT_LVAR VAR_FLOAT LVAR_FLOAT
|
|
IS_FLOAT_LVAR_GREATER_OR_EQUAL_TO_FLOAT_VAR LVAR_FLOAT VAR_FLOAT
|
|
IS_INT_VAR_GREATER_OR_EQUAL_TO_CONSTANT VAR_INT INPUT_INT
|
|
IS_INT_LVAR_GREATER_OR_EQUAL_TO_CONSTANT LVAR_INT INPUT_INT
|
|
IS_CONSTANT_GREATER_OR_EQUAL_TO_INT_VAR INPUT_INT VAR_INT
|
|
IS_CONSTANT_GREATER_OR_EQUAL_TO_INT_LVAR INPUT_INT LVAR_INT
|
|
|
|
*Side-effects*
|
|
|
|
Returns whether the value on the left is greater than or equal to the value on the right.
|