compliment = "--" primary / primary;
(symbol for up arrow) means mod. and /\ means exclusive or.
Notice that the uniary minus is allowable, and parsed so you can
write x*-y.
Since there is no standard convention with bitwise operators, they
all have the same precedence, and parentheses must be used for
grouping.
Compliment is the l's compliment.
It is assumed that all arithmetic and bit operations take place in
the mode and style of the machine running the code. Anyone who
takes advantage of word lengths, two's compliment arithmetic, etc.
will eventually have problems.
PRIMARY
SYNTAX
primary =
constant /
builtin /
variable / (
block /
'( exp ');
variable = .id (
'(symbol for left arrow) exp /
'( block ') /
.empty);
constant = integer / real / string;
builtin =
mesinfo /
cortnin /
("MIN" / "MAX") exp $('. exp) '/ ;
parenthesized expressions may be a series of expressions. The
value of a series is the value of the last one executed at run time.
Subroutines may have one call by name argument.
Expressions may be mixed. Strings are a big problem? Rulifson
also wants to get rid of real numbers!!
CONJUNCTIVE EXPRESSION
SYNTAX
conjunct = disjunct ("AND" conjunct / .empty);
disjunct = negation ("OR" negation / .empty);
negation = "NOT" relation / relation;
relation =
'( conjunct ') /
sum (
"<=" sum /
">=" sum /
'< sum /
'> sum /
'= sum /
'" sum /
.empty);
The conjunct construct is rigged in such a way that a conjunct
which is not a sum need not have a value, and may be evaluated
using jumps in the code. Reference to the conjunct is made only
in places where a logical decision is called for (e.g. if and
while statements).
We hope that most compilers will be smart enough to skip
unnecessary evaluations at run time. I.e a conjunct in which the
left part is false or a disjunct with the left part true need not
=6= |