APLA - List of Bytecode Tokens

-- under construction --

Directives

AXISOP

Validate stacked value to be used in axis specifier.

BIND

Assign stacked value to symbol table entry.

CONST

Numeric scalar or vector, string scalar or vector.

CONSTANTS

Table of numbers - encountered in user's function.

DELETE

DISPLAY

Force display of stacked value. Pops stacked value.

END

Terinator in this stream. This may be disused.

EVAL

Evaluate object. If variable then its value is pushed onto stack. If function then it is executed and any returned value is pushed onto stack.

Optionals flags enforce valence and enforce object returns a value.
[0], [1], [2], [0v], [1v], [2v]

EXIT

Terminate execution of this stream.

GLOBAL

INPUT

Text

LABEL

LINE

(This may be disused)

LOCAL

List of localized variables, formal parameter vars, return var.

NULL

Token value is guaranteed to be zero. Functions as stream 'end' (exit this particular level)

OFFSET

Add 256 to source code column reference index.

POP

Pop values stack. May be disused.

REPLACE

RUNSTATE

0 = RS_RUNNING
1 = RS_EXIT_NORMAL
2 = RS_TERMINATE
3 = RS_CALLFN

SELECT

Extract indexed subarray from stacked value. (array indexing)

SETCODE

Sets an object's operative type. Used by APL function if it's functioning as a parser.

By default every newly added symbol to the symbol table takes on the behaviour of a variable. This can be set to different types:
- make it a variable
- make it a function
- make it a group
- define valence mask (variable is always 001; functions can be 001, 010, 100, 110)
- assignable? YES / NO (e.g. label, group would be NO)
- erasable? YES / NO (e.g. label, local variable, group would be NO)
- locked function
- system function or variable - can not be examined or deleted without special priviledge

SHADOW

Create a local instance of object. May be disused if it's handled outside of stream.

SKIP0

Skip this instriction. It's a NOP.

SKIP1

Skip next instruction. This may be disused.

SKIP2

Skip next 2 instructions.

SKIP1NIL

Conditional branching in stream used to differentiate monadic vs. dyadic interpretation of a function when an object's valence can be dynamic and must be determined at run-time. Check valence of object for being niladic.
- If YES then skip the next instruction
- If NO then set the VOID flag of the EVAL instruction located at 5 statements beyond this current location. Proceed normally

SKIP4NIL

Conditional branching in stream used to differentiate monadic vs. dyadic interpretation of an APL primitive when an object's valence can be dynamic and must be determined at run-time. Check valence of object for being niladic.
- If YES then skip the next 4 instructions
- If NO then proceed normally

STACKINFO

Used by APL function if it's functioning as a parser. May be disused.

SVACCESS

Used by APL function if it's functioning as a parser. May be disused.

SYMBOLINFO

Used by APL function if it's functioning as a parser. May be disused.

SYMBOLNAME

Used by APL function if it's functioning as a parser. May be disused.

SYMBOLREF

Used by APL function if it's functioning as a parser. May be disused.

SYMBOLS

Used by APL function if it's functioning as a parser. May be disused.

TAG

0 = APL_S - APL source code
1 = APLA_S - APLA source code
2 = APLA_O - APLA object code (it's been tokenized, short ints)
3 = APLA_X

- version
- fixtime timestamp
- index to SYMBOL, LOCAL, LABEL, GLOBAL, CONSTANTS areas

TOKENCODE

Used by APL function if it's functioning as a parser. May be disused.

VALIDI

(This may be disused)

VEER

Branch to ordinal line, calculated from stacked value.

VEERC

Branch to target line (is constant).

VEERREL

Branch to absolute token stream index.

WSINFO

ZZZZ

Revised 9 May 2020