It is recommended to use the “.h5elq” extension for Eloquent code
files (where applicable). Eloquent is identified by the MIME type
text/x-h5elq
(if bool onfalse ontrue)
bool
evaluates to %
, evaluate
onfalse
, otherwise evaluate ontrue
.(begin expr1 expr2 ... exprN)
(define var val)
var
, to mean a specific value,
val
.val
.(assign var val)
var
is a variable that has already been defined,
change its value to val
.val
.(lambda args body)
args
-> List of local variables provided as
arguments. (a b c)
- takes three arguments. a
- takes a variable number of arguments, collected into a proper list.
%
- takes no arguments.body
-> Code to evaluate when calling the procedure,
can contain any syntax, statements, or variables accessible from the
current scope.args
list, and evaluates body
,
substituting them inside as appropiate.self
represents the procedure
itself, so it may be called to do recursion.(procedure arg1 arg2 ...)
(cons A B)
->
(A . B)
(car a)
a
is a cons cell, evaluates to the left element
of a
.(cdr a)
a
is a cons cell, evaluates to the right element
of a
.(num? a)
a
is an unsigned scalar. Otherwise it
evaluates to %
.(nil? a)
a
is %
. Otherwise it
evaluates to %
.(proc? a)
a
is a procedure, otherwise it
evaluates to %
.(atom? a)
a
is an atom. Otherwise it evaluates
to %
.(eq? a b)
a
and b
are both the
exact same procedure. Otherwise it evaluates to %
.(apply proc args)
proc
with arguments being each
element of the proper list args
. Evaluates to the result of
the procedure.(add x y)
x
and y
are unsigned scalars.(sub x y)
x
and y
are unsigned scalars.(and x y)
x
and y
are unsigned scalars.(or x y)
x
and y
are unsigned scalars.(xor x y)
x
and y
are unsigned scalars.(shift x y)
x
and y
are unsigned scalars.(set x y)
x
is a cons cell of the form
(high . low)
, for the high and low byte of the address to
set.y
is either an unsigned scalar, or a cons cell of
the form (high . low)
, for the high and low byte of the
address to read.set
an address to itself is considered only a
read.x
.(halt)
%
.%
, procedure,
or unsigned scalar.abcdefghijklmnopqrstuvwxyz?
0123456789ABCDEF
%
or a cons cell where the right hand
side is a list. Hence, (a . b)
, a
,
(a . (b . c) . %)
are not lists, but
(a . ((b . %) . %))
, (a . %)
are lists.(a b c)
notation stands for the list
(a . (b . (c . %)))
.