Bare Bones Archive

The most recent release of my Bare Bones interpreter made identifiers case-insensitive, and added an optional peephole optimizer that recognizes a common idiom:

while N not 0 do;
  decr N;
  incr X;
end;

Such a loop adds N to X, clearing N in the process. Without the optimizer, this is has time complexity [...]

Bare Bones interpreter

Over the weekend I finished the homework assignment for the “Theory of Computation” chapter of Computer Science: An Overview, Ninth Edition, by J. Glenn Brookshear. Brookshear defines a very minimal programming language called Bare Bones, in which variables may contain arbitrarily large non-negative integers. The only operations available are:

clear var; — set a [...]