Machine format

The transitions are entered as quintuples of the form State Sep Char Sep State Sep Char Sep Move where

The meaning of the quintuple (q, c, q', c', m) is to define the transition "when in state q and looking at character c, transition to state q', writing character c' and moving in direction m". Underscore '_' is interpreted as the blank.

Different transitions have to be separated by at least one whitespace character and the last one has to be followed by at least one whitespace character as well.

How to use

Example machine (successor of a binary number)

Machine instructions Input (note the leading space)
1,_ 2,_,>
2,1 2,1,>
2,0 3,0,!
2,_ 4,0,<
4,1 4,0,<
4,0 4,0,<
4,_ 7,_,>
7,0 H,1,<
3,0 3,0,>
3,1 3,1,>
3,_ 5,_,<
5,0 6,1,<
5,1 5,0,<
6,1 6,1,<
6,0 6,0,<
6,_ H,_,!
           
 11111001111

Example machine (predecessor of a binary number)

Machine instructions Input (note the leading space)
1,_ 2,_,>
2,0 H,0,<
2,1 3,1,>
3,0 3,0,>
3,1 3,1,>
3,_ 4,_,<
4,0 4,1,<
4,1 5,0,<
5,1 6,1,<
5,0 6,0,<
6,0 6,0,<
6,1 6,1,<
6,_ H,_,!

5,_ 7,_,>
7,0 8,_,>
8,_ 9,_,<
9,_ H,_,<
8,1 10,1,!
10,1 11,_,<
11,_ 12,1,>
12,_ 10,_,>
10,0 13,_,<
13,_ 12,0,>
12,_ 10,_,>
10,_ 15,_,<
15,_ 14,_,<
14,0 14,0,<
14,1 14,1,<
14,_ H,_,!
 100000