Java built interpreter for the BareBones language designed by Brookshear
java Main test.bare
Comments can be achieved by using #
, after which, the interpreter will ignore everything on that line.
Example:
clear X; # Sets X to 0
Comparators can be used to evaluate boolean expression using:
is
- equal tonot
- not equal toabove
- greater than (exclusive)under
- less than (exclusive)
Example:
while X is 0 do;
Example program using the BareBones syntax. Results in X=0
# Example program that results in X=0
clear X;
incr X;
incr X;
incr X;
while X not 0 do;
decr X;
end;