RubE On Conveyor Belts

RubE On Conveyor Belts (abbreviated to ROCB in this article and pronounced "Roob-Ee On Conveyor Belts", a bad pun on "Ruby on Rails") is a language created in 2007 by immibis, and based on Chris Pressey's RUBE.

Interpreter source code (for Windows)

Overview
A program in ROCB consists of a two-dimensional grid, on which are placed program parts. =?=*== |   F =>>>>= (cat program in ROCB) Every tick, each part on the grid is evaluated. What the part does depends on the type of part. The cat program, for example, reads a number from standard input and drops it (the question mark) on the conveyor belt (the arrows), then it passes under the scanner (the asterisk) and into the furnace (the capital F). The equal signs and vertical bar are walls.

File format
Header Control program (optional) Main program The header is a single line of one of the following formats WIDTH HEIGHT cWIDTH HEIGHT CONTROL-LENGTH If the second form is used, a control program is expected to be present, and of the specified length. Note that if there is no control program and there is no 'c' in the header line, you do not leave a blank line in its place.

The control program
The control is a variant of Brainfuck, with some extra commands to control If not specified, the default control +[dsti[o[-]]+] is used.

The main program
Note that parts are case-sensitive. Anything not in this table acts as a wall - it stops bulldozers and data that run into it and can be used to support bulldozers and data.

Order of evaluation in the main program
Every part in the main program performs its action, in the following categories - lower category numbers perform their actions first, and from left to right, bottom to top, within a category.
 * 1) input, output, splitter, state control
 * 2) door key, furnace, random crate
 * 3) up pipe, down pipe
 * 4) gravity, copiers, winches
 * 5) dozers, conveyors
 * 6) gate, adder, subtracter

The order of evaluation matters because if you have something like: A   [4  F ===== then if the dozer is evaluated first, it will push the 4 to the right, but if the pipe is evaluated first, it will suck the 4 upwards.

Interpreter source code

 * Windows